Sylvain Wallez wrote:
Stefano Mazzocchi wrote:

I think having a 40Kb sitemap for a just a few pipelines scares people way and makes the learning curve steeper.

here is my proposal for Cocoon 2.2:

 1) move the current webapp/sitemap.xmap into webapp/WEB-INF/sitemap.xmap

 2) make the sitemaps inherit from that one instead than from root

3) obviously, in case webapp/WEB-INF/sitemap.xmap is missing, fall back into the root one (for back compatibility)

The result is that you can have a sitemap as simple a single pipeline definition and it's much easier for people to just attack and modify without being scared away by the complexity of the whole thing.

Thoughts?



+1, for a reduced root sitemap, but maybe not the way you propose it.

What I don't like currently is that a lot of blocks use the xconfpatch task to insert their own stuff in the root sitemap. IMO this is bad, and block-specific components should only be present in block-specific sitemaps. That's a first step towards reduction.

Now, about the WEB-INF/sitemap.xmap: this is a good idea to have some "system-defined" sitemap components, but it's not properly speaking a sitemap since it should define only components and no pipelines.

If you relate this to my earlier proposal of splitting the xconf file, that would mean we'll have a sitemap-builtins.xconf in WEB-INF along with the other xconf snippets. And the block-specific xconf files could also bring not only system-level components, but also sitemap components. For example, the "database" block would bring in its "database-block.xconf" not only the datasources, input/output modules, but also the SQLTransformer.

How does that sound?

I don't care how you do it, as long as my root sitemap is 2kb and not 40kb :-)


--
Stefano.



Reply via email to