Matt RaibleMatt Raible is a Web Developer and Java Champion. Connect with him on LinkedIn.

The Angular Mini-Book The Angular Mini-Book is a guide to getting started with Angular. You'll learn how to develop a bare-bones application, test it, and deploy it. Then you'll move on to adding Bootstrap, Angular Material, continuous integration, and authentication.

Spring Boot is a popular framework for building REST APIs. You'll learn how to integrate Angular with Spring Boot and use security best practices like HTTPS and a content security policy.

For book updates, follow @angular_book on Twitter.

The JHipster Mini-Book The JHipster Mini-Book is a guide to getting started with hip technologies today: Angular, Bootstrap, and Spring Boot. All of these frameworks are wrapped up in an easy-to-use project called JHipster.

This book shows you how to build an app with JHipster, and guides you through the plethora of tools, techniques and options you can use. Furthermore, it explains the UI and API building blocks so you understand the underpinnings of your great application.

For book updates, follow @jhipster-book on Twitter.


Over 10 years ago, I wrote my first blog post. Since then, I've authored books, had kids, traveled the world, found Trish and blogged about it all.

JSF still sucks?

Granted, this post about how painful JSF is is almost 6 months old, but I think it's still mostly true.

Want to compare times? More than three man-weeks have been spent fixing silly JSF navigation problems. A full CRUD AJAX interface with Spring MVC and prototype in the same project took four days, and there was no previous experience with Spring MVC.

If you're going to use JSF, I highly recommend Facelets or Shale/Seam. However, those are mentioned as well:

The default view technology is JSP, even when no one in the real world would recommend it; instead, use Facelets, or Clay, or some other non-standard framework. Not trying to be sarcastic here, since Facelets is pretty good, but this complicates the hiring and education of the team and in fact invalidates the selling point of Faces 'being a standard'.

IMO, Facelets is very easy to learn. If you know how to program JSPs with JSF, you should be able to use Facelets in under an hour. When we converted AppFuse's JSF flavor from JSP to Facelets, rarely did the body have to change - we just had to change from taglibs to XML namespaces.

When you are not working with persistent data (if you are living in a cave or developing wizard interfaces) there are two scopes to store model state: the session context, which raises concurrency issues and is not recommended by the Faces community, and the conversation/process/whatever context, which is not standard and imply installing shale or seam to put even more lipstick on the pig.

There's two problems with Shale and Facelets - the activity on these projects is very low. Shale still has its creators around, so even while its seldom used, you can probably still get your questions answered. However, Facelets seems to be suffering from "developer abandonment".

Conclusion: don't use JSF simply because it's a "standard". Use other frameworks that are more actively developed and designed for the web. For component-based frameworks, the most popular are Tapestry and Wicket. Less popular ones are RIFE and Click.

If you still want to use JSF, you should probably use Seam, but don't simply use JSF because it's a standard. If it was a de-facto standard, that'd be another story.

Of course, you could also help improve JSF 2.0. But that's not scheduled for release until late 2008. I'm sure 2 or 3 commentors will claim we'll all be using Rails or Grails by then. ;-)

Posted in Java at Apr 16 2007, 12:40:45 PM MDT 14 Comments

Of course, you could also help improve JSF 2.0. But that's not scheduled for release until late 2008
2008? Why bother, we'll all be using Rails/Grails/Perails/Pyails/Phails/Smails/Jails/Lails/Erails/ by then. :)

Posted by Paul Barry on April 16, 2007 at 01:43 PM MDT #

Glad I'm not the only one noticing it, I've tried this JSF thing now twice, first time I thought that it was my ignorance that caused myself not being able to migrate my own pet project. Second time I've tried it, I gave up since it doesn't give you any of the productivity gains promised by the tool vendors [].

As far as rails/grails is concerned, I disagree. Sounds like MDA revisited, or just another language to keep me busy (although I like some features of ruby)


Posted by Koen Serry on April 16, 2007 at 02:04 PM MDT #

Click looks quite nice. Matt have you tried it? Maybe you should give it a 10 minutes test.

Posted by Twice on April 17, 2007 at 01:40 AM MDT #

>> Conclusion: don't use JSF simply because it's a "standard".

Being a standard gives JSF a great advantage over other frameworks - there are so many third-party JSF component libraries which plays pretty well together. I agree that you should not use some framework simply because it is a standard, but if that gives you some extra benefits, you should think again. Anyway, people often forget that JSF is not just another framework but specification which aims to build ecosystem of other frameworks (Seam, Shale...), component libraries (Ajax4jsf, RichFaces, Trinidad, IceFaces..) and implementations.

Posted by Dejan on April 17, 2007 at 03:03 AM MDT #

You should bear some of the responsibility for the 'sucks' moniker on JSF since you are a member of the JSF Expert Group. Why didn't you fix these deficiencies from within the EG?

Posted by Craig on April 17, 2007 at 05:53 AM MDT #

