Register now or log in to join your professional community.
Spring will be get preference over Struts. because:
_ first of all I choose Spring for IOC Container Support
_ dependency injection & loosely coupling make my application lightweight.
_ easily Adapted to advanced technologies.
_ MVC Structure give support for Clear separation between one layer to another.
_ easily Implements my persistence logic by JDBC Templated support.
At work we use a combination of both, in which struts acts as the servlet and spring handles the dependencies via XML injection. Alongside MyBatis, this proved to be quite efficient
I prefer Spring over Struts for some of the following reasons:
1.Templated JDBC queries 2.Easy to decouple classes 3.Annotation based
4.Shorter code 5.Availability of online support 6.Adapted to advanced technologies 7.Easy to learn
But both framework are okay for MVC application.
I will prifier Spring or Springboot based on MVC pattern.
Spring for sure, because it is light,using ,Annotation and shorter code.
I would like to prefer spring because spring supports an end to end development
both front end and back end.
Spring web Mvc rather than struts because with struts we can develop only web application we can not manage security upto greate extent , transaction we have to we have to write .we weill become tightly copuled with struts framework we can only work with jsp as a view component. and there is lot of problem with struts that's why we go for spring mvc or spring another thing using struts we can not develop end to end application.
spring ,because spring provides flexiblity to develop application
Spring because its more robust and flexible than struts
I Would Prefer Spring over Struts. Because
The major difference between Spring MVC and Struts is: Spring MVC is loosely coupled framework whereas Struts is tightly coupled. For enterprise Application you need to build your application as loosely coupled as it would make your application more reusable and robust as well as distributed.
The Spring MVC (Model View Controller) is designed around a DispatcherServlet, which dispatches the requests to handler with configurable handler mappings, view resolution and theme resolution.
While the objects responsible for handling requests and routing for processing in Struts called an Action, the same object is referred as Controller in Spring Web MVC framework. This is one of the very first differences between Spring MVC and Struts2. Struts 2 Actions are initiated every time when a request is made, whereas in Spring MVC the Controllers are created only once, stored in memory and shared among all the requests. So, Spring Web MVC framework is far efficient to handle the requests than Struts 2.