views:

573

answers:

3

After having read and used (made a web application using Struts/Hibernate last semester) Struts1, I want to step forward in learning a better MVC framework. I have been wondering if it would be more prudent to learn Struts2 now and Spring later, or skip Struts2 for Spring directly?

+2  A: 

I would suggest not treating the two as mutually exclusive. Struts2 competes with Spring MVC, but Struts2 uses Spring's injection container and AOP capabilities (Spring core and AOP).

Struts2 and Spring MVC are both working to achieve the same results: a clean MVC web framework. Deciding between the two will be to some extent personal preference. I personally did not like the "feel" of working with Spring MVC, while Struts2 and it's interceptor stack felt much more comfortable to work with.

I would suggest that you work though a few tutorial "hello world" type apps in each framework and see which feels more intuitive for you to work with. Both frameworks have strengths and weaknesses, but all of them can be overcome.

Rich Kroll
And I'd say the opposite; spring mvc feels better than struts2 ;)
krosenvold
A: 

Adding to Rich Kroll points, Struts 2 provides rich tag libraries and the framework is very well organized.

A: 

Apart from the other answers, bear in mind that Struts2 is not what the name suggests: it's not really the next version of Struts (1), it's more like the next version of Webworks. If you come from Struts, Struts2 and SpringMVC are similar alternatives, also in the ease of learning.

leonbloy