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)
posted 9 years ago
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.