Choosing a Java Web Framework now?

cosmos picture cosmos · Jan 18, 2010 · Viewed 97.3k times · Source

we are in the planning stage of migrating a large website which is built on a custom developed mvc framework to a java based web framework which provides built-in support for ajax, rich media content, mashup, templates based layout, validation, maximum html/java code separation. Grails looked like a good choice, however, we do not want to use a scripting language. We want to continue using java. Template based layout is a primary concern as we intend to use this web application with multiple web sites with similar functionality but radically different look and feel.

Is portal based solution a good fit to this problem?

Any insights on using "Spring Roo" or "Play" will be very helpful.

I did find similar posts like this, but it is more than a year old. Things have surely changed in the mean time!

EDIT 1: Thanks for the great answers! This site is turning to be the best single source for in-the-trenches programmer info. However, I was expecting more info on using a portal-cms duo. Jahia looks goods. Anything similar?

Answer

Pascal Thivent picture Pascal Thivent · Jan 18, 2010

Is portal based solution a good fit to this problem?

Personally, I would stay away from big fat Portal solutions (they are often productivity killers). I've heard good things about Gatein though but I don't have any real experience with it.

Any insights on using "Spring Roo" or "Play" will be very helpful.

About Spring Roo, I've read previous answers like Spring roo Vs (Wicket and Spring) and other things over the Internet but I'm still not convinced (maybe I don't get it), I'm not sure of its maturity, and, more important, I'm really wondering what SpringSource is doing with Grails and Roo (no, Grails vs Roo - why SpringSource is pushing two very similar technologies? doesn't convince me that they will both survive).

I can't say much about Play. I've seen the demo like everybody but I would like to read real life feedback. Until then, I'll wait.

I did find similar posts (...). Things have surely changed in the mean time!

Yes and no :) But let's enter the presentation frameworks hell: there is no single answer to your question (like one year ago), there are dozen of frameworks around there and no clear winner. Just to cite a few:

  • JSF: Lots of skeptics about this component based framework, including me so I'm not the best one to talk about it but...
  • JSF 2 (+ CDI/Weld): JSF skeptics are encouraged (by Gavin King) to "take a second look". Indeed, I think that JSF 2 is a big improvement, especially with CDI, but... it is still pretty new (understand, it lacks of feeback). If you want to embrace Java EE 6, check it out though.
  • Wicket: Another component based framework that is getting more an more attention. I hear mostly good things about it: simpler than JSF, nice design, high testability, HTML designer friendly, etc. You may like it.
  • Tapestry: Just don't (see Why did you stop using Tapestry?)
  • Struts 2, Spring MVC, Stripes: Action based frameworks. All decent and will cover your needs (personally, I like Stripes and its convention over configuration approach, see Stripes vs. Struts2 to get an idea of it).
  • GWT, Flex, Grails: These aren't maybe not what you're looking for. I can't really talk about (recent versions) of Flex and GWT but I know that Grails does have some fans.

Actually, I'd suggest to take a look at Matt Raible's presentations, he really did a great job at comparing web frameworks, showing their strengths and weakness, gathering facts and numbers, showing trends... I recommend:

Really, have a look at these presentations, they will help you to find an appropriate framework (there is no unique answer but you can restrict the choice by elimination) and might change your point of view.