Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

If you have been asked to develop a web based MVC application based on java platform , which one would you prefer? Struts or Spring?

user-image
Question added by Mohammad Uzair , integration developer , Abu Dhabi Islamic Bank
Date Posted: 2017/09/05
Hasan Mobarak
by Hasan Mobarak , Software Engineer (Java) , Fakir Knitwear's ltd

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.

Yazan Tohme
by Yazan Tohme , Analyst Programer , BML Istisharat

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

Dionifer Canabano
by Dionifer Canabano , Programmer / Analyst , Banco De Oro Inc. (BDO)

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.

fazal shani
by fazal shani , Telco Cloud Automation Lead / Solution Architect , Tata consultancy Services Japan

I will prifier Spring or Springboot  based on MVC pattern.

Gul Soomro
by Gul Soomro , web Developer , Annexes Technology

Spring for sure, because it is light,using ,Annotation and shorter code.

MOHAMMAD Sahwan
by MOHAMMAD Sahwan , It Solution Expert , Siemens Energy

I would like to prefer spring because spring supports an end to end development 

both front end and back end.

Mohd Khalique
by Mohd Khalique , Technology Analyst , Infosys Limited

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.

Deleted user
by Deleted user

Spring framework with spring boot

spring ,because spring provides flexiblity to develop application

Umair Yasin
by Umair Yasin , Manager Architecture , Stella Inc.

Spring because its more robust and flexible than struts

Deleted user
by Deleted user

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.

More Questions Like This