Friday, 24 December 2010

JSF: It's Not as Bad as You Might Think

A few people have contacted me privately to ask why JSF isn't on the outline for our forthcoming JavaEE course. They're right: it should be in and I was just wondering why I'd omitted it in the first place. I think my subconscious must have been holding on to a few old prejudices.

I first came across JSF a few years ago when a project I was working with had decided to use JSF (JavaServer Faces) for their web front end.

JSF was relatively new, very few projects had used it at the time so they were a pretty pioneering project.

The only problem was, the programmers on the project, who had no say in the decision, were finding it quite hard to use. So they asked if would mind come in to help get them started.

Now, I explained that I didn't like JSF and thought it a bad choice. But they had worked with me on some other training and reasoned that I'd be able to explain JSF without being a fan, and as long as I could get them started with the subject, they wouldn't mind me being negative about it, since they had no choice in the matter anyway.

So, nervously, I did a quick "getting started in JSF" course for them.

I had a miserable time, but I did my best at getting the project up and running (and they were a lovely group, despite hating JSF they treated me well). I warned them that despite the training, they were going to have a painful time and had better get a very good debugger. (One blogger brilliantly said "we needed a ouija board, not a debugger!")

Two years later, I bumped into one of them and he said "hey Rich, you're the one who made us use JSF!". I had to buy him several beers to persuade him not to kill me. A good illustration of how the messenger is often the one that gets shot.

Anyway, that's a long story and best left in the past, but it did make me rather biased against JSF for years. So much so, that when designing the course outline for our forthcoming JavaEE course, I left it out.

But, the thing is: JSF is now much, much better. It's officially called "JSF2", and whilst I would still maintain it's not the best framework in the world, it is now usable, friendly, well implemented and perhaps most importantly, is supported with some excellent third party component frameworks like PrimeFaces.

I've now used it on a major project (this time, my own choice) and I really enjoyed using it. In future, I'd probably choose Wicket, but it's good enough to Get Stuff Done.

So JSF2 is an integral part of JavaEE, and I certainly need to include it in the JavaEE course, even if it isn't right for everyone. Thanks for the feedback, and look out for the new course early in the New Year.

This course is going to be a real acronym soup: JavaEE, J2EE, EJB, JPA, MDB, JMS, JSF, JAXB, Jax-WS, Jax-RS and probably a few I've forgotten!

No comments:

Post a Comment