SlideShare uma empresa Scribd logo
1 de 14
Struts & Spring Framework
Issues
Anshu Gaur
(1103014007)
Struts
 Struts is an open-source web application
framework from apache for developing Java EE
applications.
 It was originally created by Craig McClanahan and
donated to the Apache Foundation in May, 2000.
Formerly located under the Apache Jakarta
Project and known as Jakarta Struts, it became a
top-level Apache project in 2005.
 It uses and extends the Java Servlet API to
encourage developers to adopt a model-view-
controller (MVC) architecture.
 Struts offers a set of tag libraries to support the
faster development of the different layers of the
web application
Struts Framework
 The Struts Framework is a standard for developing
well-architected Web applications. It has the following
features:
 Open source
 Based on the Model-View-Controller (MVC) design
paradigm, distinctly separating all three levels:
◦ Model: application
◦ View: presentation of data (JSP, HTML)
◦ Controller: routing of the application flow
 Implements the JSP Model 2 Architecture
 Stores application routing information and request
mapping in a single core file, struts-config.xml
M-V-C
◦ Model: application state(Represent Data Layer)
◦ View: presentation of data (JSP, HTML)(represent the data
processed by the model component)
◦ Controller: routing of the application flow(Responsible for
interaction b/w model & controller ·
 All incoming requests are intercepted by the Struts servlet
controller.
 The Struts Configuration file struts-config.xml is used by the
controller to determine the routing of the flow.
 This flows consists of an alternation between two
transitions:
 FromView to Action: A user clicks on a link or submits a
form on an HTML or JSP page.The controller receives the
request, looks up the mapping for this request, and forwards
it to an action.The action in turn calls a Model layer
(Business layer) service or function.
 From Action toView: After the call to an underlying
function or service returns to the action class, the action
forwards to a resource in theView layer and a page is
displayed in a web browser.
Spring Framework
 Spring is a light weight and open source
framework created by Rod Johnson in 2003.
 Spring is a complete and a modular framework, i.e. ,
spring framework can be used for all layer
implementations for a real time application.
 Spring can be used for the development of
particular layer of a real time application unlike
struts [ only for front end related ] and hibernate [
only for database related ], but with spring we can
develop all layers.
 Spring framework is said to be a non-invasive means it doesn’t
force a programmer to extend or implement their class from any
predefined class or interface given by Spring API, in struts we used
to extend Action Class right that’s why struts is said to be invasive.
 Spring is light weight framework because of its POJO (plain old Java
objects)model; when it comes to size and transparency.The basic
version of spring framework is around 2MB.
 Spring Framework made J2EE application development little easier,
by introducing POJO model
 Spring having this much of demand because of the following 3
reasons….
1. Simplicity
2. Testability
3. Loose Coupling
Spring Framework Architecture
 Spring is modular, allowing you to pick
and choose which modules are applicable
to you, without having to bring in the rest.
The Spring Framework provides about 20
modules which can be used based on an
application requirement.
 Actually in spring 1.x, the framework has
divided into 7 well defined modules. But
in 2.x framework is divided into 6
modules only..
◦ Spring Core Module
◦ Spring Context [ J2EE ]
◦ Spring DAO Module [ Spring JDBC ]
◦ Spring ORM module
◦ Spring AOP [ Aspect Oriented Programming ]
◦ SpringWEB-MVC Module
 Spring Core Module is the base for all
modules, and very important.
Spring Framework
 Core modules are :
Aspect oriented programming(AOP)
Object relational mapping(ORM)
Data access object(DAO)
J2EE
Web-MVC
 Aspect-oriented programming: enables
implementing cross-cutting concerns.
 Object relational mapping:The ORM module provides
integration layers for popular object-relational mapping APIs,
including JPA, JDO, Hibernate,.
 Data access object: working with relational database
management systems on the Java platform
using JDBC and object-relational mapping tools and
with NoSQL databases.
 Web-MVC: The Web module provides basic web-oriented
integration features such as multipart file-upload functionality
and the initialization of the IoC(Inversion of contrl) container
using servlet listeners and a web-oriented application
context.
The Web-Servlet module contains Spring's model-view-
controller (MVC) implementation for web applications.
Difference b/w struts & spring framework
Struts Spring
Struts is a sophisticated framework
offering the easy 2 develop, structured
view/presentation layer of the MVC
applications.
Springs is a Lightweight Inversion of
Control and Aspect Oriented
Container Framework. It is just not a
framework to integrate / plug in at the
presentation layer.
it provides a framework to integrate
OR mapping, JDBC etc.,
Struts can be used as the presentation
tier in Spring.
Struts is mainly a presentation layer
framework, like redirecting to a
particular page ,doing client side
validations etc which otherwise very
tedious using jsp and servlets.
Spring is a complete J2EE framework
having seven independent layers which
can be used all together or few layers
integrated with some other
framework. Spring provides declarative
transaction management and AOP.
One layer of spring is for presentation
purpose like struts but for only
presentation layer, struts is better than
spring
Struts 2 has AJAX theme. Spring is not.
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.
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.
Struts 2 tags are style sheet-driven,
making it easier to develop consistent
pages.
Spring is not.
Thank you

Mais conteúdo relacionado

Mais procurados

JSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End FrameworksJSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End FrameworksIan Hlavats
 
Struts An Open-source Architecture for Web Applications
Struts An Open-source Architecture for Web ApplicationsStruts An Open-source Architecture for Web Applications
Struts An Open-source Architecture for Web Applicationselliando dias
 
Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVCJohn Lewis
 
Spring MVC Architecture Tutorial
Spring MVC Architecture TutorialSpring MVC Architecture Tutorial
Spring MVC Architecture TutorialJava Success Point
 
Step by Step Guide for building a simple Struts Application
Step by Step Guide for building a simple Struts ApplicationStep by Step Guide for building a simple Struts Application
Step by Step Guide for building a simple Struts Applicationelliando dias
 
Spring Basics
Spring BasicsSpring Basics
Spring BasicsEmprovise
 
J2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for womenJ2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for womenlissa cidhi
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkRaveendra R
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Tuna Tore
 
Annotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVCAnnotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVCJohn Lewis
 

Mais procurados (20)

Struts
StrutsStruts
Struts
 
Struts presentation
Struts presentationStruts presentation
Struts presentation
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Struts course material
Struts course materialStruts course material
Struts course material
 
JSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End FrameworksJSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End Frameworks
 
Struts An Open-source Architecture for Web Applications
Struts An Open-source Architecture for Web ApplicationsStruts An Open-source Architecture for Web Applications
Struts An Open-source Architecture for Web Applications
 
Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVC
 
Spring Web MVC
Spring Web MVCSpring Web MVC
Spring Web MVC
 
Struts framework
Struts frameworkStruts framework
Struts framework
 
141060753008 3715301
141060753008 3715301141060753008 3715301
141060753008 3715301
 
Spring MVC Architecture Tutorial
Spring MVC Architecture TutorialSpring MVC Architecture Tutorial
Spring MVC Architecture Tutorial
 
Struts notes
Struts notesStruts notes
Struts notes
 
Step by Step Guide for building a simple Struts Application
Step by Step Guide for building a simple Struts ApplicationStep by Step Guide for building a simple Struts Application
Step by Step Guide for building a simple Struts Application
 
Spring Basics
Spring BasicsSpring Basics
Spring Basics
 
J2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for womenJ2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for women
 
Spring MVC 5 & Hibernate 5 Integration
Spring MVC 5 & Hibernate 5 IntegrationSpring MVC 5 & Hibernate 5 Integration
Spring MVC 5 & Hibernate 5 Integration
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
 
Annotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVCAnnotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVC
 

Destaque

JAVA EE training from 3rd-oct-2015
JAVA EE training from 3rd-oct-2015JAVA EE training from 3rd-oct-2015
JAVA EE training from 3rd-oct-2015Naz Ish
 
Spring By Example One Day Workshop
Spring By Example One Day WorkshopSpring By Example One Day Workshop
Spring By Example One Day Workshopspringbyexample
 
A PRESENTATION ON STRUTS & HIBERNATE
A PRESENTATION ON STRUTS & HIBERNATEA PRESENTATION ON STRUTS & HIBERNATE
A PRESENTATION ON STRUTS & HIBERNATETushar Choudhary
 
Hibernate architecture
Hibernate architectureHibernate architecture
Hibernate architectureAnurag
 
Introduction to j2 ee frameworks
Introduction to j2 ee frameworksIntroduction to j2 ee frameworks
Introduction to j2 ee frameworksMukesh Kumar
 
Introduction to Java Enterprise Edition
Introduction to Java Enterprise EditionIntroduction to Java Enterprise Edition
Introduction to Java Enterprise EditionAbdalla Mahmoud
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkMohit Belwal
 
ORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate OverviewORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate OverviewBrett Meyer
 
Creating modern java web applications based on struts2 and angularjs
Creating modern java web applications based on struts2 and angularjsCreating modern java web applications based on struts2 and angularjs
Creating modern java web applications based on struts2 and angularjsJohannes Geppert
 
Hibernate Presentation
Hibernate  PresentationHibernate  Presentation
Hibernate Presentationguest11106b
 
Lecture 8 Enterprise Java Beans (EJB)
Lecture 8  Enterprise Java Beans (EJB)Lecture 8  Enterprise Java Beans (EJB)
Lecture 8 Enterprise Java Beans (EJB)Fahad Golra
 

Destaque (20)

Struts Overview
Struts OverviewStruts Overview
Struts Overview
 
JAVA EE training from 3rd-oct-2015
JAVA EE training from 3rd-oct-2015JAVA EE training from 3rd-oct-2015
JAVA EE training from 3rd-oct-2015
 
Struts2
Struts2Struts2
Struts2
 
Struts2
Struts2Struts2
Struts2
 
Spring By Example One Day Workshop
Spring By Example One Day WorkshopSpring By Example One Day Workshop
Spring By Example One Day Workshop
 
Struts2
Struts2Struts2
Struts2
 
Struts2
Struts2Struts2
Struts2
 
Struts
StrutsStruts
Struts
 
A PRESENTATION ON STRUTS & HIBERNATE
A PRESENTATION ON STRUTS & HIBERNATEA PRESENTATION ON STRUTS & HIBERNATE
A PRESENTATION ON STRUTS & HIBERNATE
 
Hibernate 3
Hibernate 3Hibernate 3
Hibernate 3
 
Hibernate architecture
Hibernate architectureHibernate architecture
Hibernate architecture
 
Introduction to j2 ee frameworks
Introduction to j2 ee frameworksIntroduction to j2 ee frameworks
Introduction to j2 ee frameworks
 
Introduction to Java Enterprise Edition
Introduction to Java Enterprise EditionIntroduction to Java Enterprise Edition
Introduction to Java Enterprise Edition
 
Java Enterprise Edition
Java Enterprise EditionJava Enterprise Edition
Java Enterprise Edition
 
Why do I hate Hibernate?
Why do I hate Hibernate?Why do I hate Hibernate?
Why do I hate Hibernate?
 
Java & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate FrameworkJava & J2EE Struts with Hibernate Framework
Java & J2EE Struts with Hibernate Framework
 
ORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate OverviewORM, JPA, & Hibernate Overview
ORM, JPA, & Hibernate Overview
 
Creating modern java web applications based on struts2 and angularjs
Creating modern java web applications based on struts2 and angularjsCreating modern java web applications based on struts2 and angularjs
Creating modern java web applications based on struts2 and angularjs
 
Hibernate Presentation
Hibernate  PresentationHibernate  Presentation
Hibernate Presentation
 
Lecture 8 Enterprise Java Beans (EJB)
Lecture 8  Enterprise Java Beans (EJB)Lecture 8  Enterprise Java Beans (EJB)
Lecture 8 Enterprise Java Beans (EJB)
 

Semelhante a Struts & Spring Framework Issues Compared

Comparison of spring and other frameworks.!
Comparison of spring and other frameworks.!Comparison of spring and other frameworks.!
Comparison of spring and other frameworks.!Sibu Stephen
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework tola99
 
Spring framework-tutorial
Spring framework-tutorialSpring framework-tutorial
Spring framework-tutorialvinayiqbusiness
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts frameworks4al_com
 
Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2javatrainingonline
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsVirtual Nuggets
 
Spring Framework
Spring FrameworkSpring Framework
Spring Frameworknomykk
 
Modern Java Web Development
Modern Java Web DevelopmentModern Java Web Development
Modern Java Web Developmentzenyk
 
spring framework ppt by Rohit malav
spring framework ppt by Rohit malavspring framework ppt by Rohit malav
spring framework ppt by Rohit malavRohit malav
 
How Spring Framework Really Works?
How Spring Framework Really Works?How Spring Framework Really Works?
How Spring Framework Really Works?NexSoftsys
 
Struts 2 Overview
Struts 2 OverviewStruts 2 Overview
Struts 2 Overviewskill-guru
 

Semelhante a Struts & Spring Framework Issues Compared (20)

Comparison of spring and other frameworks.!
Comparison of spring and other frameworks.!Comparison of spring and other frameworks.!
Comparison of spring and other frameworks.!
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
Spring notes
Spring notesSpring notes
Spring notes
 
Spring framework-tutorial
Spring framework-tutorialSpring framework-tutorial
Spring framework-tutorial
 
MVC
MVCMVC
MVC
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts framework
 
Java J2EE Interview Question Part 2
Java J2EE Interview Question Part 2Java J2EE Interview Question Part 2
Java J2EE Interview Question Part 2
 
Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggets
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Month 2 report
Month 2 reportMonth 2 report
Month 2 report
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Modern Java Web Development
Modern Java Web DevelopmentModern Java Web Development
Modern Java Web Development
 
spring framework ppt by Rohit malav
spring framework ppt by Rohit malavspring framework ppt by Rohit malav
spring framework ppt by Rohit malav
 
How Spring Framework Really Works?
How Spring Framework Really Works?How Spring Framework Really Works?
How Spring Framework Really Works?
 
Spring mvc 2.0
Spring mvc 2.0Spring mvc 2.0
Spring mvc 2.0
 
Struts 2 Overview
Struts 2 OverviewStruts 2 Overview
Struts 2 Overview
 
Spring
SpringSpring
Spring
 
Java Spring Framework
Java Spring FrameworkJava Spring Framework
Java Spring Framework
 

Último

Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Dr.Costas Sachpazis
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 

Último (20)

Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 

Struts & Spring Framework Issues Compared

  • 1. Struts & Spring Framework Issues Anshu Gaur (1103014007)
  • 2. Struts  Struts is an open-source web application framework from apache for developing Java EE applications.  It was originally created by Craig McClanahan and donated to the Apache Foundation in May, 2000. Formerly located under the Apache Jakarta Project and known as Jakarta Struts, it became a top-level Apache project in 2005.  It uses and extends the Java Servlet API to encourage developers to adopt a model-view- controller (MVC) architecture.  Struts offers a set of tag libraries to support the faster development of the different layers of the web application
  • 3. Struts Framework  The Struts Framework is a standard for developing well-architected Web applications. It has the following features:  Open source  Based on the Model-View-Controller (MVC) design paradigm, distinctly separating all three levels: ◦ Model: application ◦ View: presentation of data (JSP, HTML) ◦ Controller: routing of the application flow  Implements the JSP Model 2 Architecture  Stores application routing information and request mapping in a single core file, struts-config.xml
  • 4. M-V-C ◦ Model: application state(Represent Data Layer) ◦ View: presentation of data (JSP, HTML)(represent the data processed by the model component) ◦ Controller: routing of the application flow(Responsible for interaction b/w model & controller ·
  • 5.  All incoming requests are intercepted by the Struts servlet controller.  The Struts Configuration file struts-config.xml is used by the controller to determine the routing of the flow.  This flows consists of an alternation between two transitions:  FromView to Action: A user clicks on a link or submits a form on an HTML or JSP page.The controller receives the request, looks up the mapping for this request, and forwards it to an action.The action in turn calls a Model layer (Business layer) service or function.  From Action toView: After the call to an underlying function or service returns to the action class, the action forwards to a resource in theView layer and a page is displayed in a web browser.
  • 6. Spring Framework  Spring is a light weight and open source framework created by Rod Johnson in 2003.  Spring is a complete and a modular framework, i.e. , spring framework can be used for all layer implementations for a real time application.  Spring can be used for the development of particular layer of a real time application unlike struts [ only for front end related ] and hibernate [ only for database related ], but with spring we can develop all layers.
  • 7.  Spring framework is said to be a non-invasive means it doesn’t force a programmer to extend or implement their class from any predefined class or interface given by Spring API, in struts we used to extend Action Class right that’s why struts is said to be invasive.  Spring is light weight framework because of its POJO (plain old Java objects)model; when it comes to size and transparency.The basic version of spring framework is around 2MB.  Spring Framework made J2EE application development little easier, by introducing POJO model  Spring having this much of demand because of the following 3 reasons…. 1. Simplicity 2. Testability 3. Loose Coupling
  • 8. Spring Framework Architecture  Spring is modular, allowing you to pick and choose which modules are applicable to you, without having to bring in the rest. The Spring Framework provides about 20 modules which can be used based on an application requirement.
  • 9.  Actually in spring 1.x, the framework has divided into 7 well defined modules. But in 2.x framework is divided into 6 modules only.. ◦ Spring Core Module ◦ Spring Context [ J2EE ] ◦ Spring DAO Module [ Spring JDBC ] ◦ Spring ORM module ◦ Spring AOP [ Aspect Oriented Programming ] ◦ SpringWEB-MVC Module  Spring Core Module is the base for all modules, and very important.
  • 10. Spring Framework  Core modules are : Aspect oriented programming(AOP) Object relational mapping(ORM) Data access object(DAO) J2EE Web-MVC
  • 11.  Aspect-oriented programming: enables implementing cross-cutting concerns.  Object relational mapping:The ORM module provides integration layers for popular object-relational mapping APIs, including JPA, JDO, Hibernate,.  Data access object: working with relational database management systems on the Java platform using JDBC and object-relational mapping tools and with NoSQL databases.  Web-MVC: The Web module provides basic web-oriented integration features such as multipart file-upload functionality and the initialization of the IoC(Inversion of contrl) container using servlet listeners and a web-oriented application context. The Web-Servlet module contains Spring's model-view- controller (MVC) implementation for web applications.
  • 12. Difference b/w struts & spring framework Struts Spring Struts is a sophisticated framework offering the easy 2 develop, structured view/presentation layer of the MVC applications. Springs is a Lightweight Inversion of Control and Aspect Oriented Container Framework. It is just not a framework to integrate / plug in at the presentation layer. it provides a framework to integrate OR mapping, JDBC etc., Struts can be used as the presentation tier in Spring. Struts is mainly a presentation layer framework, like redirecting to a particular page ,doing client side validations etc which otherwise very tedious using jsp and servlets. Spring is a complete J2EE framework having seven independent layers which can be used all together or few layers integrated with some other framework. Spring provides declarative transaction management and AOP. One layer of spring is for presentation purpose like struts but for only presentation layer, struts is better than spring
  • 13. Struts 2 has AJAX theme. Spring is not. 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. 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. Struts 2 tags are style sheet-driven, making it easier to develop consistent pages. Spring is not.