Craig - when I joined the EG, JSF 1.2 was already largely underway. I tried to get better support for GET, but no one seemed to care. The good news is they do now and it's on the roadmap for 2.0. A lot of things are also fixed in 1.2. You might notice how the original post I linked to is largely about the MyFaces implementation. They still don't have a 1.2 implementation and it's been almost a year.

Posted by Matt Raible on April 17, 2007 at 06:14 AM MDT #

Hi Matt, I still have to find some time to write a follow-up post. There have been some people asking if the landscape has changed since. I don't foresee a good future for JSF, since the problem seems to be driven by the architecture. I mean, stateful was first and everyone migrated to stateless, for a good reason. Swing (and I know Swing *much* better than JSF) is not a productive environment when compared to any web framework, and JSF is trying to adopt that programming model.

Posted by Ignacio Coloma on April 17, 2007 at 06:37 AM MDT #

I work in an IT department within a corporation. The business doesn't care about technology decisions, they only care that a business need is satisfied. There are 20+ websites in various stages of evolution my team has to deal w/on a daily basis. The technology utilized for these sites was pretty much what was "Hot" for that period of time (remember when container managed entity beans were cool? or how about a JSP scriplet-based application?). The problem we have run into, is the myriad technology, frameworks and approaches taken for each site vary so greatly, that it makes maintenance a real pain to do and to find appropriate people to do it.

We're now in a refactoring / rewrite of all the sites because we're pretty much pinned down and unable to move fast enough to adapt to changing business needs. As part of the refactoring, we adopted JSF as the common framework for presentation. Yes, we're running into issues Mr Raible has outlined (and then some), but we're dealing with them. We've also needed to write a number of custom components, which some developers are complaining about having to do.

The positive side of things, is that we're in a better position now than the position we got ourselves into over the past 10 years. One of the reasons we chose JSF is because it is a spec. IMHO, Java presentation technology is evolving, but it seems like it is evolving from a JSF base, not some framework or OSS project.

When our first AJAX requirement was submitted, we incorporated Ajax4jsf and it wasn't a huge deal. To me, that was pretty "cool".

Posted by m@t on April 18, 2007 at 09:40 AM MDT #

No doubt, JSF is not yet the best solution out there. But, the 'wow' we are getting from our business users after converting a legacy applicatoin built using struts to JSF is enormous. We started from scratch on JSF rather than using shale and the usage of third party UI components, NetAdvantage for JSF by Infragistics, we were able to get the same UI as before reusing most of our back end java code. There were road blocks as well, but nothing major and plus with AJAX performance we were able to get, it was convincing enough to our devs to spend some time writing workarounds :).

Posted by Java on April 20, 2007 at 02:31 PM MDT #

MyFaces is very close to being certified 1.2 compliant. That said, the RI has been 1.2 compliant for over a year now and has released several updates. It's quality is much greater than the previous 1.1 releases.

Posted by Ryan Lubke on May 17, 2007 at 08:14 AM MDT #

About the GET stuff on the EG-- I must have joined 1.2 after your push for it because I don't remember it. I do remember that we've consistently drawn a line between POST and GET semantics for changing state (tons of threads on this over at TSS), but JSF 1.2 did make things easier for supporting GET (read here). Everyone has a right to their opinion, so I'm not criticizing you for your comments on JSF, only that you and Geary should start a club ;-)

Posted by Jacob Hookom on May 17, 2007 at 08:21 AM MDT #

I had used JSF in one of my earlier projects. I used facelets as well. I found the combination reasonably good. What I felt good was the set of components out there. Some of them are really top notch. And that improves productivity. I was thankful that I did not have to create them. And these components have a good amount of javascript in them. One thing I had less to do was write javascript. Most of the javascript requirements for my UI were hidden under components. That said, JSF does generate way too much javascript making it really difficult find your way to debug issues. But on the whole still seemed good to me. And with the needed changes could get better.

Posted by Srinivas Narayanan on March 10, 2008 at 07:37 PM MDT #

UPDATE: yes it still sucks I have been searching for a compliant way to either 1) Open a new window using a hyperlink and pass a parameter to it (hello 1995). 2) Find a modeless dialog pop-up. (why is this not an option in RichFaces??) Infragistics looked like it might have been a solution but the JSF1.2 version does not work with Glassfish. JSF might be the most painful technology out there right now.

Posted by Jeremy Leipzig on September 17, 2008 at 08:21 AM MDT #

JSF 2.0 is out, it is based on Facelets, and guess what... it still sucks!

Tooling is also practically absent, components are scarce (apart from IceFaces, RichFaces and PrimeFaces you don't find anything JSF 2.0... maybe Oracle will update their ADF soon).

Seems like JSF needs another generation to get things right... is this deja vu? [Entity Beans?]

Posted by jbx on July 17, 2010 at 08:44 AM MDT #

Post a Comment:
  • HTML Syntax: Allowed