You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by da...@idl-bt.com on 2001/12/13 18:11:06 UTC

C2: Help: VelocityAggregator + Component approach to pages

I'm fairly new to Cocoon and I'm strongly considering it for a site I'm
working on.

I would like to do is use a component based approach to the site.
By this I mean that each page is made up of a template that contains very
loosely coupled components
Each component is responsible for rendering itself to (X)HTML and they will
all then be aggregated.
I'm currrently approaching this by defining multiple pipelines (1 for each
component) and then using <map:aggregate> to join them into 1 big XML
stream.

This then gets passed through an XSL transform and serialised.
This means that one page can contain XML/XSLT components (content); Velocity
components (Menus), JSP compnents (Banner ad selection); etc etc - as the
mood (or skill base of my team) takes me...

And style is applied in two passes: once for each component (quite simple
and self contained) and once for the overall layout (which doesn't have to
deal with the nitty gritty of transforming each potential component - it
just drops huge chunks of pre-transformed stuff into a pre-defined spot on
the page)
Since each component is a pipeline I assume they will be cached (does anyone
knows otherwise?)

However, I'd rather use Velocity to do the aggregation than XSLT as I think
it's more suitable for templating.

What I think I need is a Velocity based aggregator where the <map:part>
pipelines appear as velocity context components with a suitable
'pipeline.generate' method.
Could anyone give me pointers as to where I should start?

I'm looking at the VelocityGenerator (v1.11 14/11/2001) class and the
ContentAggregator. I think I need to understand is how to get the <map:part>
objects into whatever combined class I come up with.

Well, lets see if anyone's interested and can help :)

Cheers

David Greaves

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Help: VelocityAggregator + Component approach to pages

Posted by Nicola Ken Barozzi <ba...@nicolaken.com>.
----- Original Message -----
From: <da...@idl-bt.com>
To: <co...@xml.apache.org>
Sent: Thursday, December 13, 2001 6:11 PM
Subject: C2: Help: VelocityAggregator + Component approach to pages


> Since each component is a pipeline I assume they will be cached (does
anyone
> knows otherwise?)

In a recent mail:
<Vadim-Gritsenko e-mail="vadim.gritsenko@verizon.net">
Regarding XSP page caching, you need to define couple of methods. Read
on about caching of XSP in the thread:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=100142724706511&w=2
</Vadim-Gritsenko>

> However, I'd rather use Velocity to do the aggregation than XSLT as I
think
> it's more suitable for templating.

Aggregation is not done with XSLT.
Cocoon does it, and implements the caching too.
For aggregation it should be all you need :-)

Nicola Ken Barozzi These are the days of miracle and wonder...
                                ...so don't cry baby, don't cry
<xm...@nicolaken.com>                          Paul Simon


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org