struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandru Popescu" <>
Subject Re: Abstracting Ognl from XWork and Struts 2?
Date Fri, 29 Sep 2006 07:38:45 GMT
On 9/29/06, Don Brown <> wrote:
> I've been toying with this idea of severing XWork and Struts 2's strict
> dependency to OGNL.  The goal is not necessary to remove OGNL outright,
> but to make it possible to replace it with another expression language.
> I'm happy with OGNL right now, however a couple things - its slow,
> mostly unsupported, doesn't have tool support, and did I mention slow? -
> inspire me to want to start to wean Struts off of it.
> How would we do it?
>  1. Pull out a ValueStack interface from OgnlValueStack
>  2. Create an abstract factory, ValueStackFactory, to create the ValueStack
>  3. Pull out an interface from OgnlUtils and create a factory for it
>  4. Replace/abstract the custom type conversion stuff
> I've done 1 and 2, compiling and tests passing.  #3 seems pretty easy,
> but the big question mark is #4.  Also, I'd imagine things like our tags
> are tied to the OGNL grammer, which might be interesting.
> Again, my goal isn't to remove it completely, but just to make it
> possible to swap it out sometime in the future with JEXL, JSP EL, custom
> OGNL (like Wicket and Stripes have done), WW 1 EL, or BeanUtils EL.  The
> last two might be interesting to assist in migration situations.
> What does some of the Webwork veterans think? Is this doable?

IMO, this is doable. But I think it may require yet another
abstraction: an expression converter, as the engines you are
mentioning are using different types of syntax. Or, if this is
something that comes in the XValueStack implementation than I guess it
may work too.

.w( the_mindstorm )p.

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

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

View raw message