cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Reinhard Pötz <>
Subject RE: [Rant] Flow + JXTemplate (Was: Re: [FYI] Stefano's Linotype)
Date Thu, 24 Apr 2003 18:32:44 GMT

I recommend you to have a look at the Petstore. Christopher has done a
great job providing the examples in 4 different ways (jxpath, jexl, xsp
and velocity).

My first impression is that it looks very clear, simple and well-thought
to me: 
You control the flow using the Cocoon control flow and "send" data to
the pipeline which is responsible for the view using the object model.
Additionally you have access to some common objects like request or the
continuation (and some more). This data can be accessed with those 4
"languages" which provide some simple control structures like choose,
if, and some more.

And here Christopher compared the 4 languages:

Hope this helps!


> -----Original Message-----
> From: Tony Collen [] 
> Sent: Thursday, April 24, 2003 7:18 PM
> To:
> Subject: [Rant] Flow + JXTemplate (Was: Re: [FYI] Stefano's Linotype)
> Alright, now that I'm fresh from a night of sleep, and I'm 
> not all dizzy and tired, I'll take another poke at this:
> I'm starting to dig into actually using the Flow, and I'm 
> having a hard time understanding using the JXTemplate(Generator).
> Rather, I'm having a hard time understanding why we need a 
> templating language inside our nice XSLT templating system.
> From a user's perspective, I already invested a lot of time 
> learning XSLT (and I do not even claim to be extremely 
> comfortable with that, too!), so why should I take the time 
> to learn another templating language?  Argh!! This was 
> supposed to be easy, but now it feels like it's getting 
> horribly complex again.
> It's nice the Generator is fast [1], but it still feels like 
> it's doing the work of a Generator and a Transformer, which 
> pokes me in a weird way for some reason.
> Maybe I'm stupid, and just not seeing the advantages.
> Last night, when I dove into all of the Flow stuff, I got to 
> the point to where I had to reference "bizData" in my view 
> pages.  I was following the patterns in Stefano's Linotype 
> code, using <map:generate type="jxpath"/>.  My problem then 
> came around to where I couldn't even get the Continuation ID, 
> due to the difference between Stefano's code and the
> JXTemplate(Generator) in CVS.
> So I go looking for docs, and all I find is the Javadocs for 
> JXTemplate, but the Javadocs weren't built for the things in 
> Scratchpad! Argh!
> I digress.  It's been a long week and finals are about to 
> hit.  I guess I'm just frustrated at not having working 
> samples and not getting the docs for the 
> JXTemplate(Generator).  Which reminds me.  I think the 
> JXTemplate generator in scratchpad should be named 
> JXTemplateGenerator for consistency's sake.
> So here's my plea, can someone who's "in-the-know" about 
> JXTemplate whip up a nice sample that uses the tags (choose, 
> import, etc) in a meaningful and useful way for the annoying 
> n00bs (me)?  Or perhaps another sample in the Flow directory 
> that correctly uses the new Generator?  .. I'll promise to 
> chill out, and get over the bump in complexity and having to learn
> Yet Another Templating Language... hopefully sooner rather 
> than later   :)
> Regards,
> Tony
> [1] 
>> cocoon-dev&m=105029949912114&w=2
> --
> Tony Collen
> ICQ: 12410567
> --
> Cocoon: Internet Glue (A Cocoon Weblog)
> --

View raw message