SlideShare a Scribd company logo
Introduction to
Spring Framework
Framework
 What is a Framework?
 Frameworks are large prewritten code to which you add your
own code to solve a problem in a specific domain.
 You make use of a framework by calling its methods,
inheritance and supplying “call-backs” listeners.
Example - Java’s Swing and AWT classes. Those have a huge amount of code
to manage the user interface and there is inversion of control.
Spring Framework
 What is a Spring Framework?
 Spring is an open source framework created to address the
complexity of enterprise application development.
 Creates high performing, easily testable, reusable code and
handles the infrastructure so you can focus on application.
 One of the chief advantages of the Spring framework is its
layered architecture, which allows you to be selective about
which of its components you use while also providing a
cohesive framework for J2EE application development.
Features Of Spring Framework
Spring is a Framework of Frameworks
• Lightweight
• Layered Architecture
• Predefined Templates
• Fast Development
• MVC Framework
• Inversion Of Control (IOC)
• Aspect Oriented Programming (AOP)
• Data Access Framework
• JDBC Abstraction Layer
• Logging
Overview of the Spring Framework
Spring Framework Architecture
 The Spring framework is a layered architecture which
consists of several modules.
 All modules are built on the top of its core container.
 It's modular architecture enables integration with other
frameworks without much difficulties.
 Consists of around 20 modules which are generalized into
Core Container, Data Access/ Integration, Web, AOP (Aspect
Oriented Programming), Instrumentation, and Test. All the
modules have their own functionalities that are utilized to
build an application.
Spring Framework Modules
Spring Framework Modules
 Core Container
1. Spring Core: This module is the core of the Spring Framework. It
provides implementation for features like IoC (Inversion of Control)
and Dependency Injection with singleton design pattern.
2. Spring Bean: This module provides implementation for the factory
design pattern through BeanFactory.
3. Spring Context: This module is built on the solid base provided by
the Core and the Beans modules and is a medium to access any object
defined and configured.
4. Spring Expression Languages (SpEL): This module is an
extension to expression language supported by Java server pages. It
provides a powerful expression language for querying and manipulating
an object graph, at runtime.
Spring Framework Modules
 AOP Module
• Spring AOP module provides interceptors to intercept an
application, for example, when a method is executed, you
can add extra functionality before or after the method
execution.
• Spring AOP's approach to AOP differs from that of most other
AOP frameworks. The aim is to provide a close integration
between AOP implementation and Spring IoC, not to provide
the most complete AOP implementation.
Spring Framework Modules
 Spring Data Access/ Integration
i. JDBC: This module provides JDBC abstraction layer which eliminates the need
of repetitive and unnecessary exception handling overhead.
ii. ORM: ORM stands for Object Relational Mapping. This module provides
consistency/portability to our code regardless of data access technologies
based on object oriented mapping concept.
iii. OXM: OXM stands for Object XML Mappers. It is used to convert the objects
into XML format and vice versa. The Spring OXM provides an uniform API to
access any of these OXM frameworks.
iv. JMS: JMS stands for Java Messaging Service. This module contains features for
producing and consuming messages among various clients.
v. Transaction: This module supports programmatic and declarative transaction
management for classes that implement special interfaces and for all your
POJOs. All the enterprise level transaction implementation concepts can be
implemented in Spring by using this module.
Spring Framework Modules
 Web Module
• Web: This module using servlet listeners and a web-oriented application
context, provides basic web-oriented integration features and the initialization
of the IoC container.
• Web-Servlet: This module contains Model-View-Controller (MVC) based
implementation for web applications. It provides all other features of MVC,
including UI tags and data validations.
• Web-Socket: This module provides support for WebSocket based and two-
way communication between the client and the server in web applications.
• Web-Portlet: This module is also known as Spring-MVC-Portlet module. It
provides the support for Spring based Portlets and provides MVC implementation
to be used in a portlet environment.
Spring Framework Modules
 Test Module
 This module supports the testing of Spring components with
JUnit or TestNG. It provides consistent loading of
Spring ApplicationContexts and caching of those contexts.
Spring Framework Advantages
 Templates : Provides predefined templates for JDBC,
Hibernate, JPA etc., thus reducing your effort of writing too
much code.
 Loose Coupling : Because of dependency injection
feature, your code becomes loosely coupled.
 Lightweight : Works on POJOs (Plain Old Java Object) which
makes your application lightweight.
 Declarative : Programming through aspects, common
conventions and provides declarative support for
transactions, validation, caching and formatting.
Spring Framework Advantages
 Fast Development : Using Spring Framework, the
development of Java Enterprise Edition (JEE) applications
became faster.
 Strong Abstraction : It provides strong abstraction to Java
