Convergence in Java web frameworks? Probably Not.
Carlos Perez blogged:
Driving to work I realized that 3 java standards are converging towards a common framework for web development. These 3 are Struts, JSTL and JSF. Two of these are lead by the same person Craig McClanahan.
I don't think you will see convergence in all of the web frameworks - that is a bit much to ask considering the fact there are many different approaches to the same problem of building web apps. What we may see is a single framework "supported" by Sun which consists of Struts, JSTL, and JSF. If that is the case then that framework will continue to grow its userbase, but that doesn't necessarily mean it will be better than any of the other frameworks out there.
Perhaps its just me, but tag libraries disturb me. Personally I prefer Velocity for the view and then some other means for the controller (in my case, JPublish), but putting personal preferences aside I would still rather see things done as they are in Tapestry (any tag can be a dynamic element if it has the special Tapestry id) as opposed to tags which become another programming language.
If you want MVC and you believe in MVC then you should keep the controller out of the view and vice-versa. Including logic tags in the page for anything other than view logic (i.e. using foreach to display a list of items is OK) is asking for trouble.
[All Things Java]
Craig follows all 3 pretty closely and will be using JSTL with both JSF and Struts so I certainly expect convergence. I personally don't quite understand the relationship between JSF and Struts yet; they do seem to do similar things.
However both Struts and JSF are predominantly controllers which support pluggable view technologies, so you can use JSP/JSTL or Velocity or other tools if you like.
I don't quite follow why using tag libraries (XML markup) in the view tier like in JSTL disturbs you, since page authors typically work with markup all day. They are typically not Java developers so often they don't comprehend the beans you can use in Velocity, whereas tags are easier to document for page authors.
Incidentally JSP 2.0 looks pretty close to Velocity with a similar expression language. The main difference between the two is JSTL uses XML tags for directives rather than Velocity's # notation and a lesser reliance on using Java expressions favouring XML markup slightly more.
FWIW just to confuse matters, Jelly is similar to Velocity but is more XML-centric, using XML markup to denote directives and can implement JSTL also.
9:01:14 PM
|