Tony Collen wrote:

gerritjan wrote:

Hello,

Using the document() function for aggregation in Cocoon may break Separation of Concerns (SoC). That is, the designers of Cocoon view inclusion and transformation as different functions, best handled by separate Cocoon components. Treating them separately allows you to achieve performance gains and increases the resusability of your pipelines.


I think in many cases various cocoon mechanism like includes or aggregation function are the best solution, however, there are several use cases where I believe, that the document() function is precious and creates easier to maintain code.

however, there are drawbacks, or at least effects one should know.

consider [document1] uses document() function to retrieve information from [document2]

if you modify [document2] and only [document1] is used in the sitemap, e.g. in the generator or transformer, cocoon does not realize, that there is a modification in the data and sends the old [document2] data.

so after modifying the dependend [document2] one should change also the main [document1] e.g. by using unix touch to show cocoon that there are changes and reload is necessary.

this is at least my experience, please correct my if I am wrong.

Alex


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to