Enterprise Edition (JEE) specifications.
 Maintainability : Reusable Code and Open Source.
Eliminating boilerplate code with aspects and template.
 Testing : Testing a Spring Application is so easy for DI and no
server needs to run the application.
Key Component - IoC
Inversion Of Control
Concept of application development.
“Don't call us, we'll call you.”
Dependency Injection is form of IoC.
Key Component - DI
Dependency Injection
 The technology that actually defines spring (Heart of Spring).
 When applying DI, the objects are given their
dependencies at creation time by some external entity
that coordinates each object in the system. In other
words, dependencies are injected into objects.
 “Don't call around for your dependencies, we'll give them
to you when we need you”.
 Exist in two form:
1. Constructor Injection
2. Setter Inject
Key Component - DI
Dependency Injection
 Dependency Injection helps us to keep our classes as
independent as possible.
Increase reuse by applying low coupling.
Easy Testing.
More Understandable.
Key Component - DI
Dependency Injection
An injection is the passing of dependency (a service) to a
dependent object (a client).
Passing the service to the client, rather than allowing a client to
build or find the service, is the fundamental requirement of the
pattern.
“Dependency Injection is a pattern where the container passes
objects by name to other objects, via either constructors, properties
or factory methods.”
Key Component – DI & IoC
Relationship between DI and Inversion of Control
In software engineering, inversion of Control (IoC)
describes a design in which custom-written portions of a
computer program receive the flow of control from a
generic reusable library.
The Inversion of Control (Ioc) is a general concepts, and it can be expressed in many
different ways and dependency Injection is merely one concrete example of
Inversion of Control.
Key Component – IoC
Ioc Container
 The spring container (IoC Container) is at the core of the Spring
Framework.
 The Container will create the objects, wire them together, configure
them, and manage their complete lifecycle from creation till
destruction.

More Related Content

What's hot (20)

PPT
jpa-hibernate-presentation
John Slick
 
PPTX
Spring Framework
tola99
 
PPT
Java Persistence API (JPA) Step By Step
Guo Albert
 
PPT
Spring Core
Pushan Bhattacharya
 
PPTX
Introduction to Spring Framework
Dineesha Suraweera
 
PPTX
Introduction to Spring Framework
Serhat Can
 
PDF
Spring Boot
Jaran Flaath
 
PDF
Spring Data JPA
Knoldus Inc.
 
PPTX
Java Spring
AathikaJava
 
PPTX
Spring framework in depth
Vinay Kumar
 
PPT
Presentation Spring, Spring MVC
Nathaniel Richand
 
PPSX
Spring - Part 1 - IoC, Di and Beans
Hitesh-Java
 
ODP
Spring User Guide
Muthuselvam RS
 
PPTX
Spring Boot
Jiayun Zhou
 
PPTX
Spring jdbc
Harshit Choudhary
 
PPTX
Java Spring Framework
Mehul Jariwala
 
PPT
Spring Boot in Action
Alex Movila
 
PPTX
Introduction to spring boot
Santosh Kumar Kar
 
PPTX
Spring boot
Gyanendra Yadav
 
ODP
ORM, JPA, & Hibernate Overview
Brett Meyer
 
jpa-hibernate-presentation
John Slick
 
Spring Framework
tola99
 
Java Persistence API (JPA) Step By Step
Guo Albert
 
Spring Core
Pushan Bhattacharya
 
Introduction to Spring Framework
Dineesha Suraweera
 
Introduction to Spring Framework
Serhat Can
 
Spring Boot
Jaran Flaath
 
Spring Data JPA
Knoldus Inc.
 
Java Spring
AathikaJava
 
Spring framework in depth
Vinay Kumar
 
Presentation Spring, Spring MVC
Nathaniel Richand
 
Spring - Part 1 - IoC, Di and Beans
Hitesh-Java
 
Spring User Guide
Muthuselvam RS
 
Spring Boot
Jiayun Zhou
 
Spring jdbc
Harshit Choudhary
 
Java Spring Framework
Mehul Jariwala
 
Spring Boot in Action
Alex Movila
 
Introduction to spring boot
Santosh Kumar Kar
 
Spring boot
Gyanendra Yadav
 
ORM, JPA, & Hibernate Overview
Brett Meyer
 

Similar to Introduction to Spring Framework (20)

PDF
Spring Framework Tutorial | VirtualNuggets
Virtual Nuggets
 
PPT
Spring ppt
Mumbai Academisc
 
PPTX
1. Spring intro IoC
ASG
 
PPTX
Spring Framework Rohit
Rohit Prabhakar
 
PPTX
Introduction to Spring sec1.pptx
NourhanTarek23
 
