SlideShare ist ein Scribd-Unternehmen logo
1 von 13
Spring
Framework
Tutorial
Topics Covered
1.What is Spring Framework ?
2. Evolution of Spring Framework
3. Features
4. Architecture of Spring Framework
5. MVC Architecture
6. Advantages and Disadvantages
What is Spring
Framework ?
Spring is a lightweight framework. It is an open-source Java Platform which is
used for developing robust Java applications very rapidly and easily. Its
support is extended to various frameworks such as Struts, Hibernate, EJB, JSF,
etc.
Evolution of Spring Framework?
Spring Framework was initially developed by Rod Johnson in June 2003. It was first
released under the license of Apache 2.0 in the year of 2004. JavaEE application
development is made easier by the Spring Framework. XML namespaces and AspectJ
support are provided in spring 2.o, Spring 2.5 version provides annotation-driven
configuration, Java-based @Configuration model comes under in the version of spring
3.o. With the support for Java 8 and Java EE7 technologies, the latest version of spring
framework 4.o was released. When it comes to size and transparency spring framework is
lightweight and weighs around 2 MB
Features of
Spring Framework ?
• POJO Based
• Modular
• Integration with existing frameworks
• Testability
• Web MVC
• Central Exception Handling
• Lightweight Transaction management
Spring Framework Architecture
The Spring Framework consists of seven modules which are shown in the below
Figure. They are named as Spring Core, Spring AOP, Spring Web MVC, Spring DAO,
Spring ORM, Spring context, and Spring Web Flow. Each module provides different
platforms to develop different enterprise applications such as your Spring Web MVC
module is used for developing MVC-based applications.
1. Spring Core Module:
The Spring Core module is the core component of the spring framework, that provides the IoCcontainer .The Spring
container is classified into two types of implementations named as
1.
2.
Bean factory
Application context.
Bean Factory interface acts as a container for beans. It also configures and assem bles the dependencies between these objects. The
most common implementation of the Bean Factory interface is the XML bean factory class. That allows you to express the object to
compose your application and remove the interdependencies between application objects.
2. Spring AOP Module:
Spring AOP module and Object-Oriented Programming (OOP), both are similar, in which they split down the applications into a
hierarchy of objects, AOP splits down the programs into aspects. The aspects in Spring AOP, are the regular classes annotated with
@Aspect annotation. These aspects help in transaction management and logging and failure monitoring of an application. For
example, bank operations such as transferring an amount from one account to another transaction management are required.
3. Spring ORM Module:
For accessing the data from databases in an application the Spring ORM module is used. Spring ORM supports DAO, which provides
an easy way to build the DAOs-based ORM solutions that are mentioned below:
• Simple declarative transaction management
• Transparent exception handling
• Thread-safe, lightweight template classes
• DAO support classes
• Resource management
4. Spring Web MVC Module:
The Web MVC module is used for creating Web applications. The Spring Web MVC module separates the code of model and view
components of a Web application. In Spring MVC, when a request is generated from the browser, firstly it goes to the Dispatcher
Servlet class (Front Controller), that dispatches the request to a controller (Simple Form Controller class or Abstract Wizard form
Controller class) using a set of handler mappings. The controller extracts and processes the information embedded in a request and
sends it to the result to the Front controller in the form of the model object.
5. Spring Web Flow Module:
This module is an extension of the Spring Web MVC module. Spring Web MVC framework provides form controllers, such as class
Simple Form Controller and Abstract Wizard Form Controller class, to implement predefined workflow. The Spring Web Flow defines
the XML file that manages the workflow between different pages of a Web application.
6. Spring Web DAO Module:
The DAO package provides DAO support by using data access technologies such as JDBC, Hibernate, or JDO. This module introduces
a JDBC abstraction layer by eliminating the need for providing tedious JDBC coding. It also provides programmatic as well as
declarative transaction management classes. Heterogeneous Java Database Connectivity and O/R mapping help Spring to
work with several data access technologies.
7. Spring Application Context Module:
Application Context is an interface of Bean Factory. It is based on the Core module. It also implements the Message Source interface
and provides the messaging functionality to an application.
MVC Architecture
It is a Java framework that is used to build web applications. It follows the Model-View-Controller
design pattern. All the basic features of a core spring framework are implemented by it.
a. Model
It contains the data of the application. Data can be a single object or a collection of objects.
b. Controller
It contains the business logic of an application. Here, the @Controller annotation is used to
mark the class as the controller.
c. View
A view represents the provided information in a particular format. Generally, JSP+JSTL is used
to create a view page. Although spring also supports other view technologies such as Apache
Velocity, Thyme leaf, and Free Marker.
Advantages Disadvantages
1. Use of POJO
2. Ease of Testability
3. Inversion control and API’s
4. Well designed Web-
Framework
5. No need to be Reinvent
6. No needof Server
1.Complexity of spring
2. High Learning curve
3. Tons of parallel mechanisms
4. Lots of XML in spring
5. Lack of Guidelines.
THANKYOU

