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 |
Difference between Spring framework and Struts framework?
12 Answers IBM, L&T, VAM,
What are the different types of ways where you can iterate over a list? : java collections
what is java virtual machine
What are the considerations to be made in case of loops in java ?
Q1. A. Write note on "The class path Environment Variable". B. Which are different kinds of source code? Q2. A. How to create an interface? B. Why convert an applet to an application? Q3. A. How to use Media tracker Class. B. How to use string tokenizer class. Q4. A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on "The properties class" Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites.
HOW MUCH PERCENTAGE WE DEDUCT FOR OUR SUPPLIERS OR OTHER PROFESSIONALS
What is deque in the java collections framework? : java collections
httt method
what is diff string and stringbuffer
What is the enumerator of the java collection framework? : java collections
what is the difference between checked and unchecked Exceptions?
I have include a jsp page by using <jsp:include page="/.../xyz.jsp"/> The thing is that the xyz.jsp page has its submit button.When i click on that button the whole main page get refreshed.But i want to refresh only the xyz.jsp page.How could i achive it so that i can only refresh the xyz.jsp not the main page page?