whats the difference between struts and spring frameworks.why we use spring instead of struts
November 27, 2012 at 12:08 PM
Firstly, Struts is a sophisticated framework offering the easy 2 develop, structured view/presentation layer of the MVC applications. Advanced, robust and scalable view framework underpinning reuse and seperation of concerns to certain extent. Springs is a Lightweight Inversion of Control and Aspect Oriented Container Framework. Every work in the last sentence carry the true purpose of the Spring framework. It is just not a framework to integrate / plug in at the presentation layer. It is much more to that. It is adaptible and easy to run light weight applications, it provides a framework to integrate OR mapping, JDBC etc., Infact Struts can be used as the presentation tier in Spring.
Secondly, Springs features strictly associate with presentation stuff. It offers Tiles to bring in reuse at presentation level. It offers Modules allowing the application presentation to segregate into various modules giving more modularity there by allowing each module to have its own Custom/Default Request Processor. Spring provides Aspect Oriented programming, it also solves the seperation of concerns at a much bigger level. It allows the programmer to add the features (transactions, security, database connectivity components, logging components) etc., at the declaration level. Spring framework takes the responsibility of supplying the input parameters required for the method contracts at runtime reducing the coupling between various modules by a method called dependency injection / Inversion of Control.
Thirdly, 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.
Related Tutorials/Questions & Answers:
Difference between Struts and SpringDifference between Struts and Spring What are the
difference between Struts and
Spring?
Hi Friend,
Differences:
1)
Struts is a web framework while
Spring is not.
2)
Spring is a Layered Architecture while
Struts Advertisements
Difference between Struts and SpringTo know the
difference between Struts and
Spring,
we must first explain... parameters at runtime that reduces the coupling
between various modules.
Spring..._TO_REPLACE_4
View displays the result.
Spring
Struts why we use struts framework instead of springswhy
we use struts framework
instead of springs why
we use struts framework
instead of springs
It depends upon your application requirements.In some cases
spring is better and in some cases
struts is better
Difference between MVC1 And MVC2 - StrutsDifference between MVC1 And MVC2 HI Friends,Can u Give me
difference between mvc1 and mvc2. Thanks Prakash Hi Friend,
Please visit the following link:
http://www.roseindia.net/
struts/mvc-architecture.shtml
Struts Hibernate Spring - HibernateStruts Hibernate Spring HI Deepak,
This is reddy.i want expamle for
struts hibernate
spring example. Hi Friend,
Please visit the following link:
http://www.roseindia.net/
struts/hibernate-
spring/index.shtml
plese tell -Struts or Spring - Spring about
spring.
which frameork i should do
Struts or
Spring and which version.
i...,
You need to study both
struts and
spring.
Please visit the following links:
http://www.roseindia.net/
spring/index.shtml
http://www.roseindia.net/
struts What is Spring Struts Hibernate DAO Layer?What is
Spring Struts Hibernate DAO Layer? Hi,
explain me the
difference in
between Spring Struts Hibernate DAO Layer?
Thanks
Hi...
Spring Struts Hibernate DAO Layer.
Thanks
can we use include files in struts.....? - Strutscan
we use include files in
struts.....? hi,
i have a doubt that whether
we should not redirect from one jsp to another jsp directly using include r jsp:include directives. I heard that it is violation of
struts rules if
we Diff between Struts1 and struts 2? - StrutsDiff
between Struts1 and
struts 2? What are the
difference in
between Struts 1 and
Struts 2? Hi Gaurav
There is a big
difference... describes some differences
between struts1 and struts2
Feature
Struts 1
Struts 2
integration with struts 2.0 & spring 2.5 - Frameworkintegration with
struts 2.0 &
spring 2.5 Hi All,
The total integration is
Client (JSP Page) ---
Struts 2.0--
Spring 2.5 --- Hibernate 3.0--MySQL Database
I am trying to integrate
struts 2.0 with
spring 2.5. After giving
Integrate Struts, Hibernate and Spring
Integrate
Struts, Hibernate and
Spring
... are using one of the
best technologies (
Struts, Hibernate and
Spring). This tutorial... be downloaded from
http://struts.apache.org/download.cgi.
We are using
Struts version
STRUTS STRUTS 1)
Difference between Action form and DynaActionForm?
2) How the Client request was mapped to the Action file? Write the code and explain
STRUTSSTRUTS MAIN DIFFERENCES
BETWEEN STRUTS 1 AND
STRUTS 2
STRUTSSTRUTS MAIN DIFFERENCES
BETWEEN STRUTS 1 AND
STRUTS 2
if we have 2 struts-config files - Struts,
No
we cannot have 2
struts-config.xml files. In one case
we can
use 2
struts-cofig.xml files with some minor change in the file name. i e
we can
use...if
we have 2
struts-config files if
we have declared 2
struts struts - Struts-config.xml
Action Entry:
Difference between Struts-config.xml...
2. wht is the
difference b/w the web.xml and
struts-config.xml
3. what is the structure
we hav to follow in
struts whn and application has to run
4. where
struts - FrameworkStruts Spring Hibernate Integration
struts spring hibernate integration tutorial
use of Struts - Strutsuse of Struts Hi,
can anybody tell me what is the importance of sturts? why
we are using it?
Hitendra Hi,
I am sending... example.
http://www.roseindia.net/
struts/
Thanks
StrutsStruts Why
struts rather than other frame works?
Struts is used into web based enterprise applications. Struts2 cab be used with
Spring... with other frameworks like Struts2 with Hibernate, Struts2 with
Spring web MCV
struts - Strutsstruts
we are using
Struts framework for mobile applications,but
we are not using jsps for views
instead of jsps
we planning to
use xhtmls.In
struts ,
we writing the action ="action class name"in jsp,here in xhtml what
we have
struts - Strutsstruts
we are using
Struts framework for mobile applications,but
we are not using jsps for views
instead of jsps
we planning to
use xhtmls.In
struts ,
we writing the action ="action class name"in jsp,here in xhtml what
we have
Struts Struts How to retrive data from database by using
Struts StrutsStruts what is SwitchAction in
struts StrutsStruts how to learn
struts STRUTS STRUTS Request context in
struts?
SendRedirect () and forward how to configure in
struts-config.xml
strutsstruts Hi,
1) can
we write two controller classes in
struts StrutsStruts What is
Struts?
Hi hriends,
Struts is a web page... web applications quickly and easily.
Struts combines Java Servlets, Java Server... developers, and everyone
between. ADS_TO_REPLACE_1
Thanks.
Hi friends
strutsstruts please send me a program that clearly shows the
use of
struts with jsp
strutsstruts
we have the concept of jsp's and servlets right
we can develop the web-pages each and everything then why what for
struts inturdouced
strutsstruts in industry,
struts 1 and
struts 2. which is the best?
which is useful as a professuional
Have a look at the following link:
Struts Tutorials
strutsstruts shopping cart project in
struts with oracle database connection shopping cart project in
struts with oracle database connection
Have a look at the following link:
Struts Shopping Cart using MySQL
StrutsStruts Tell me good
struts manual
strutsstruts what are the 4 methods of
struts framework
Struts Struts When Submit a Form and while submit is working ,press the Refresh , what will happen in
Struts strutsstruts Hi
what is
struts flow of 1.2 version
struts?
i have
struts applicatin then from jsp page how
struts application flows
Thanks
Kalins Naik
Please visit the following link:
Struts Tutorial