PPT
Spring
Prashant Kumar
 
ODT
Spring framework
Shivi Kashyap
 
PPTX
Spring framework
Kani Selvam
 
ODP
Introduction to Spring Framework and Spring IoC
Funnelll
 
DOCX
Spring notes
Rajeev Uppala
 
PPTX
Spring framework Introduction
Anuj Singh Rajput
 
PDF
Spring 2
Aruvi Thottlan
 
PPTX
unit_1_spring_1.pptxfgfgggjffgggddddgggg
zmulani8
 
PPTX
Spring tutorials
TIB Academy
 
PPT
IEEE Day 2013 Baku - Spring Framework overview and Spring MVC
Ilkin Ashrafli
 
PPTX
Spring framework-tutorial
vinayiqbusiness
 
PPTX
Java spring ppt
natashasweety7
 
PPT
Spring - a framework written by developers
MarcioSoaresPereira1
 
PDF
Spring mvc
Hamid Ghorbani
 
PDF
Spring presentecion isil
Willy Aguirre
 
Spring Framework Tutorial | VirtualNuggets
Virtual Nuggets
 
Spring ppt
Mumbai Academisc
 
1. Spring intro IoC
ASG
 
Spring Framework Rohit
Rohit Prabhakar
 
Introduction to Spring sec1.pptx
NourhanTarek23
 
Spring framework
Shivi Kashyap
 
Spring framework
Kani Selvam
 
Introduction to Spring Framework and Spring IoC
Funnelll
 
Spring notes
Rajeev Uppala
 
Spring framework Introduction
Anuj Singh Rajput
 
Spring 2
Aruvi Thottlan
 
unit_1_spring_1.pptxfgfgggjffgggddddgggg
zmulani8
 
Spring tutorials
TIB Academy
 
IEEE Day 2013 Baku - Spring Framework overview and Spring MVC
Ilkin Ashrafli
 
Spring framework-tutorial
vinayiqbusiness
 
Java spring ppt
natashasweety7
 
Spring - a framework written by developers
MarcioSoaresPereira1
 
Spring mvc
Hamid Ghorbani
 
Spring presentecion isil
Willy Aguirre
 
Ad

More from ASG (6)

PPTX
Angular jS Introduction by Google
ASG
 
PPTX
Dependency Injection in Spring
ASG
 
PPTX
JSP MCQ Question with Answer
ASG
 
PPTX
Rajshahi college (Golam Hossen)
ASG
 
PPTX
Call center technology(She Power Project)
ASG
 
PPTX
20th clubs joint quiz competition
ASG
 
Angular jS Introduction by Google
ASG
 
Dependency Injection in Spring
ASG
 
JSP MCQ Question with Answer
ASG
 
Rajshahi college (Golam Hossen)
ASG
 
Call center technology(She Power Project)
ASG
 
20th clubs joint quiz competition
ASG
 
Ad

Recently uploaded (20)

PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
[Newgen] NewgenONE Marvin Brochure 1.pdf
darshakparmar
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 

