June 27, 2006

Why JavaServer Faces?

"Why would you use JSF?", a curious student asked.

The question was asked in the context of a brief discussion about Struts and JavaServer Faces at the end of a day of focussing on JavaServer Pages and the Servlet API.

We only had a few minutes left so I congratulated the student on his question and deferred it to another day. But it set me thinking. It has been a couple of years since I first delved into JSF and I haven't used it on a serious project since.

One of the stated benefits of JSF is ease of use. Sure, there are tools that enable easy drag and drop style development but that's not the whole story. It's still important to understand the technology behind the tool and I think it's fair to say that there is significant complexity in JSF.

A couple of years ago I had the impression that J2EE developers were in general underwhelmed by JSF. It's now June 2006.

Are you using JSF or intending to? If so, why? If not, why not? (No points for answering "because it's a standard".)

Posted to Software Development by Keith Pitty
Comments

Actually, the core of JSF from a user perspective is quite simple. Getting down to the nuts and bolts is more complex than it should be, (and this is something that *MUST* be fixed for JSF to truly succeed) but ordinary JSF users should not need to understand JSF at that level. I consider it a huge failure of the JSF docs/books/articles that so many irrelevant things are presented to users.

It's not a perfect technology, but it has the right model. (component based - not action based) Moreover, the truly nice thing about JSF is that almost everything is replaceable. If you are building a new web application framework, I would suggest that the ONLY sensible choice is to build upon JSF - integrating your enhanced functionality on top.

Don't like JSP? Plug somethfacelets on top for a template-based solution?

Don't like the JSF managed bean model? Plug in your own bean model on top.

Don't like the navigation control? Toss in something entirely different.

These aren't hypotheticals either - just look at what we've done with Seam on top of JSF. At the risk of sounding both biased and immodest, it's pretty brilliant. But even at that, it's just the beginning. We've got a lot more to do with it with Seam, and then there's other frameworks like Shale pushing on it from other directions. It's a good place to be.


Posted by: Norman Richards at June 28, 2006 7:47 AM
Post a comment









Remember personal info?