commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten Ziegeler" <cziege...@s-und-n.de>
Subject [Jelly][RT] The purpose of the JellyContext
Date Tue, 23 Dec 2003 12:12:26 GMT
I just started to look at Jelly for using it as the main template
engine within Cocoon and was a little bit surprised by the
JellyContext class.

But first, Jelly is really great and provides exactly the 
extensability I need.

So, back to the theme. I think the JellyContext is the context
the script(executed template) runs in. This is proved by the
run(JellyContext, XMLOutput) method of the Script interface.

Unfortunately, the JellyContext does a lot more. It can actually
parse a script, resolve URIs etc. I think this is mixing concerns.
You have to create a JellyContext first in order to get a script
and can then run the script later on with another JellyContext.

So, I think separating the concerns would make things easier.
What do you think of creating a "Parser" (whatever you call it),
that gets all the compileXX and runXX methods from the JellyContext
and leave only the context handling at the JellyContext.

In addition, a compileXX/runXX method that can directly handle
an InputStream instead of a URL would be very great for Cocoon.

For compatibility, I would suggest to deprecate the methods
at the JellyContext and remove them in a later release.

If you're interested I can provide a patch.

Carsten 



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message