Experiencing JSF 1.2: Good but Needs a Framework

I’ve got an opportunity to experiment with JSF 1.2 while preparing a lecture about DbUnit Express and test webapp for JSF EL Validator. Same as JSF 1.1, it’s much easier to use than the low level, too HTTP-ish servlets but still it is not flexible enough and usable per se, it is absolutely necessary to use a decent framework (such as Rich or ICE Faces) to be really productive. Automatic value and method binding is cool but not sufficient.

For example forcing dataTable to get filtered when you change selection in a select list was rather non-trivial and making the table sortable by every column required quite lot of work and if I wanted to have that for every table, I’d need to develop framework of my own. Of course with various JSF component libraries you get such things out of the box but still JSF 1.2 is little to rigid, for example methods that could take parameters (which came in JSF 2.0) would make things a lot simpler.

I’ve also considered using business objects – such as EJBs – directly as JSF backing beans but I feel that in this version it might be suitable only for small applications (where the overhead of concern separation doesn’t pay off) or  some special ones. The problem is that even though backing beans are POJOs, JSF still forces them to a rather specific shape, which should be confined to the web layer  – such as having action methods that take no parameters and return an indication of which view to dislay next.

I would very much like to experiment with and compare other interesting frameworks such as Play!, Grails, and GWT (and given that I’ve finally got to learning Clojure, perhaps also Compojure), though I likely won’t have time for that. If I do, you will come to know 🙂

Related posts

Published by Jakub Holý

I’m a JVM-based developer since 2005, consultant, and occasionally a project manager, working currently with Iterate AS in Norway.

4 thoughts on “Experiencing JSF 1.2: Good but Needs a Framework

  1. Good?!?? I still remember JSF in my worst nightmares. I’ve rarely ever seen a ‘framework’ that introduces so much bloat and solves so little actual problems (back-button, anyone?).
    What’s the point of using JSF if you’ll anyway need to use an additional framework to be really productive? It just adds an extra complicated level to your stack of dependencies.
    I recommend to everybody before starting a project using JSF (and some other framework on top of that) to seriously consider and evaluate other web frameworks, such as wicket or tapestry. You’ll be amazed how productive you’ll be with those, as they solve actual every-day problems of web developers.
    Really! Don’t use JSF! You’ll suddenly hate your job and may want to stab yourself several times a day. 😉

    1. Hi Kurt,

      thank you very much, real-life experience is always welcome.

      Which version of JSF do you speak about? I’ve used JSF 1.1 before and I felt some of the pain, 1.2 is better – and at least in some cases it really is productive, JSF 2.0 should be much better.

      As you say, alternatives should always be evaluated – and that with respect to the application and its needs as there is no golden bullet.

  2. I don’t usually make shameless plugs like this, but since you said you’d try other frameworks… give Wicket a try! It is component-based (like JSF), but the separation between code and markup is much cleaner,and the API is much more intuitive.

Comments are closed.

%d bloggers like this: