cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <>
Subject Re: [C2/Patch] Selector Heaven :-)
Date Fri, 01 Dec 2000 23:10:16 GMT
Sylvain Wallez <> wrote:
>Giacomo Pati a écrit :
> >
> > --- Marcus Crafter <> wrote:
> > > Hi All,
> > >
> > >       Hope all is going well across the Cocoon globe!
> > >
> > >       Attached is a set of files to add initial support for the 
> > >       selectors to Cocoon 2:
> > >
> >
> > Yes I have :) Does it make sense to combine all Selectors above into
> > one and use a syntax like
> >
> >   <map:when test="parameter.myparm eq "foo" and session.myvar gt 3"/>
> >
> > I mean can we prefix the context of the variable used to test (header,
> > parameter, session, context so far).
> >
>Mmmmh... Marcus did a very nice job, but that remembers me of a
>discussion in the thread "[C2]Action proposal (long)" at the beginning
>of november where I was warning about the possible temptation of
>defining yet another scripting language for the sitemap to handle
>complex sites. Seems your proposal looks like the early stages of a
>boolean expression language...
>Two points against that :
>- C2 was made with speed in mind, and the sitemap is the central
>dispatch point of the web site. As such, it must be as quick as
>possible, and parsing and interpreting a script expression at each and
>every request seems to me a big waste of CPU.
>- this is yet another language to learn.
>So why not allow these expressions to be raw Java boolean expression
>which the CodeFactory can include as is in the sitemap generated code,
>thus avoiding interpretation overhead ?
>Sitemap managers may not be fluent in Java (but I think they will very
>likely know JavaScript), but Java boolean expressions are simple enough
>to be learned as quickly as a new language.

+5 Insightful, Sylvian! :-)

>Just express the conditions in Java, and all these question will have an
>instant answer ;-)

I have to agree. Let's not reinvent the wheel. Sorry Marcus. Unless you can 
justify why your way is better.

I must admit I haven't been playing close attention though so I might have 
misunderstood something.

Get more from the Web.  FREE MSN Explorer download :

View raw message