Introduction to Spring Framework

  • 2. Framework  What is a Framework?  Frameworks are large prewritten code to which you add your own code to solve a problem in a specific domain.  You make use of a framework by calling its methods, inheritance and supplying “call-backs” listeners. Example - Java’s Swing and AWT classes. Those have a huge amount of code to manage the user interface and there is inversion of control.
  • 3. Spring Framework  What is a Spring Framework?  Spring is an open source framework created to address the complexity of enterprise application development.  Creates high performing, easily testable, reusable code and handles the infrastructure so you can focus on application.  One of the chief advantages of the Spring framework is its layered architecture, which allows you to be selective about which of its components you use while also providing a cohesive framework for J2EE application development.
  • 4. Features Of Spring Framework Spring is a Framework of Frameworks • Lightweight • Layered Architecture • Predefined Templates • Fast Development • MVC Framework • Inversion Of Control (IOC) • Aspect Oriented Programming (AOP) • Data Access Framework • JDBC Abstraction Layer • Logging
  • 5. Overview of the Spring Framework
  • 6. Spring Framework Architecture  The Spring framework is a layered architecture which consists of several modules.  All modules are built on the top of its core container.  It's modular architecture enables integration with other frameworks without much difficulties.  Consists of around 20 modules which are generalized into Core Container, Data Access/ Integration, Web, AOP (Aspect Oriented Programming), Instrumentation, and Test. All the modules have their own functionalities that are utilized to build an application.
  • 8. Spring Framework Modules  Core Container 1. Spring Core: This module is the core of the Spring Framework. It provides implementation for features like IoC (Inversion of Control) and Dependency Injection with singleton design pattern. 2. Spring Bean: This module provides implementation for the factory design pattern through BeanFactory. 3. Spring Context: This module is built on the solid base provided by the Core and the Beans modules and is a medium to access any object defined and configured. 4. Spring Expression Languages (SpEL): This module is an extension to expression language supported by Java server pages. It provides a powerful expression language for querying and manipulating an object graph, at runtime.
  • 9. Spring Framework Modules  AOP Module • Spring AOP module provides interceptors to intercept an application, for example, when a method is executed, you can add extra functionality before or after the method execution. • Spring AOP's approach to AOP differs from that of most other AOP frameworks. The aim is to provide a close integration between AOP implementation and Spring IoC, not to provide the most complete AOP implementation.
  • 10. Spring Framework Modules  Spring Data Access/ Integration i. JDBC: This module provides JDBC abstraction layer which eliminates the need of repetitive and unnecessary exception handling overhead. ii. ORM: ORM stands for Object Relational Mapping. This module provides consistency/portability to our code regardless of data access technologies based on object oriented mapping concept. iii. OXM: OXM stands for Object XML Mappers. It is used to convert the objects into XML format and vice versa. The Spring OXM provides an uniform API to access any of these OXM frameworks. iv. JMS: JMS stands for Java Messaging Service. This module contains features for producing and consuming messages among various clients. v. Transaction: This module supports programmatic and declarative transaction management for classes that implement special interfaces and for all your POJOs. All the enterprise level transaction implementation concepts can be implemented in Spring by using this module.
  • 11. Spring Framework Modules  Web Module • Web: This module using servlet listeners and a web-oriented application context, provides basic web-oriented integration features and the initialization of the IoC container. • Web-Servlet: This module contains Model-View-Controller (MVC) based implementation for web applications. It provides all other features of MVC, including UI tags and data validations. • Web-Socket: This module provides support for WebSocket based and two- way communication between the client and the server in web applications. • Web-Portlet: This module is also known as Spring-MVC-Portlet module. It provides the support for Spring based Portlets and provides MVC implementation to be used in a portlet environment.
  • 12. Spring Framework Modules  Test Module  This module supports the testing of Spring components with JUnit or TestNG. It provides consistent loading of Spring ApplicationContexts and caching of those contexts.
  • 13. Spring Framework Advantages  Templates : Provides predefined templates for JDBC, Hibernate, JPA etc., thus reducing your effort of writing too much code.  Loose Coupling : Because of dependency injection feature, your code becomes loosely coupled.  Lightweight : Works on POJOs (Plain Old Java Object) which makes your application lightweight.  Declarative : Programming through aspects, common conventions and provides declarative support for transactions, validation, caching and formatting.
  • 14. Spring Framework Advantages  Fast Development : Using Spring Framework, the development of Java Enterprise Edition (JEE) applications became faster.  Strong Abstraction : It provides strong abstraction to Java Enterprise Edition (JEE) specifications.  Maintainability : Reusable Code and Open Source. Eliminating boilerplate code with aspects and template.  Testing : Testing a Spring Application is so easy for DI and no server needs to run the application.
  • 15. Key Component - IoC Inversion Of Control Concept of application development. “Don't call us, we'll call you.” Dependency Injection is form of IoC.
  • 16. Key Component - DI Dependency Injection  The technology that actually defines spring (Heart of Spring).  When applying DI, the objects are given their dependencies at creation time by some external entity that coordinates each object in the system. In other words, dependencies are injected into objects.  “Don't call around for your dependencies, we'll give them to you when we need you”.  Exist in two form: 1. Constructor Injection 2. Setter Inject
  • 17. Key Component - DI Dependency Injection  Dependency Injection helps us to keep our classes as independent as possible. Increase reuse by applying low coupling. Easy Testing. More Understandable.
  • 18. Key Component - DI Dependency Injection An injection is the passing of dependency (a service) to a dependent object (a client). Passing the service to the client, rather than allowing a client to build or find the service, is the fundamental requirement of the pattern. “Dependency Injection is a pattern where the container passes objects by name to other objects, via either constructors, properties or factory methods.”
  • 19. Key Component – DI & IoC Relationship between DI and Inversion of Control In software engineering, inversion of Control (IoC) describes a design in which custom-written portions of a computer program receive the flow of control from a generic reusable library. The Inversion of Control (Ioc) is a general concepts, and it can be expressed in many different ways and dependency Injection is merely one concrete example of Inversion of Control.
  • 20. Key Component – IoC Ioc Container  The spring container (IoC Container) is at the core of the Spring Framework.  The Container will create the objects, wire them together, configure them, and manage their complete lifecycle from creation till destruction.