My first exposure to real programming was with the Java platform. I spent my first two years in technology learning Java and that platform’s web-specific frameworks for developing applications. At that time JavaServer Pages (JSP) was a relatively new technology and Servlets had been the real work horse. Of course now the landscape has changed and web frameworks have dramatically improved. It’s laughable to think of presentation code being generated by Servlets these days, legacy applications excluded, of course.
The hot new framework at the time was Struts. The idea of MVC was not exactly new but bringing it to the web was a very interesting idea. Struts was pretty much the greatest thing since sliced bread to every Java developer doing web programming. Personally, I just couldn’t grasp it. I was too new to programming in general and that framework was simply over my head. I stuck with my JSPs and Servlets.
Shortly after my time ended at that company and I started working at VCU, I was exposed to Microsoft’s .NET framework. This was roughly in the spring of 2003. Even though my bachelors program was focused around Java, I spent a lot of time devoted to .NET. The Imagine Cup project consumed a year of my life and was completely in .NET. I think at one point we had counted nearly 100,000 lines of code in that project. One of my higher level courses was somewhat language independent and I ended up using .NET there as well. I essentially had moved on to what I considered greener pastures and had no interest in looking back.
After school, which was winter of 2005, I had a number of jobs that were all specific to .NET. I worked with GIS technology, built some very interesting AJAX/C# applications, and rebuild Richmond.com. Simply put, I know the platform very well and had really invested myself it in.
Everything changed one morning last September. I was sitting in a room with my buddy Matt and the CEO of his company. Originally I was there to chat with the CEO and find out if there were any areas I could help the company in, on a consulting basis. By the end of our conversation, I had a job offer on the table which I happily accepted. The kicker was that the company was a Java shop and it had been a number of years since I had done any real Java work.
Since the start of my new job I was actually doing everything in C#. I built a new company web site, created an automated way to transfer and validate data, and a few other miscellaneous things. It wasn’t until a month or two ago that I actually picked up Java again for something real.
What I quickly noticed is how much had changed since I left Java. Nothing! Struts is still around, only with a new version number, JSP and Servlets don’t appear to have changed at all, and now there are dozens of web frameworks out there trying to fill a void I can’t seem to find. The only “Sun sponsored” framework I’ve seen is JavaServer Faces (JSF).
In my search for a framework I looked at Spring, Struts 2, and JSF. I decided to go with JSF. Where JSF stands out in comparison to the others is in the simplicity of getting started and the ease of use. Struts has been and will always be a monster to set up and code with. Spring is a monster of a framework that pretty much does everything you could want. That’s all well and good, and a lot of people swear by it, but for what I wanted it was just too much to take in. I just wanted to get started on a web application. I wasn’t interested in AOP, Dependency Injection, ORM tools, and the other things Spring includes.
JSF provides a fresh and simplistic approach to MVC. Frankly, a framework that didn’t follow MVC wasn’t an option for me. Anyone who knows me knows how nutty I am over architecture, design patterns, and elegant solutions. JSF is a great solution for MVC, while maintaining an environment where I can understand how everything works. The lack of “automagic” is a good thing and I appreciate JSF for it. Working with JavaBeans in JSF is a dream and a fundamental aspect of the framework. The abstractions of Models and Controllers aren’t enforced by JSF, but rather implicit by design. It’s my call on how I structure my Java code and I simply inform JSF by using the faces-config.xml file. JSF gives me an easy environment to implement a “domain driven” model, my interpretation of it at least. I’ve stuck with that programming model for this project and it has worked out incredibly well.
What’s really shocking to me is that JSF has not caught on in the Java community as I would have expected. It really goes to show you how important the community is in Java. Had this been in the Microsoft camp, it would have been devoured and sword by immediately. In that world, Microsoft is your dictator and what they say goes. Sure, there are successful open source projects, but it’s nothing like the Java community. There are so many options it can almost become a problem but that’s another subject I guess.
I’ve enjoyed JSF, a lot. It has it’s problems. For me, most notably, the lack of URL importance. I think a lot of people have not bothered to give JSF the proper look it deserves. Many pass it off as being complicated. I’m very surprised by that as I’ve found it extremely easy and open to work with. If you’re starting a new web project and want a fresh look at web development, take a peek at JSF, you might like what you see. I sure have.