Difference between Spring framework and Struts framework?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
Answer / rajan
Spring uses Has-A relationship while Struts is based on Is-A relationships.
Is This Answer Correct ? | 7 Yes | 6 No |
What do you understand by synchronization? Why is it important?
What is difference between Application Server and Web Server?
what is difference between business deligate and session facade ?
Is it Mandatory to map each pojo class variable with table column in Hibernate? Is there any alternative to skip some of those? Thanks in advance...
Which of the following declaration is wrong? int i=45; float j = 45.0; double k=45.0;
What is the use of hashcode in java ?
can u draw class/object diagram for ATM
0 Answers HCL, Zycus Infotech,
please mail me the interview question based on java/j2ee
how to delete cookie information?and when it will delete?
wnet use DAO design in u r project?
What are the different types of classes implemented in the set interfaces? : java collections
What is need of DAO? Write one simple DAO example?