cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Foster <jafos...@engmail.uwaterloo.ca>
Subject "Proper" use of JPython
Date Tue, 05 Sep 2000 20:25:13 GMT
I would like to use JPython to generate the XML that will pass through the
Cocoon processing chain.

In Cocoon1 I wrote a very simple producer that loaded a script, executed
it, and then extracted the string contents of a known variable.  While
this works fine, it feels like a hack and I seem to have a memory leak
somewhere that causes the JVM to give up after a few days.

So far I've been developing in a very prototype-oriented mode.  Using
straight Python (and alternating between Cocoon and the interactive
interpreter) has resulted in a very rapid development cycle which has
served me well.

My understanding of XSP is that it allows me to interleave program code
with XML fragments.  When a page is served, a program (class, script,
etc.) is generated that includes my program code and the commands to print
the XML fragments.

If I'm right (and please correct me if I am not), XSP pages cannot be used
in an interactive way unless I capture the generated program.  This
captured program will be useful, but will not be the same as my original,
so my edit/test cycle will be a little more complicated.

I'm not going to try and defend my current development practices, because
they really can't be defended.  However I don't think that they are
uncommon.  I am wondering what the list's views are on how to merge rapid
prototyping and the Cocoon2 framework?

I could probably use the BSF to create a generic "ScriptGenerator" that
would look for any recognized script extensions, load the proper
interpreter, parse out and prepare any URL parameters, execute the script,
and extract the results.  However this seems to be as much of a hack as my
current solution.

Help!

Jason Foster 


Mime
View raw message