cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <g...@tuffmail.com>
Subject Re: [C3] Sitemap implemented in Scala
Date Sun, 15 Mar 2009 23:33:37 GMT
Grzegorz Kossakowski pisze:
> 
> The last step of sitemap processing is invoking the result of the reduction. It's SitemapInvoker[5]
class that is
> responsible for that. This class is only partly implemented as I didn't have time to
deal with component factories
> needed to build actions and pipeline for execution. Anyway, this class extracts two distinct
sets of nodes that we are
> interested in:
>   * actions
>   * pipeline components

Actually this list lacks one item:
  * controllers (represeted by either call or redirect-to node)

> From this point, building a pipeline and executing actions is rather trivial task.

I've refactored my code a little bit so it handles controllers and implemented sitemap building/execution.

The implementation is in SitemapInvoker.invokeSitemap but is rather messy. It uses Invocation
for actual pipeline
building and execution.

Messy or not, this code somehow works. You can checkout scalaSitemapEval:
http://github.com/gkossakowski/apache-cocoon3/tree/scalaSitemapEval

and compile it. Then just go and run samples. Some of them will work just fine. Some not,
I have to check why they don't
work but I don't have a time right now.

One thing doesn't work completely: error handling. This is due to fact that Scala implementation
uses completely
different logic so if we want to have error handlers working there is no chance to reuse Invocation
class. This is not a
problem as I already plan to reimplement that part as well to make the whole example complete.

Apart from SitemapInvoker.invokeSitemap method I think this code is rather polished. It lacks
some comments, though. I
plan to add some in upcomming days.

Any feedback is greatly appreciated.

-- 
Best regards,
Grzegorz Kossakowski

Mime
View raw message