SlideShare a Scribd company logo
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.
Spring framework-tutorial
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

More Related Content

PDF
Introduction to Spring Boot!
PDF
Spring framework Introduction
PPTX
Spring boot
PPTX
Spring Framework
PPTX
Introduction to Spring Framework
PPTX
Introduction to Spring Boot
PDF
What Is Spring Framework In Java | Spring Framework Tutorial For Beginners Wi...
PDF
Spring Boot
Introduction to Spring Boot!
Spring framework Introduction
Spring boot
Spring Framework
Introduction to Spring Framework
Introduction to Spring Boot
What Is Spring Framework In Java | Spring Framework Tutorial For Beginners Wi...
Spring Boot

What's hot (20)

PDF
Spring boot
PDF
Spring Boot
PPTX
Spring framework in depth
PPT
Spring Boot in Action
PDF
Complete Java Course
PDF
Spring Framework
PDF
Dot Net Core
PPTX
Java Spring Framework
PPTX
Selenium WebDriver
PDF
Spring Framework - AOP
PDF
Spring boot introduction
PDF
Java spring framework
PDF
REST APIs with Spring
PPTX
Spring boot Introduction
PDF
Introduction to Spring Framework
PPTX
Introduction to spring boot
PPTX
Spring boot
PPT
Spring introduction
PPTX
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
PPTX
Spring framework
Spring boot
Spring Boot
Spring framework in depth
Spring Boot in Action
Complete Java Course
Spring Framework
Dot Net Core
Java Spring Framework
Selenium WebDriver
Spring Framework - AOP
Spring boot introduction
Java spring framework
REST APIs with Spring
Spring boot Introduction
Introduction to Spring Framework
Introduction to spring boot
Spring boot
Spring introduction
Java Spring framework, Dependency Injection, DI, IoC, Inversion of Control
Spring framework
Ad

Similar to Spring framework-tutorial (20)

DOCX
Spring notes
PPTX
Spring Basics
ODT
Spring framework
PDF
Spring core module
PPTX
Spring (1)
PDF
Spring Framework Tutorial | VirtualNuggets
PPTX
Introduction to j2 ee frameworks
PDF
Comparison of spring and other frameworks.!
PPTX
Spring framework Introduction
PPTX
spring framework ppt by Rohit malav
PPTX
Java spring ppt
PDF
Spring mvc
PPTX
Introduction to Spring Framework
 
PPTX
Spring framework
PPTX
Spring Architecture | Advanced Java
PPTX
Struts & spring framework issues
PPTX
How Spring Framework Really Works?
PPTX
Spring Framework Rohit
PPTX
Spring
PPTX
Springs_Training
Spring notes
Spring Basics
Spring framework
Spring core module
Spring (1)
Spring Framework Tutorial | VirtualNuggets
Introduction to j2 ee frameworks
Comparison of spring and other frameworks.!
Spring framework Introduction
spring framework ppt by Rohit malav
Java spring ppt
Spring mvc
Introduction to Spring Framework
 
Spring framework
Spring Architecture | Advanced Java
Struts & spring framework issues
How Spring Framework Really Works?
Spring Framework Rohit
Spring
Springs_Training
Ad

Recently uploaded (20)

PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Insiders guide to clinical Medicine.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Cell Structure & Organelles in detailed.
PDF
Classroom Observation Tools for Teachers
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
master seminar digital applications in india
PDF
Computing-Curriculum for Schools in Ghana
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Insiders guide to clinical Medicine.pdf
Complications of Minimal Access Surgery at WLH
PPH.pptx obstetrics and gynecology in nursing
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Cell Structure & Organelles in detailed.
Classroom Observation Tools for Teachers
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Supply Chain Operations Speaking Notes -ICLT Program
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
TR - Agricultural Crops Production NC III.pdf
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Microbial disease of the cardiovascular and lymphatic systems
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
FourierSeries-QuestionsWithAnswers(Part-A).pdf
master seminar digital applications in india
Computing-Curriculum for Schools in Ghana
O5-L3 Freight Transport Ops (International) V1.pdf

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.
  • 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.