Difference between Spring framework and Struts framework?

Answers were Sorted based on User's Feedback



Difference between Spring framework and Struts framework?..

Answer / tirupathi rao

STRUTS :
1.Struts framework is based on MVC pattern to develop web
applications and which is used to generate integration logic
dynamically.
2.Struts allows only JSP as a view component.

SPRING:
1.Spring framework is used to develop enterprise applications.
2.Spring framework not only allows JSPs but also other views
such as Velocity,Freemaker etc.,
3.Spring f/w consists of 6 modules which are alternatives
for existing J2ee Technologies.

Is This Answer Correct ?    96 Yes 35 No

Difference between Spring framework and Struts framework?..

Answer / anand

Struts is a web framework which can be used to develop web
applications using MVC pattern. We have to hard code to use
applications like hibernate, jdbc, etc.

Spring is an application framework in which spring MVC is
one of the modules of spring framework. Spring uses the
concept of IOC/DI where the objects are not hard coded in
java but they are injected using construtor/setter
injection. We can use hibernate, jdbc, etc,...with spring
without hard coding in application as spring supports
classes hibernate, jdbc, and many more. This is very little
to say about spring. There are many features to be known.

Is This Answer Correct ?    57 Yes 8 No

Difference between Spring framework and Struts framework?..

Answer / dsr

struts framework is a mvc pattern. spring framework is a
mvc pattern and other patterns also include in this.

Is This Answer Correct ?    83 Yes 37 No

Difference between Spring framework and Struts framework?..

Answer / anjaneyulu

Struts framework is mainly used for WebApplications Actully Struts framework is all are classes not implements theinterface.

whenever develop applicatoion in two ways:
1.Programming through interface
2.Programming through class
Struts drawbacks:

1.better way is Programming through interfaces so that struts not support that(i.e all are predifined class.. Action,DiaspatchAction,SwitchAction)
2.This framework is tightcoupling.it is not separated layerwised
3.It is not Suuport to DependencyInjection
4.We have to hard code to use
applications like hibernate, jdbc, etc.

SPRING:
overcome the above problems Spring will be introduced
Spring Application develop through Interface
It suport DI.
It is layerwise designed.
It is loosecoupling
Spring suport MVC and Other MVC
Spring Application allways flow DesginPatterns
Spring support to POJO'S AND POJI(i.e it is not api dependent)
spring without hard coding in application as spring supports
classes hibernate, jdbc, and many more. This is very little
to say about spring. There are many features to be known.

Is This Answer Correct ?    40 Yes 5 No

Difference between Spring framework and Struts framework?..

Answer / srinivas

Struts is developed with a Front Controller and dispatcher
pattern. Where in all the requests go to the ActionServlet
thereby routed to the module specific Request Processor
which then loads the associated Form Beans, perform
validations and then handovers the control to the
appropriate Action class with the help of the action mapping
specified in Struts-config.xml file. On the other hand,
spring does not route the request in a specific way like
this, rather it allows to you to design in your own way
however in allowing to exploit the power of framework, it
allows you to use the Aspect Oriented Programming and
Inversion of Control in a great way with great deal of
declarative programming with the XML. Commons framework can
be integrated to leverage the validation in spring framework
too. Morethan this, it provides all features like JDBC
connectivity, OR Mapping etc., just to develop & run your
applications on the top of this.

Is This Answer Correct ?    40 Yes 6 No

Difference between Spring framework and Struts framework?..

Answer / sambasivareddy

*Struts is a webframework ,Spring an applicationframework.
*Struts using MVC,Spring is one of the module
*Struts Hard code to use applications like hibernate,jdbc
Spring Inbuilt hibernate,Jbdc.
*Struts allows only jsp,Sping supports jsp,velocity,free
maker
*Struts is heavy weight,Spring is light weight
*Struts supports tagLibrary,Spring not support.

Is This Answer Correct ?    34 Yes 8 No

Difference between Spring framework and Struts framework?..

Answer / yugandhar

Spring framework provides dependency injection.Which is
alternative to EJB.Spring framework provides many features
like velocity,Hibernate,Ibatis,PDF,Excel
views,JDO,Interceptors,web services.Whic can be built in
Spring framework very easily.It is a J2EE application
framewrok.


Struts is MVC pattern provides limited features.For
distributed applications it will have to use EJB.

Is This Answer Correct ?    38 Yes 18 No

Difference between Spring framework and Struts framework?..

Answer / vinay kumar.k

1)Spring is a Layered Architechture, where as Strtuts is not
2)Spring is loose coupling, Struts is tight coupling
3)Spring provides easy integration with ORM technoloies,for
stuts we need to maually do coding
4)Spring's POJO is equivalent to EJB components to some Extent

Is This Answer Correct ?    24 Yes 6 No

Difference between Spring framework and Struts framework?..

Answer / ramakrishna

->spring is a light weight,struts is a heavight
->spring provided a conatianers by activating classes,
but struts explicitely configured
->spring is layered ,struts is not

Is This Answer Correct ?    19 Yes 10 No

Difference between Spring framework and Struts framework?..

Answer / rajan

Spring uses Has-A relationship while Struts is based on Is-A relationships.

Is This Answer Correct ?    7 Yes 6 No

Post New Answer

More Java J2EE AllOther Interview Questions

What is Visual Source Safe(source control Tool)?

1 Answers  


Which sorting algorithm is used by collections.sort() in java ?

0 Answers  


when exactly should we use throws ,and wen exactly should we use the try and catch for exceptional handling

0 Answers  


What is the use of hashcode in java ?

0 Answers  


How to use ANT?

2 Answers  






what is acl(access control list)?

1 Answers   Athena, HCL,


Should we create system software ( e.g operating system ) in java ?

0 Answers  


What are the considerations to be made in case of loops in java ?

0 Answers  


Hi Friends , am newbie to ajax. For example just consider one account registration - A form contains 8 text fields with submit button. In this form second texbox contains "username " . On right side of text box there is a label box . On clilck action i need to determine user is available or not. Is it possible on clicking label or should i click submit button.

0 Answers  


Hi we have an urgent requirement for Java/J2ee technical lead position & also looking for "Java Guidewire claimcentre" experienced professional for Bangalore location if interested can reach srisanh@gmail.com

0 Answers  


what is java virtual machine

4 Answers  


How many controlers are there in spring? Plz send me ans

1 Answers   HCL,


Categories