Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Framework whats the difference between struts and spring frameworks.why we use spring instead of struts
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


surendradama
whats the difference between struts and spring frameworks.why we use spring instead of struts
2 Answer(s)      2 years and 6 months ago
Posted in : Framework


whats the difference between struts and spring frameworks.why we use spring instead of struts


Advertisement
View Answers

May 9, 2012 at 4:13 PM


Difference between Struts and Spring:

1)Struts is a web framework while Spring is not.

2)Spring is a Layered Architecture while Struts is not.

3)Struts is heavy weight while Spring is light weight.

4)Struts supports tag Library while Spring does not.

5)Spring is loosely coupled while Struts is tightly coupled.

6)Spring provides easy integration with ORM technologies while in struts, we need to do coding manually.

7)Struts easily integrate with other client side technologies. It is not easy in case of spring.

Struts Tutorials

Spring Tutorials



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:
whats the difference between struts and spring frameworks.why we use spring instead of struts
whats the difference between struts and spring frameworks.why we use spring instead of struts  whats the difference between struts and spring frameworks.why we use spring instead of struts
Difference between Struts and Spring
Difference 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 Spring
To know the difference between Struts and Spring, we must first explain... at runtime that reduces the coupling between various modules. Spring provides... Tutorials - Struts version 2.3.15.1 Spring Tutorial Spring 3.0
why we use struts framework instead of springs
why 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
diff between spring and struts in java
diff between spring and struts in java  diff between spring and struts in java
Difference between struts and JSF
Difference between struts and JSF  What is the difference between struts and JSF
What is the difference between hibernate and spring
What is the difference between hibernate and spring  Hi, What is the difference between hibernate and spring. Thanks
Integration Struts Spring Hibernate.
Integration Struts Spring Hibernate.  Integration Struts Spring Hibernate
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
Struts Hibernate Spring - Hibernate
Struts 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
Difference between MVC1 And MVC2 - Struts
Difference 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
Problem in integration struts+ spring - Framework
Problem in integration struts+ spring  Problem in integration struts+ spring hi, i am facing problem in integration struts+ spring. I am also using...-INF/struts
Struts Spring Hibernate
In this section, you will learn about the Struts, Spring and Hibernate Integration
what is the difference between frontcontroller and actionservlet? - Struts
what is the difference between frontcontroller and actionservlet?   Hi Roseindia, sub: what is the difference between frontcontroller... is the Controller in Struts based Application  ActionServlet of Struts is part
what is diffrence between the spring and ejb which is better for small application - Spring
appplication.what is diffrence between the struts with spring application and struts without spring application  Hi Friend, Difference between Spring and EJB...what is diffrence between the spring and ejb which is better for small
can we use include files in struts.....? - Struts
can 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
integration with struts 2.0 & spring 2.5 - Framework
integration 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...://struts.apache.org/download.cgi. We are using Struts version Download Hibernate
spring - Spring
spring  give me the explanation about spring>and give me the difference between spring and EJB 3.0 WHAT IS THE USAGE OF SPRING WHERE WE HAVE TO USE IT? GIVE ME ONE EXAMPLE
Struts Hibernate Spring - Login and User Registration - Hibernate
Struts Hibernate Spring - Login and User Registration  Hi All, I fallowed instructions that was given in Struts Hibernate Spring, Login and user.... http://www.roseindia.net/struts/hibernate-spring/user-registration-form.shtml
Using JUnit to test struts application that uses Spring to manage object dependency - Spring
to use JTest with spring and struts. Rgs, Devishree  Hi friend...Using JUnit to test struts application that uses Spring to manage object... cases and test in-container. I am using Struts as the framework and Spring
Why to use Spring Framework?
Why to use Spring Framework in a web application? In this article I will explain you the features and benefits of Spring Framework. We will also learn how... applications. There are many modules of the Spring Framework which you can use
why we use constructors instead of methods in java?
why we use constructors instead of methods in java?   why we use constructors instead of methods in java
What are the differences between EJB and Spring
What are the differences between EJB and Spring   Hi, What are the differences between EJB and Spring Thanks
spring
spring   i am a beginner in java.. but i have to learn spring framework.. i know the core java concepts with some J2EE knowledge..can i learn spring without knowing anything about struts
Simplified Application Development with Struts, Hibernate and Spring
source projects such as Spring, Hibernate and Struts and their use in J2EE... Simplified Application Development with Struts, Hibernate and Spring... knowledge about different frame works like Hibernate, Spring and Struts, which
Understanding Spring Struts Hibernate DAO Layer
Understanding Spring Struts Hibernate DAO Layer... how Spring Hibernate and Struts will work together to provide best solution for any web based application.   Understanding Spring Struts
spring controller V/S stuts Action - Spring
spring controller V/S stuts Action  we are going to use spring framework so what is better spring controller or struts action
Difference b/w spring 2.x and 3.x
Difference b/w spring 2.x and 3.x  difference b/w spring 2.x and 3.x
spring
spring   hi how can we make spring bean as prototype how can we load applicationcontext in spring what is dependency injection
use of Struts - Struts
use 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
Advertisements
 

 

 

DMCA.com