Nobody Uses JavaServer Faces
So, I’m going to take a quick detour from Cocoa development for a moment as at my day job I am working on a Java project. The application simply displays a list of items on the first page and then provides a link for each item to a details page. It’s pretty simple, however, it’s taken me two weeks to get it to the point where it actually displays the data. Now I’m working on formatting fields so that dates don’t just display as unix time stamps and fields that are labeled “Reachable” display as “Yes” or “No” rather than as “true” or “false”, etc.
I am using JavaServer Faces for the project as the technology to be used was specified in the design. If you’re not familiar with JSF, it’s a bit like Java Struts. It uses tag libraries, but it does a good job of implementing a true MVC (Model View Controller) architecture. My kudos for the technology, however, stop there. I’ve read many articles touting how JSF is going to be the great new web development technology that everyone will be using. It constantly gets compared to ASP .NET and seems to nearly always come out on top in such comparisons. Yet, I have yet to find any redeeming qualities. As much as I despise ASP .NET, it is a dream compared to JSF.
A quick word from our sponsor:
Get 250GB of Web Space and 2TB of traffic for $5/month
I can’t debug anything with break points as everything is compiled into a java class at run time and all I ever see are tags, not Java code. It is so far abstracted that I can’t get to the guts of it if I tried. If you recall, I am not terribly fond of black boxes and this has got to be one of the worst ones I’ve seen yet. I will complete the project using JSF, but I am not impressed in the least. If the design didn’t have mandated that I use JSF, I would have had this project done the same day it was assigned as I would have written it in PHP. It’s the right tool for this job, frankly.
And that brings me to the point. JSF is a technology that looks good on paper, but when it comes to actually using it, it stinks. I have come to the conclusion that nobody uses JSF simply because when I do a web search to find the answer to the simplest of questions, I find nothing useful. Sure, there are tutorials out the wazoo, but not a single one of them is shorter than 15 printed pages and most of them show you how to make some retarded calculator application that is in no way any sort of representation of a “real-world” app. Fifteen printed pages to demonstrate a calculator? Wow! JSF is impressive!! Maybe fifteen pages is an exaggeration, but I’ve seen many tutorials that are very long and by the end of them all you’ve done is taken input from the user in a single text field and responded in a new page with “Hello {name}. It is currently {datestamp}”. Not exactly useful or helpful.
Ok, I’m done ranting. If JSF is your favorite technology (though I doubt there is a single soul that cares in the least–time will tell), I’m sorry if I’ve stepped on your toes. You probably will surmise that I just don’t understand it well enough. That may be true, however, there is overwhelming evidence that the people who use it are few and far between and very few people consider it worthy of writing a proper tutorial with reasonable explanations. The bottom line is I’ve done a lot of web applications in my career, and I would *never in a million years* choose JSF to build a web app. It’s nearly unusable. Don’t get me wrong. I am getting the project done, but that’s a testimony to my own development skills, not how great the technology is. JSF stinks. That’s my story, and I’m sticking to it. Feel free to disagree in the comments.