File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes What's the difference between Spring and Struts? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "What Watch "What New topic
Author

What's the difference between Spring and Struts?

Jon Lee
Ranch Hand

Joined: Mar 04, 2005
Posts: 134
Both of them are Web Application Framework. So what's the difference? Are they providing the same functions? I can use both of them in one Web Application??

I am new in this area. Pls give some hints.. Thnx a lot......
[ November 07, 2006: Message edited by: Jon Lee ]

SCJP 5.0 - 98% (2007)<br />SCWCD 1.4 - 97% (2007)
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I wouldn't call Spring a "web framework". It's really more of an application framework, meaning that it could be used to build any application, even outside of J2EE. While Spring does have a "Spring MVC" component which competes directly with Struts, Spring is very rich with features that help you build the model part of an MVC application. For example, it allows you to put your logic within a transactional context.

The elements that Spring is most famous for have more to do with its "back end" features than its "front end" features. Since Struts concentrates only on the View and Controller part of MVC, it leaves you free to implement the Model any way you choose. Hence, you will find a number of applications that use Struts on the front end and Spring (possibly in conjunction with Hibernate) on the back end.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What's the difference between Spring and Struts?
 
Similar Threads
simple question about the WebSphere series tool relationship
Looking For A HTTP Client
Popular application server
Web Server, Application Server...
Lightweight and heavyweight containers