OGNL vs EL (briefly)
Saw this interesting post on java.net yesterday: EL Comparisons
It sorta backs up my idea that the biggest performance difference between Stripes and WebWork is most likely OGNL. If you look at the chart in the blog link above, OGNL is quite a bit slower than Commons-EL (which, since we run tomcat, was used by my Stripes version of the test).
There are some cool things about OGNL, but i just wouldnt recommend using it to anyone. Most of the neater stuff it does, i've been able to duplicate in the standard EL (though sometimes it takes some creative coding). One thing that always bothered my about OGNL was that, in my app, it seemed to fail silently when i had a syntax error..which made debugging a chore. Maybe i could have modified my log4j.properties file to see the errors..but i would bet that OGNL doesnt use the ERROR level when exceptions occur..since thats the level I use for the global logger, and i never saw exceptions in my logs. Fixing OGNL errors usually was just trial and error until i got something that seemed to work.
As for the EL...i like the syntax, though i dont like that its more difficult to call methods (unless they are static..which is possible using a custom tag). However, once i got used to the syntax, and the workaround for calling methods..I've havent run across anything that made me miss OGNL.
So..as i finally get back to migrating pieces of the app to Stripes, i will also continue to replace OGNL with the EL.

0 Comments:
Post a Comment
Links to this post:
Create a Link
<< Home