cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <>
Subject Re: esql logicsheet finished (?!)
Date Mon, 04 Dec 2000 03:20:51 GMT
On Thu, 30 Nov 2000, Paul Russell wrote:

> On Thu, Nov 30, 2000 at 05:01:38PM -0500, Donald Ball wrote:
> > > Should XSP not provide some functionality for this? Looks
> > > worryingly like a maintenance nightmare to me...
> > we had been talking about adding extra functionality to the xsp:element
> > element, so that the name of the element could be specified either as an
> > attribute to the element element (:)) or a child element named name.
> > 
> > e.g. 
> > 
> > <xsp:element>
> >   <xsp:name>foobar</xsp:name>
> >   ...
> > </xsp:element>
> > 
> > instead of 
> > 
> > <xsp:element name="foobar">...</xsp:element>
> > 
> > can i get a vote on adding this to c2's xsp-1.1 implementation?
> +1 here.
> Donald; as an aside, you seem to be 'particularly good' at the
> whole logicsheet thing -- is there anything in the way of
> documentation or magic bullet techniques you can give us?
> I've tried to write an EJB taglib, for example, and it was
> an unmitegated disaster - ended up including code in the
> taglib input, which is Wrong, in my opinion. Help! :)

hmm. i did a big ol' post on this awhile back, and maybe someday i'll try
to put it all into a paper, but the basic principles seem to include:

1. allow your code to be configured using parameters from other
logicsheets. this is key. see get-nested-content and get-nested-string.

2. provide functions such that your users can access your output instead
of pushing it upon them. this is key - it lets authors insert your output
in the result tree or use it in the logic layer. note this forbids you
from using the xsp:logic element inside these elements.

3. keep track of your flow control. you can branch in XSLT at logicsheet
application time, based on elements present or absent in the xsp page, or
you can branch in your logic language (java) at runtime based on, well,
runtime information (request parameters, etc.).

4. (shockingly) avoid shunting all of your logic to an external library,
at least the parts that deal with creating results. this flies in the face
of most other logicsheet authors' design principles, but it helped me
_tremendously_. in the esql logicsheet, i just wanted to have more control
over the format of the results - but the ability to use the results as
input parameters to other logicsheets was an unexpected and profound

- donald

View raw message