cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Crafter <craft...@osa.de>
Subject Re: [C2/Patch] Selector Heaven :-)
Date Sun, 03 Dec 2000 17:53:06 GMT
Hi Robin!

Robin Green <greenrd@hotmail.com> wrote:
>
> Sylvain Wallez <sylvain.wallez@anyware-tech.com> wrote:
> >
> >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 ?
> 
> +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.

	No need to apologize Robin - I'll be the first one to agree when
	someone has a better idea. :-)
	
	I've implemented Sylvain's suggestions and have posted it in a
	previous email. Thanks Sylvain.

	We just need to be aware though that such a solution is not bounded,
	and allows *any* Java code to be placed in sitemap test clauses. 
	The temptation is also there to place increasingly more and more java
	code into the sitemap, which would otherwise go into its own class.
	
	The only other point is that of syntax. Instead of writing something
	like:

		<when test="myparameter = 'string'">

	one has to write:

		<when test="request.getParameter(&quot;myparameter&quot;).equals(&quot;string&quot;)">

	The first is more readable, but it's minor thing.

	Personally, I like both solutions. Sylvains idea definitely answers
	many of my previous questions and will be of great use in our project.
	It also has definite performance advantages.
	
	For non-performance critical pipelines however, I would use the first
	solution though, due to it's readability and the boundaries it
	provides.
	
	But that's what such an open community offers - freedom of choice! :-)

	Thanks for everyone's input. Hope everyone had a great weekend.

	Cheers,

	Marcus
-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   Open Software Associates GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
            _&&&&'     Email : Marcus.Crafter@osa.de
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:           After Hours    : +49 69 4908 6750


Mime
View raw message