The Easy Way to Select a Java Web Framework

Posted by rob on December 11, 2008

Sorry for the delayed post. Things have been very busy lately. Besides, I just don’t get around to writing as many blog articles now that I use social networking applications like Twitter and Facebook.

The most difficult part of writing this article was getting started. I didn’t want this article to be another taxonomy of Java web frameworks like my original article. Instead, I wanted this article to present a pragmatic way to select a framework that is easy and matches the things that you and your team find valuable to software development.  Let’s get started.

Instead of looking at the numerous features of web frameworks, I’m instead going to focus on three high level categories. They are “safe choice”, “cutting edge” and “rich user interface”.

Safe Choice
If you work for an enterprise where going with the tried and true is looked upon more favorably than taking a risk on something new, then you fall in to the “safe choice” category. Another motivation for going “safe” is that you want a standard set of Java and web technologies to work with. Since JSF is a Java specification, many of the major JSF implementations will work here. If you go down the JSF path you will most likely end up looking at JBoss Seam to work as a middleware solution for your JSF front end. There are a lot of folks out there that do not like JSF. If that is the case then your best choices are Spring MVC and Struts2. With Spring MVC you will most likely also be looking at using the Spring Framework and Spring Web Flow for your middleware. The Spring suite of software libraries is immensely popular these days and their penetration into the enterprise has been immense. Struts2 is for those who feel like it is the best migration path for existing Struts applications. Remember that Struts2 isn’t really a Struts upgrade. It is actually the wonderful WebWork framework that has been refactored, renamed and adopted by The Apache Software Foundation to be to the formal replacement for Struts.

Cutting Edge
If you work in an environment where management is more tolerant of trying new technologies, you are on a team that has a ton of Java web experience or you are simply excited by trying new things, then selecting a “cutting edge” framework may be for you. Without going too much into these frameworks, I will simply list out some of the popular frameworks that fall into this category. They are: Tapestry, Stripes, Wicket, Ruby on Rails on JRuby and Grails. These framework are either not adopted to the extent that the “safe choice” frameworks are, or they employ the use of dynamic languages. An interesting choice in this category is Grails, because it is written on top of Spring MVC, which is a “safe choice” framework.

Rich User Interface
Do you need a rich user interface instead of a more standard HTML one? Do you want a full AJAX interface instead of one with small amounts of AJAX mixed in? Only you will be able to answer these kinds of questions based on your business and technical requirements. If you answer “yes” to either question, then you are in what I consider the be the “rich user interface” category. And by definition if you want a rich user interface, then you have already left “safe choice” category. I don’t have as much experience in this category, so I will tread lightly. Choices in this category include Google Web Toolkit, Echo, ICEFaces (also a JSF implementation) and the new JavaFX.

Conclusion
There are countless choice, but selecting a Java web framework doesn’t have to be hard. You just need to know your environment and values that are important to you. Not making a choice at all will make selecting a framework hard, so don’t let this decision take too long. Regardless of what Java web framework you end up selecting, the days of using only one framework is a thing of the past. If your selection isn’t working out or if you think some other framework is a better choice for another application, then by all means select a different framework. Good luck.



Trackbacks

Use this link to trackback from your own site.

Comments

Leave a response

  1. Randall Thu, 11 Dec 2008 15:05:14 MST

    Actually, Seam doesn’t only support JSF - it works with a lot of view technologies, including JSP, RichFaces, ICEfaces, GWT, Wicket, and even Flex (just to name a few). You can even write your app in Groovy, integrate with Microsoft Excel. It’s actually as powerful (probably more so) than anything Spring or Spring Web Flow has, and yes, it can even integrate with Spring. For those new to Seam, check out Peter Muir’s introduction.

    Also, you didn’t mention Web Beans (JSR-299), which is part of Seam 2. And Web Beans will work in an app server or in Java SE.

  2. Randall Thu, 11 Dec 2008 16:10:50 MST
  3. Kristof Jozsa Fri, 12 Dec 2008 09:20:44 MST

    Smart list, but you left out (incidentally or not) the whole javascript-widget library approach which includes Ext.JS and Isomorphic SmartClient and can be wired with the serverside easily using eg. DWR.

    I really hope Wicket will move to the safe choice category in the upcoming months/years.

  4. links for 2008-12-15 « pabloidz Mon, 15 Dec 2008 12:02:06 MST

    [...] The Easy Way to Select a Java Web Framework Evolutionary Goo (tags: java) [...]

Comments