commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulo Gaspar" <>
Subject RE: [workflow] Jelly <-> Workflow maybe some crossover
Date Thu, 07 Mar 2002 13:43:55 GMT
Hi James,

I think that pnuts is not so efficient when using it trough BSF,
but I do not remeber the specifics so well anymore.

Using some of its specifics one can really minimize parsing and
compiling to the minimum (once per change) and use each compiled
instance in a multi threader application.

It is also nice to allow external scripts, like in this fragment
that actually is working somewhere:

            <when uri="kino/film">
                <run-pnuts direct-out="true" >
                    <text-url url="${film.folder}/film.pnut" />

The text bit is more verbose but is due to the fact that I have
a common text loading mechanism also present here, as in this
debug code bit:

                <match-uri wildcard="**/*">
                    <run-pnuts direct-out="true">
                            println("&lt;h5&gt;matches = " + matches +

...but also present in non pnuts related bits, like with SQL
statements. The text loading helps

Actually I am NOT using the <text> mechanism for SQL anywhere
because pnuts makes it so easy to write SQL by using those "`"
quotes for multi-line strings, as in:
  sql =
  FROM address
  WHERE ADDR_ID=` + id


Pnuts documentation is not always easy to follow, but it is
still much better than most open source projects. And although
you might find some features/quirks weird, after some use all
of it ends up making a lot of sense.

For me Pnuts is one of those rare:
  "the more I use it the more I like it!"

I even get to think that generating JSPs troug Pnuts would
simplify a LOT the current issues by compiling them (faster)
without writing to the disk.

Have fun,

> -----Original Message-----
> From: James Strachan []
> Sent: Wednesday, March 06, 2002 10:29 PM
> To: Jakarta Commons Developers List;
> Subject: Re: [workflow] Jelly <-> Workflow maybe some crossover
> Hey Paulo
> From: "Paulo Gaspar" <>
> > I am using bits of pnuts embedded in XML in a similar way.
> > Since pnuts gets compiled in memory, it is damn fast too.
> Agreed. Actually many BSF related scripting languages do too.
> > I had, however, to fix a couple of classloader issues in
> > pnuts to use it in a servlet.
> Thanks for the link to pnuts, I'd not heard of it before - it looks pretty
> cool!
> It looks like pnuts implements the BSF API so that pnuts should
> work fine in
> Jelly (once I've BSF'd Jelly). I should have pnuts available as one of the
> defaults so that stuff like...
> <pnuts:if test="foo.isBar()">
>     <pnuts:expr value="foo.getSomething("123")"/>
> </pnuts:if>
> <pnuts:script>
>     a bunch of pnuts code ....
> </pnuts:script>
> could be used to work with pnuts inside Jelly. I'll let you know when
> there's some Jelly'd pnuts in CVS.
> James

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message