Weitere ähnliche Inhalte

Was ist angesagt?

Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkASG
 
Model view controller (mvc)
Model view controller (mvc)Model view controller (mvc)
Model view controller (mvc)M Ahsan Khan
 
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...Edureka!
 
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlJava Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlArjun Thakur
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depthVinay Kumar
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introductionJonathan Holloway
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action Alex Movila
 
Spring Boot & Actuators
Spring Boot & ActuatorsSpring Boot & Actuators
Spring Boot & ActuatorsVMware Tanzu
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkDineesha Suraweera
 
Spring introduction
Spring introductionSpring introduction
Spring introductionManav Prasad
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introductionRasheed Waraich
 
Spring Framework
Spring FrameworkSpring Framework
Spring Frameworknomykk
 
Connecting Connect with Spring Boot
Connecting Connect with Spring BootConnecting Connect with Spring Boot
Connecting Connect with Spring BootVincent Kok
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!Jakub Kubrynski
 

Was ist angesagt? (20)

Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Model view controller (mvc)
Model view controller (mvc)Model view controller (mvc)
Model view controller (mvc)
 
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
Spring Framework Tutorial | Spring Tutorial For Beginners With Examples | Jav...
 
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of ControlJava Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
 
Spring framework in depth
Spring framework in depthSpring framework in depth
Spring framework in depth
 
Spring boot - an introduction
Spring boot - an introductionSpring boot - an introduction
Spring boot - an introduction
 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
 
Spring boot
Spring bootSpring boot
Spring boot
 
Spring Boot & Actuators
Spring Boot & ActuatorsSpring Boot & Actuators
Spring Boot & Actuators
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Spring introduction
Spring introductionSpring introduction
Spring introduction
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
 
Xke spring boot
Xke spring bootXke spring boot
Xke spring boot
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Java Spring Framework
Java Spring FrameworkJava Spring Framework
Java Spring Framework
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Connecting Connect with Spring Boot
Connecting Connect with Spring BootConnecting Connect with Spring Boot
Connecting Connect with Spring Boot
 
Spring ppt
Spring pptSpring ppt
Spring ppt
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!
 

Ähnlich wie Spring framework-tutorial

Spring Basics
Spring BasicsSpring Basics
Spring BasicsEmprovise
 
Spring (1)
Spring (1)Spring (1)
Spring (1)Aneega
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsVirtual Nuggets
 
Introduction to j2 ee frameworks
Introduction to j2 ee frameworksIntroduction to j2 ee frameworks
Introduction to j2 ee frameworksMukesh Kumar
 
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 Introduction
Spring framework  IntroductionSpring framework  Introduction
Spring framework IntroductionAnuj Singh Rajput
 
spring framework ppt by Rohit malav
spring framework ppt by Rohit malavspring framework ppt by Rohit malav
spring framework ppt by Rohit malavRohit malav
 
Spring framework
Spring frameworkSpring framework
Spring frameworkKani Selvam
 
Spring Architecture | Advanced Java
Spring Architecture | Advanced JavaSpring Architecture | Advanced Java
Spring Architecture | Advanced JavaVISHAL DONGA
 
Struts & spring framework issues
Struts & spring framework issuesStruts & spring framework issues
Struts & spring framework issuesPrashant Seth
 
How Spring Framework Really Works?
How Spring Framework Really Works?How Spring Framework Really Works?
How Spring Framework Really Works?NexSoftsys
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework Serhat Can
 

Ähnlich wie Spring framework-tutorial (20)

Spring notes
Spring notesSpring notes
Spring notes
 
Spring Basics
Spring BasicsSpring Basics
Spring Basics
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Spring (1)
Spring (1)Spring (1)
Spring (1)
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggets
 
Introduction to j2 ee frameworks
Introduction to j2 ee frameworksIntroduction to j2 ee frameworks
Introduction to j2 ee frameworks
 
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 Introduction
Spring framework  IntroductionSpring framework  Introduction
Spring framework Introduction
 
spring framework ppt by Rohit malav
spring framework ppt by Rohit malavspring framework ppt by Rohit malav
spring framework ppt by Rohit malav
 
Java spring ppt
Java spring pptJava spring ppt
Java spring ppt
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Spring Architecture | Advanced Java
Spring Architecture | Advanced JavaSpring Architecture | Advanced Java
Spring Architecture | Advanced Java
 
Struts & spring framework issues
Struts & spring framework issuesStruts & spring framework issues
Struts & spring framework issues
 
How Spring Framework Really Works?
How Spring Framework Really Works?How Spring Framework Really Works?
How Spring Framework Really Works?
 
Spring Framework Rohit
Spring Framework RohitSpring Framework Rohit
Spring Framework Rohit
 
Spring
SpringSpring
Spring
 
Springs_Training
Springs_TrainingSprings_Training
Springs_Training
 
Spring 2
Spring 2Spring 2
Spring 2
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 

