RSS Feed Subscribe to RSS Feed

 

Web frameworks

There is no right answer to the question of what is the best Java web framework. Still I end up asking it to myself every time a new project crops up.  I did a post on a related talk I saw at JavaOne last year, which provoked a lot of debate and some really interesting responses. More recently, this report from Zero Turnaround is useful and this comparison from Matt Raible is also well written.

I have also been swayed in the past by the Thoughtworks technology radar in which component based frameworks (which, I think, in the Java world includes JSF, Wicket and Tapestry) get a thumbs down e.g. see the May 2013 radar.  GWT has also in the past (see July 2011 radar) been singled out as something to avoid.  Presumably Vaadin falls in to the same ‘hold’ category.  Full disclosure, I’ve had limited exposure to these types of frameworks personally though.

My own preference remains Spring MVC. It is relatively easy to setup (especially with Spring Boot), provides decent testing support, and obviously integrates well with the rest of the Spring ecosystem.  I am admittedly biased due to already knowing Spring core, but so be it.

My recent, albeit limited, experience with Struts2 is that I have been fairly pleasantly surprised.  It wasn’t as bad I was expecting! The Action classes, which are instantiated for each request, and hence threadsafe, are fairly easy to use and test.  I am not so fond of the xml mappings and the variable passing that gets done there though.  It seems kind of clunky, although there may be a better way I am not aware off.

Still, I am not likely to start using Struts by choice on my own projects anytime soon. Spring MVC remains my go-to web framework.

 

 

 

Tags: , , ,

Leave a Reply