Friday, November 23, 2007

JSF - My experiences

For the last two-three months I have been working on JSF (My Faces) with facelets. The experience has been good for most parts. The components available out of the box with JSF implementations (standard, tomahawk, richfaces etc.) have been of great help with development. The decision of using facelets was a good one. It helped to make the view much easier to format for user experience. With all these good things, I found some really seemingly trivial but irritating issues.
- Handling blanks with input fields that are bound to non-string values is a problem (though luckily solutions are available - specific converters).
- There were scenarios where I switched from tomahawk components to standard components for making things work. The reason for which I never could understand.
- A navigation rule syntax which is really very verbose.
- A backing bean which can get quiet large and unwieldy depending on the features to be handled.
- Making pop-up screens for lookups etc. - I could never get it working.
Some of these can get irksome, but I still felt that with Facelets, JSF makes web development far more easier.
I would like the JSF gurus to throw light on how these problems can be handled and also add on to the list of the advantages and issues of JSF. It would be of great help to me and many others


Fiz said...

I agree with you Srini. JSF & Facelets go hand-in-hand pretty well. BTW, I am not a JSF guru.

A year ago I was trying to build a moderately simple webapp using JSF with JSP views and Tiles for templating. At one point, it got quite ugly and I realized that JSP is not the way to go with JSF. JSP's dynamic content generation doesn't go well with JSF's component-based model.

To your point about backing beans getting bulkier, I agree to some extent, but then my approach would be to split 'em up into one or more backing beans based on their functionality.

I was quite not happy with navigation rule syntax as well. It got worse when I started using Ajax (ajax4jsp) in my app.

For sure popups are pain in the neck. Will update how I worked around this issue.

More Specification-Less Implementation
I haven't used JSF in more than a year now, but at least as of earlier last year I felt JSF still lacks lot of implementations compared to it's long list of specifications. That's where lot of vendor products like ICEFaces, RichFaces, etc. come into picture with rich & quality components saving us from re-inventing the wheel.

Srini said...

Check out this blog from Hookom (the facelet guy)