Kürzlich hochgeladen

microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 

Kürzlich hochgeladen (20)

Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 

Spring framework-tutorial

  • 2. Topics Covered 1.What is Spring Framework ? 2. Evolution of Spring Framework 3. Features 4. Architecture of Spring Framework 5. MVC Architecture 6. Advantages and Disadvantages
  • 3. What is Spring Framework ? Spring is a lightweight framework. It is an open-source Java Platform which is used for developing robust Java applications very rapidly and easily. Its support is extended to various frameworks such as Struts, Hibernate, EJB, JSF, etc.
  • 4. Evolution of Spring Framework? Spring Framework was initially developed by Rod Johnson in June 2003. It was first released under the license of Apache 2.0 in the year of 2004. JavaEE application development is made easier by the Spring Framework. XML namespaces and AspectJ support are provided in spring 2.o, Spring 2.5 version provides annotation-driven configuration, Java-based @Configuration model comes under in the version of spring 3.o. With the support for Java 8 and Java EE7 technologies, the latest version of spring framework 4.o was released. When it comes to size and transparency spring framework is lightweight and weighs around 2 MB
  • 5. Features of Spring Framework ? • POJO Based • Modular • Integration with existing frameworks • Testability • Web MVC • Central Exception Handling • Lightweight Transaction management
  • 6. Spring Framework Architecture The Spring Framework consists of seven modules which are shown in the below Figure. They are named as Spring Core, Spring AOP, Spring Web MVC, Spring DAO, Spring ORM, Spring context, and Spring Web Flow. Each module provides different platforms to develop different enterprise applications such as your Spring Web MVC module is used for developing MVC-based applications.
  • 7.
  • 8. 1. Spring Core Module: The Spring Core module is the core component of the spring framework, that provides the IoCcontainer .The Spring container is classified into two types of implementations named as 1. 2. Bean factory Application context. Bean Factory interface acts as a container for beans. It also configures and assem bles the dependencies between these objects. The most common implementation of the Bean Factory interface is the XML bean factory class. That allows you to express the object to compose your application and remove the interdependencies between application objects. 2. Spring AOP Module: Spring AOP module and Object-Oriented Programming (OOP), both are similar, in which they split down the applications into a hierarchy of objects, AOP splits down the programs into aspects. The aspects in Spring AOP, are the regular classes annotated with @Aspect annotation. These aspects help in transaction management and logging and failure monitoring of an application. For example, bank operations such as transferring an amount from one account to another transaction management are required. 3. Spring ORM Module: For accessing the data from databases in an application the Spring ORM module is used. Spring ORM supports DAO, which provides an easy way to build the DAOs-based ORM solutions that are mentioned below: • Simple declarative transaction management • Transparent exception handling • Thread-safe, lightweight template classes • DAO support classes • Resource management
  • 9. 4. Spring Web MVC Module: The Web MVC module is used for creating Web applications. The Spring Web MVC module separates the code of model and view components of a Web application. In Spring MVC, when a request is generated from the browser, firstly it goes to the Dispatcher Servlet class (Front Controller), that dispatches the request to a controller (Simple Form Controller class or Abstract Wizard form Controller class) using a set of handler mappings. The controller extracts and processes the information embedded in a request and sends it to the result to the Front controller in the form of the model object. 5. Spring Web Flow Module: This module is an extension of the Spring Web MVC module. Spring Web MVC framework provides form controllers, such as class Simple Form Controller and Abstract Wizard Form Controller class, to implement predefined workflow. The Spring Web Flow defines the XML file that manages the workflow between different pages of a Web application. 6. Spring Web DAO Module: The DAO package provides DAO support by using data access technologies such as JDBC, Hibernate, or JDO. This module introduces a JDBC abstraction layer by eliminating the need for providing tedious JDBC coding. It also provides programmatic as well as declarative transaction management classes. Heterogeneous Java Database Connectivity and O/R mapping help Spring to work with several data access technologies. 7. Spring Application Context Module: Application Context is an interface of Bean Factory. It is based on the Core module. It also implements the Message Source interface and provides the messaging functionality to an application.
  • 10. MVC Architecture It is a Java framework that is used to build web applications. It follows the Model-View-Controller design pattern. All the basic features of a core spring framework are implemented by it.
  • 11. a. Model It contains the data of the application. Data can be a single object or a collection of objects. b. Controller It contains the business logic of an application. Here, the @Controller annotation is used to mark the class as the controller. c. View A view represents the provided information in a particular format. Generally, JSP+JSTL is used to create a view page. Although spring also supports other view technologies such as Apache Velocity, Thyme leaf, and Free Marker.
  • 12. Advantages Disadvantages 1. Use of POJO 2. Ease of Testability 3. Inversion control and API’s 4. Well designed Web- Framework 5. No need to be Reinvent 6. No needof Server 1.Complexity of spring 2. High Learning curve 3. Tons of parallel mechanisms 4. Lots of XML in spring 5. Lack of Guidelines.