What is diffrence b/w struts and spring framework?

Showing Answers 1 - 6 of 6 Answers

Sachin Yadav

  • Feb 10th, 2007
 

Struts is a web framework while spring is a complete framework, you can develop web based solutions as well as desktop applications using spring. Spring is based on the principle of Dependency Injection or inversion of control. All the dependencies for a bean are injected using a centralized configuration file in advance so that they need not to look up for them. Spring provides it's own MVC framework as well as ability to hook other framework like struts along with using other facilities of spring like Aspect oriented programming.

  Was this answer useful?  Yes

ekta.shukla

  • Aug 18th, 2008
 

  • Struts is tightly coupled Spring is loosely coupled.
  • Struts is a web framework only, Struts can be compare with the SpringMVC. And SpringMVC is subset of the Spring framework. So we can say that Sturts can be seen as the subset of the spring framework in functionality point of view.
  • What Action class do in struts, Controller does in Spring. And action in Struts is a Abstract class but Controller in Spring is an interface, This is very good advantage of the spring.
  • Spring don’t have any action from, it bind the http form values directly into pojo. Instead of initializing the form bean spring directly initialize the domain object.
  • ActionForward in struts is replace with the ModelAndView in Spring. Model component contain the business object to be displayed via view component.
  • Unlike Struts Spring don’t provide any separate tag library
  • Struts implement MVC Design Patten where as Spring implements IOC Design Pattren and addreses AOP Cross cutting concerns

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions