I apologize if this question has already been asked, but what are the advantages to using Spring over Struts?
The majority of my development projects have used Struts with the exception of one project which used Spring, Hibernate, Ajax and JSF.
Also, do you see them as competing technologies where one will eventually fall by the wayside and can you give an example of when you would want to integrate Struts with Spring and use both technologies? (I can't think of any reason why you would want to use both in the same project).
Dependency injection
AOP
Transaction management are few
if you care for spring web services - I like the contract first interface
We had to integrate Struts with Spring on many projects primarily because of time! - The entire project was in Struts but the new reusable libraries and transactions were developed in Spring for a different project. Rather than write the code again in Struts we decided to interface them. It is easy to start the Spring container and reap benefits of transaction management.
The book is about Spring, persistence, and Hibernate--not about Spring MVC, which is the part of Spring comparable to Struts.
I have used Struts, both Struts 1 and Struts 2, with Spring for almost every project I've ever done. Some were originally Struts projects that I integrated Spring into for the DI and persistence/tx mgmt. I prefer Struts 2 over Spring MVC (although Spring 3 might convince me otherwise), but use Struts 2's Spring integration for action instantiation/DI.
I have used Spring pretty extensively, but my MVC layer is still usually Struts 2.
By Using Struts we can develop only webapplications.
but By using Spring we can develop any type of applications.that my be stand alone applications,web,enterprise,distributed..etc.
for this one only spring contains 6modules.like spring core,spring aop,spring j2ee,...etc
Spring provides an additional layer 'web flow' that gives ability to web applications to have a 'conversational state/scope' in addition to the the standard page,request and session scopes from J2EE.
When people don’t understand what you are doing they call you crazy. But this tiny ad just doesn't care:
Gift giving made easy with the permaculture playing cards