I would say the reason you don't want to dive into 233 would be primarily because of performance. You'd either need to have a compiled statement cache or pre-compile. Most of the scripting frameworks that comply with 233 are full blow languages (Groovy, JavaScript, etc) and have pretty slow parsers compared to EL parsers out there. You could give them a try and see, but I would guess you would see a large drop in performance using them. I personally think MVEL is one of the better ways to go once they finish some of the new features they have in mind for the next version (i.e. annotations and such).

Or just write your own. I wrote one for JCatapult and it took about a day. It isn't as fast as MVEL, but it works fine for what I need and it doesn't mean it can't be improved on. The primary reason I did that exercise was to fully support 1.5 and generics as well as provide a better type conversion API with annotation support. The way I wrote it you can specify additional attributes using the taglibs or via an annotation that tell the API how to convert Strings to things like Money, dates, and JODA classes.

-bp


On Jul 5, 2009, at 4:13 PM, Musachy Barroso wrote:

After fighting OGNL and MVEL for a while I've got to the conclusion
that they aren't the best horses to bet my money on, some of the
reasons are not even technical so I won't go into them. So I have been
playing with a new idea, why should we couple struts to an EL, when we
can use JSR 223 (Scripting for the Java platform, some docs here:
http://java.sun.com/developer/technicalArticles/J2SE/Desktop/scripting/) ,
and just make Struts EL agnostic? I know security would be a concern,
but at least we got standard ways to limit what these scripts can do
or not. it would be very cool if I could just set

<constant name="struts.scriptEngine" value="groovy" />

and then just use all of groovy's cool stuff in the tags. So if people
can just pick their favorite engine, instead of being stuck with our
supported implementation. What do you think?

musachy
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to