• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Spring vs. Struts

 
Ranch Hand
Posts: 838
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm getting over the basics of Java programming and I'm looking over web frameworks and such. I've heard both Struts and Spring come up numerous times and I was wondering (hopefully applicable) why choose Spring over Struts or vice versa? I don't want to jump into learning one over the other if the latter is the better. Since this is a Spring forum I'll assume most people prefer Spring over Struts, but why? Thanks so much in advance for helpful insight into what best to use and for what reason.
 
author
Posts: 469
20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rob,

Spring is a platform for developing enterprise Java applications. Struts is only a web framework. Spring also has a Spring Web MVC framework which is quite sophisticated.

regards
ashish
 
Saloon Keeper
Posts: 26295
186
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You don't "prefer Spring over Struts." Spring and Struts are not mutually exclusive. Nor, for that matter are Spring and JSF, which is what I've beein using since I moved on from Struts.

In point of fact, most of my recent webapps are Spring+JSF apps. While I don't have much use for the Spring MVC subsystem, which is the one part of Spring that does kind of run as an alternative to UI technologies like Struts and JSF, I do have one app that even mixes a little Spring MVC in with the JSF.

In my JSF apps, the persistence layers are entirely Spring-based, as are certain other pluggable subsystems, such as emailers that I like to swap out for testing purposes.
 
Ranch Hand
Posts: 608
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've been thinking along similar lines...comparing between Spring MVC and Struts-2 and I find both frameworks to be pretty good enough

I guess the technology to prefer would depend on the team and existing code base. Spring can integrate very well with Struts too!!

If you want to learn a technology I'd say Spring because it is so much more than just MVC...On the other hands its really vast and learning it can be more difficult than Struts.
(Struts is just a MVC framework, Spring is well ... everything!!!)


 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic