views:

689

answers:

6

I'm looking to create a new app from scratch and will probably use Spring MVC and possibly Spring Web Flow. The projects created by Spring Roo use Spring MVC and optionally Web Flow. What are some good alternatives for view technology, or is JSP with spring and jstl taglibs and jquery the way to go?

+2  A: 

I use Stripes and Spring together. Stripes stays out of your way most of the time, but augments Spring nicely when you need it I find.

Quotidian
+2  A: 

I am using velocity and Spring MVC. Also, i am hosting my application on Googles App engine and I have no issues.

Athens
+3  A: 

Technically, the only alternative to JSP is Facelets. As far now JSF is the only MVC framework which can run on top of Facelets. And with much success actually. Facelets fills the shortcomings of JSP to a high degree. The templating capabilities and the possibility of using composite components are great.

For Spring MVC there are technically no other alternatives than JSP. You can put some extra abstraction layer in between in flavor of a templating framework like Velocity or Freemarker, but it's after all still "on top of JSP". Facelets is entirely distinct here.

BalusC
I've been using facelets for the last 2 years, and am just moving to jsf 2 in another project. Thanks for the input.
digitaljoel
+1, the only answer that differentiates between "view technology" and "view handler/resolver/template engine"
Bozho
I don't get the still "on top of JSP"? Do you mean it still sits on HttpServletRequest. Why is Freemarker not an alternative. Doesn't it support tag libraries?
Adam Gent
+2  A: 

Velocity is the best alternative as far as view templates that you can use with Spring MVC. If you're open to component-oriented web frameworks you could try Wicket or Tapestry, and ditch Spring MVC. If I was going to use JSF and Facelets I would be apt to use Seam and would try using EJB instead of Spring.

Nathan Hughes
Why is it the best alternative? The error checking in velocity is pretty bad. So why is it better?
Adam Gent
@Adam: it is a lot simpler, and doesn't allow scriptlets, I count those as improvements over JSP. I remember writing tests for my velocity templates was pretty simple too.
Nathan Hughes
+2  A: 

Spring MVC provides integration with many different view technologies. I would recommend using FreeMarker or Velocity.

yfrangi
+2  A: 

Springs documentation also suggests Freemarker. Freemarker is (as far as i can tell) fast and has some integration of spring features like binding.

deadsven