Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Hello Brown, I have been using standard JSTL EL in my projects and since Struts 2 uses OGNL which apparently is a more powerful and flexible language than JSTL EL, would you suggest moving away from EL and start using OGNL ? How much of an effort would it be to migrate from EL to OGNL expression syntax? Does the book cover this aspect?
OGNL is the expression language and "glue technology" used in Struts 2. Mostly you can think of it as the EL that you use from your tags to reference data properties on objects in the Struts 2 framework. It is true that OGNL is very powerful, but its role as a EL is little different than what you are already familiar with. It would be quite easy to use if you have used JSTL.
I personally think you shoudl avoid the power tools of OGNL as they usually mean that you are bringing too much logic into your view pages, but that's up to you
Also, I'd like to point out it isn't an either/or decision with OGNL and JSP EL. For example, the Struts 2 tags don't allow JSP EL within their attributes, for security reasons, so you are only allowed to use OGNL expressions there. As Chad pointed out, OGNL is very powerful, but unfortunately, at least in my opinion, JSP EL is the opposite - not powerful enough. One of the features under discussion in the Struts dev list is how to resolve this by perhaps extending the JSP EL, then using it over OGNL, but again, that is only in the very early discussion phase and may or may not ever happen.