This post originated from an RSS feed registered with Java Buzz
by Norman Richards.
Original Post: JavaServer Faces is the new Servlets
Feed Title: Orb [norman richards]
Feed URL: http://members.capmac.org/~orb/blog.cgi/tech/java?flav=rss
Feed Description: Monkey number 312,978,199
A recent TSS post had in interesting comment about JSF at the end that I can't help but comment on:
"Some JSF experts can (and have) shown various ways to modify JSF's phases and presentation layers such that nearly anything can be done within JSF's overall framework, but just because something can be done doesn't mean that it should be done. "
What is interesting about JSF is not that it is a great framework by itself. JSF is interesting because it is a great framework for building a web framework. I would compare it to the Servlet specification. Servlets are rather dull little beasts. The API is entirely un-clever, and nobody in their right mind would use to build an application with. Yet, even though almost nobody every writes a doGet() or doPost(), we all use the Servlet spec every day because every single web framework is built upon it. It handles the most mundane part aspects of request-processing, leaving the real work of being a web framework to ... the web frameworks.
Unfortunately, the web frameworks built on servlets don't have that much to build upon. The simple request-response model is not a very high abstraction, and what we tend to end of with is either very simplistic action-based frameworks. Frameworks that try to reach higher each have to reinvent everything. They look wildly different and none of them can really build upon the others in any significant way. Is it any wonder that there is such a backlash every time someone inflicts yet-another-web-framework on the world?
JSF helps out here, because it raises the level of standards way beyond the action frameworks bringing a standard model for component-based web development. You know, being able to code your web UIs in a way that more closely resembles the way you would create a non-web UI, with real objects - state and behavior and even events. (*gasp*)
JSF isn't a closed the-framework-ends here technology. It's a building block that other technologies can build upon - just like the Servlet specs. I'll use Seam as an example. Seam is able to leverage the high level of abstraction provided by JSF to provide an even more advanced application framework. Seam isn't the only framework being built upon JSF, it was just one of the early ones. There are others, and I think the coming year will only bring more. I'll go out on a limb and say that I really don't think we'll see any significant Java web frameworks this year that aren't built upon JSF. I just don't see how you can NOT leverage the technology and create the kind of sophisticated environments that the frameworks that do utilize JSF provide.
Closing thoughts
JSF is just a tool. It's the new Servlets, the new baseline on which interesting web frameworks can be built. It is usable by itself, but then again so are Servlets. I just don't think you'd want to. Extending JSF is not a hack, it's the right way to be using the technology. The web frameworks you'll be using in the future will be JSF based, so it probably would be a good idea to pay attention to it.