Difference between Struts and Spring

Here we have discussed the difference between Struts and Spring framework. Struts was launched first. Spring was launched to overcome the shortcomings of Struts. But after the launch of Struts 2, which is equivalent to Spring both are now being used extensively to develop Java web applications.

Ads

Tutorials   
Struts 2.5.10.1 General Availability - released Login form in Struts2 version 2.3.16 Struts 2 Login Application Struts 2 version 2.3.16.3 released Struts 2 version 2.3.15.3 released Struts 2 Hello World Annotation Example Struts Roseindia Struts 2 Tutorial: Easy steps to learn Struts 2 Difference between Struts and Spring Apache Struts 2.3.15.2 launched to fix vulnerable Feature Struts2 Application in Eclipse: Running the application in Eclipse IDE Struts 2 Hello World Application using Eclipse Interceptors in Struts 2 Struts 2 Action Tag Struts 2 in Agile Development Environment Struts 2 UI Tags Generic Tags Creating own Interceptor What are Interceptors in Struts 2 and how do they work? Results Value Stack / OGNL Action in Struts 2 Framework Struts 2 Interceptors Struts 2.3.15.1 Maven - How to use Maven dependency of Struts 2.3.15.1? Download Struts 2.3.15.1 How Struts 2 Framework works? Architecture of Struts 2 Framework Features and Enhancements in Struts 2.3.15.1 Struts 2 Tutorials - Struts version 2.3.15.1 Struts 1 Tutorial and example programs Struts Tutorial What is Struts Struts Flow Diagram Step By Step Struts Tutorial Struts 2 Login Form Example Struts Video Tutorials Struts 2 Hello World Example Introduction to Struts 2 Framework Downloading and Installing Struts 2.3.8 In Struts What is Model? What is Struts? Download Struts What is Struts Framework? Struts Framework Latest Version of Struts Framework Downloading Struts Official example Struts 2.3.8 released with new features Struts 2.3.8 Tutorials and Examples Hibernate4 Struts Integration Struts2 Tiles Example
Ads

To know the difference between Struts and Spring, we must first explain and understand both the frameworks a little.

Spring framework is a Java platform that is used to develop modular, portable and testable Java applications. It is an open source framework that is used extensively to develop applications. Spring is so popular that it is referred as de-facto standard for developing Enterprise Java applications.

Spring handles the infrastructure, allowing developers to create high performing, easily testable and reusable code and application. It is also used to build web applications on top of the J2EE platform.

Spring works on Dependency Injection concept aka Inversion of Control (IoC) component and Aspect Oriented Container Framework. It supplies input parameters at runtime that reduces the coupling between various modules.

Spring provides a framework to integrate OR mapping, JDBC etc.

Apache Struts framework

Struts is a cross-platform framework that promotes MVC architecture i.e. Model, View and Controller. It is an open source framework that is now extensively used to develop Java EE web applications.

Its current stable release is version 2.3.15.1.

Struts is a request-based framework, which means that it receives a request from the user, carries out the required task and then sends back the result. For this it has a request handler, a response handler, and a tag library.

Struts support REST applications and various technologies like SOAP, AJAX, etc.

All the requests are mapped by Controller to a specific action. Action mapping is specified in Struts-config.xml file. It than creates an instance of this action and invoke interceptors. Interceptor are invoked before and after the action is executed.

Model contains the data and the business logic and is implemented by the Action component.

View displays the result.

Spring Struts
Layered Architecture No
Light weight Heavy weight
does not supports tag Library supports tag Library
loosely coupled tightly coupled
provides easy integration with ORM technologies Manual Coding

Resources:

Advertisements

Share on Google+Share on Google+

Difference between Struts and Spring

Posted on: October 3, 2013 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 

Discuss: Difference between Struts and Spring  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0

Ads

 

Ads