One of the projects I work on involves heavy JSF usage. Along with other tools to make our life "easier" (Facelets for example) the project runs quite smoothly. Right up to the point where a little bit more "custom" solution is required...
Here's the problem: I need to call a method that will return some JSON that will be evaluated by the client and according to the result of this operation some action must be taken.
As long as I wanted to use the rather limited XMLHttpRequest capabilities provided by Ajax4JSF I was fine. Now I need a little bit more control and flexibility over the actual flow and I am screwed. I'm not really interested in the whole life-cycle of a JSF page and all that statefull crap JSF provides - all I need is a simple call to a method and return a little bit of text - that's all.'
So far I've not found a single thing that I like about JSF (MyFaces and RichFaces in particular). To start a project it's a configuration nightmare (if you want to have more than one JSF component library like RichFaces and Tomahawk), some things are simply incompatible. RichFaces force me to use stone-age version of jQuery (my favorite and better with each release), mix things that don't really come together (like server-side code being "executed" by so called "client actions" for example). The whole beautiful stateless nature of the web is gone with the wind in the worst possible style. And last but definitely not least: there's no control whatsoever over the generated markup, nada, zipp, null... And let me tell you, it's huge!
No wonder that MVC-based solutions (Spring MVC, ASP.NET MVC, Rails, Django) are getting more and more popular. Those are actually non-hammer tools to get the job done without 100-line exception messages getting in a way.
And don't get me wrong: I'm sure JSF is good for something - it just so happens it's not the creation of highly interactive, flexible and customizable Web 2.0-enabled enterprise applications.
"Close encounters my a..." - John Criton / Farscape.