SlideShare a Scribd company logo
Introduction to
Spring
framework
SpringMehul
Jariwala
1
• Framework.
• Spring History.
• Key Features of Spring
Framework.
• Spring Architecture.
• Spring Files.
• Steps For Creating Spring Projects.
Overvie
w
2
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.They
have a huge amount of code to manage the
user interface and there is inversion of control.
3
Framework
• Software frameworks may include support
programs, compilers , code libraries , tool sets ,
API , Function, Producer , Datafile.
4
Spring
 Spring is the most popular application
development framework for enterprise Java™.
 Millions of developers use Spring to create
high performing, easily testable, reusable code
without any lock-in.
 Open source Java platform since 2003.
 Reduces code and speeds up development.
 Current Version is 4.0 5
Spring layer
Presentation layer – An MVC framework that is most
similar to Struts but is more powerful and easy to use.
Business layer – Lightweight IOC container and AOP
support (including built in aspects)
Persistence layer – DAO template support for popular
ORMs and JDBC
6
Spring layer
Presentation Logic Layer
Business Logic Layer
Data Access Layer
PHP,JSP,HTML
Data Base
App Logic
Data StorageBrowser View
Procedures
7
Spring History
8
Goals
 Make J2EE easier to use
 Make the common tasks easier
 Promote good programming practice.
 You can focus on the domain problems.
9
 Lightweight: Spring Framework is lightweight
with respect to size and transparency.
 Container: Spring Framework creates and
manages the life cycle and configuration of
application objects.
 Spring supports All types of application
development: We can develop any type of
applications using spring, e.g. Core java, web
Application, Distributed application, Enterprise
application.
Spring Features
10
Spring 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
11
Spring Architecture
12
Spring Architecture
The Core Module: This module contains
the Bean Factory, an implementation of Factory
Pattern which creates the bean as per the
configurations provided by the developer in an
XML file.
Core Module
The IOC Container.
13
Spring Architecture
 The AOP Module: AOP is a useful technique
that enables adding executable blocks to the
source code without explicitly changing it.
 AOP to avoid re-implementation of some
common behaviour in multiple classes.
AOP
Spring AOP
AspectJ integration
14
Spring Architecture
 The DAO Module:- (Data Access Object)
standardizes the data access work using
JDBC, Hibernate or JDO.
 This provides an abstraction layer to the low
level task of creating a connection, releasing it
etc.
DAO
Spring JDBC
Transaction
Management
15
Spring Architecture
 The ORM Module:- Spring doesn’t provides its
own ORM implementation but offers
integrations with popular Object Relational
mapping tools like Hibernate, iBATIS SQL
Maps, Oracle TopLink and JPA etc.
ORM
Hibernate
JPA,JDO,OJB
16
Spring Architecture
 The JEE Module:- It also provides support for
JMX, JCA, EJB and JMS etc.
 JCA (Java EE Connection API).
 EJB (Enterprise JavaBeans).
 JMS (Java Message Service).
JEE
EJB
JMS
17
Spring Architecture
 The Web Module:- Spring comes with MVC
framework which eases the task of developing
web applications.
 It also integrates well with the most popular
MVC frameworks like Struts, Tapestry, JSF,
Wicket etc.
18
New about Spring
19
Spring Project File
 Application Context.xml
The Application Context is Spring's advanced
container. Similar to Bean Factory, it can load
bean definitions.
This container is defined
by org.springframework.context.ApplicationCont
e xtinterface.
20
Spring Project File
 The most commonly used Application
Context implementations.
1. FileSystemXmlApplicationContext − Here you need
to provide the full path of the XML bean configuration
file.
2. ClassPathXmlApplicationContext − Here you do not
need To provide the full path of the XML file but you
need to set CLASSPATH.
3. WebXmlApplicationContext − This container loads
the XML file with definitions of all beans from within a21
Spring Project File
 Dispatcher-servlet.xml
The Spring Web model-view-controller (MVC)
framework is designed around a Dispatcher
Servlet that handles all the HTTP requests and
responses.
22
Spring Project File
 Web.xml
The /WEB-INF/web.xml file is used to define
how to deploy the web module to a Servlet
container like JBoss, Tomcat, Glassfish or any
other servlet container.
Basically web.xml tell container all servlets in
the web application with <servlet> element , then
tell container when to use which servlet by the url
mapping with <servlet-mapping> element.
23
Steps For Creating Project
 Step 1:- Creating Projects and Select Java
Web Application.
24
Steps For Creating Project
 Step 2:- Write a Name of Java Application
Projects And Click Finish.
25
Steps For Creating Project
 Step 3:- Select Spring Web MVC
Frameworks.
26
Steps For Creating Project
 Step 4:- Structure Of Spring MVC.
27
Reference
 https://www.roseindia.net/spring/architecture-of-
spring.shtml
 http://www.java4s.com/spring-mvc/spring-mvc-
execution-flow-diagram-spring-mvc-3-2-flow/
 https://dzone.com/articles/spring-framework-architecture
 https://www.javacodegeeks.com/2013/02/introduction-to-
javaee-concepts.html
 https://www.javatpoint.com/example-of-spring-
application-in-eclipse
 https://www.tutorialspoint.com/spring/spring_web_mvc_f
ramework.htm
 https://stackoverflow.com/questions/4545968/loading-
application-context-xml 28
Thanks You.
29

More Related Content

PPSX
Spring - Part 1 - IoC, Di and Beans
PDF
Introduction to Spring Framework
PDF
Spring core module
PDF
Spring Framework
PPT
Spring ppt
PPTX
Spring Web MVC
PPT
Spring Core
PPTX
Spring Framework
Spring - Part 1 - IoC, Di and Beans
Introduction to Spring Framework
Spring core module
Spring Framework
Spring ppt
Spring Web MVC
Spring Core
Spring Framework

What's hot (20)

PPTX
Introduction to Spring Framework
PPTX
Spring boot Introduction
PPT
Spring Framework
PPTX
Spring boot
PPTX
Spring Boot Tutorial
PPTX
Introduction to Spring Boot
PPTX
Spring boot - an introduction
PDF
Spring framework Introduction
PDF
Spring Framework - Core
PPTX
Spring Boot
PPTX
Core java complete ppt(note)
PPTX
Introduction to java
PPT
Spring Boot in Action
PPTX
Advance Java Topics (J2EE)
PDF
Spring Boot
PPTX
Spring data jpa
PDF
Spring boot introduction
PPTX
Spring boot
PDF
JPA and Hibernate
PPTX
Dependency injection presentation
Introduction to Spring Framework
Spring boot Introduction
Spring Framework
Spring boot
Spring Boot Tutorial
Introduction to Spring Boot
Spring boot - an introduction
Spring framework Introduction
Spring Framework - Core
Spring Boot
Core java complete ppt(note)
Introduction to java
Spring Boot in Action
Advance Java Topics (J2EE)
Spring Boot
Spring data jpa
Spring boot introduction
Spring boot
JPA and Hibernate
Dependency injection presentation
Ad

Similar to Java Spring Framework (20)

PPTX
spring framework ppt by Rohit malav
PPTX
Spring Framework Rohit
PPT
Spring - a framework written by developers
PDF
Getting Started with Spring Framework
PPTX
Spring framework-tutorial
PPTX
Struts & spring framework issues
PPTX
Introduction to j2 ee frameworks
PPTX
Spring tutorials
PPTX
Spring framework
ODP
Spring Mvc,Java, Spring
PPTX
Introduction to Spring Framework
PPTX
Skillwise-Spring framework 1
PDF
Integration of Struts & Spring & Hibernate for Enterprise Applications
PPTX
Spring framework Introduction
PDF
01 spring-intro
PDF
Spring Framework Tutorial | VirtualNuggets
DOCX
Spring notes
PDF
Spring presentecion isil
PDF
Spring presentecion isil
PPTX
Spring framework
spring framework ppt by Rohit malav
Spring Framework Rohit
Spring - a framework written by developers
Getting Started with Spring Framework
Spring framework-tutorial
Struts & spring framework issues
Introduction to j2 ee frameworks
Spring tutorials
Spring framework
Spring Mvc,Java, Spring
Introduction to Spring Framework
Skillwise-Spring framework 1
Integration of Struts & Spring & Hibernate for Enterprise Applications
Spring framework Introduction
01 spring-intro
Spring Framework Tutorial | VirtualNuggets
Spring notes
Spring presentecion isil
Spring presentecion isil
Spring framework
Ad

Recently uploaded (20)

PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PPTX
Cell Structure & Organelles in detailed.
PDF
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
RMMM.pdf make it easy to upload and study
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Pre independence Education in Inndia.pdf
PPTX
Cell Types and Its function , kingdom of life
PDF
VCE English Exam - Section C Student Revision Booklet
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
102 student loan defaulters named and shamed – Is someone you know on the list?
Final Presentation General Medicine 03-08-2024.pptx
Basic Mud Logging Guide for educational purpose
Microbial diseases, their pathogenesis and prophylaxis
Cell Structure & Organelles in detailed.
Mark Klimek Lecture Notes_240423 revision books _173037.pdf
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Pharma ospi slides which help in ospi learning
RMMM.pdf make it easy to upload and study
Microbial disease of the cardiovascular and lymphatic systems
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Supply Chain Operations Speaking Notes -ICLT Program
Renaissance Architecture: A Journey from Faith to Humanism
human mycosis Human fungal infections are called human mycosis..pptx
O5-L3 Freight Transport Ops (International) V1.pdf
Pre independence Education in Inndia.pdf
Cell Types and Its function , kingdom of life
VCE English Exam - Section C Student Revision Booklet
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table

Java Spring Framework

  • 2. • Framework. • Spring History. • Key Features of Spring Framework. • Spring Architecture. • Spring Files. • Steps For Creating Spring Projects. Overvie w 2
  • 3. 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.They have a huge amount of code to manage the user interface and there is inversion of control. 3
  • 4. Framework • Software frameworks may include support programs, compilers , code libraries , tool sets , API , Function, Producer , Datafile. 4
  • 5. Spring  Spring is the most popular application development framework for enterprise Java™.  Millions of developers use Spring to create high performing, easily testable, reusable code without any lock-in.  Open source Java platform since 2003.  Reduces code and speeds up development.  Current Version is 4.0 5
  • 6. Spring layer Presentation layer – An MVC framework that is most similar to Struts but is more powerful and easy to use. Business layer – Lightweight IOC container and AOP support (including built in aspects) Persistence layer – DAO template support for popular ORMs and JDBC 6
  • 7. Spring layer Presentation Logic Layer Business Logic Layer Data Access Layer PHP,JSP,HTML Data Base App Logic Data StorageBrowser View Procedures 7
  • 9. Goals  Make J2EE easier to use  Make the common tasks easier  Promote good programming practice.  You can focus on the domain problems. 9
  • 10.  Lightweight: Spring Framework is lightweight with respect to size and transparency.  Container: Spring Framework creates and manages the life cycle and configuration of application objects.  Spring supports All types of application development: We can develop any type of applications using spring, e.g. Core java, web Application, Distributed application, Enterprise application. Spring Features 10
  • 11. Spring 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 11
  • 13. Spring Architecture The Core Module: This module contains the Bean Factory, an implementation of Factory Pattern which creates the bean as per the configurations provided by the developer in an XML file. Core Module The IOC Container. 13
  • 14. Spring Architecture  The AOP Module: AOP is a useful technique that enables adding executable blocks to the source code without explicitly changing it.  AOP to avoid re-implementation of some common behaviour in multiple classes. AOP Spring AOP AspectJ integration 14
  • 15. Spring Architecture  The DAO Module:- (Data Access Object) standardizes the data access work using JDBC, Hibernate or JDO.  This provides an abstraction layer to the low level task of creating a connection, releasing it etc. DAO Spring JDBC Transaction Management 15
  • 16. Spring Architecture  The ORM Module:- Spring doesn’t provides its own ORM implementation but offers integrations with popular Object Relational mapping tools like Hibernate, iBATIS SQL Maps, Oracle TopLink and JPA etc. ORM Hibernate JPA,JDO,OJB 16
  • 17. Spring Architecture  The JEE Module:- It also provides support for JMX, JCA, EJB and JMS etc.  JCA (Java EE Connection API).  EJB (Enterprise JavaBeans).  JMS (Java Message Service). JEE EJB JMS 17
  • 18. Spring Architecture  The Web Module:- Spring comes with MVC framework which eases the task of developing web applications.  It also integrates well with the most popular MVC frameworks like Struts, Tapestry, JSF, Wicket etc. 18
  • 20. Spring Project File  Application Context.xml The Application Context is Spring's advanced container. Similar to Bean Factory, it can load bean definitions. This container is defined by org.springframework.context.ApplicationCont e xtinterface. 20
  • 21. Spring Project File  The most commonly used Application Context implementations. 1. FileSystemXmlApplicationContext − Here you need to provide the full path of the XML bean configuration file. 2. ClassPathXmlApplicationContext − Here you do not need To provide the full path of the XML file but you need to set CLASSPATH. 3. WebXmlApplicationContext − This container loads the XML file with definitions of all beans from within a21
  • 22. Spring Project File  Dispatcher-servlet.xml The Spring Web model-view-controller (MVC) framework is designed around a Dispatcher Servlet that handles all the HTTP requests and responses. 22
  • 23. Spring Project File  Web.xml The /WEB-INF/web.xml file is used to define how to deploy the web module to a Servlet container like JBoss, Tomcat, Glassfish or any other servlet container. Basically web.xml tell container all servlets in the web application with <servlet> element , then tell container when to use which servlet by the url mapping with <servlet-mapping> element. 23
  • 24. Steps For Creating Project  Step 1:- Creating Projects and Select Java Web Application. 24
  • 25. Steps For Creating Project  Step 2:- Write a Name of Java Application Projects And Click Finish. 25
  • 26. Steps For Creating Project  Step 3:- Select Spring Web MVC Frameworks. 26
  • 27. Steps For Creating Project  Step 4:- Structure Of Spring MVC. 27
  • 28. Reference  https://www.roseindia.net/spring/architecture-of- spring.shtml  http://www.java4s.com/spring-mvc/spring-mvc- execution-flow-diagram-spring-mvc-3-2-flow/  https://dzone.com/articles/spring-framework-architecture  https://www.javacodegeeks.com/2013/02/introduction-to- javaee-concepts.html  https://www.javatpoint.com/example-of-spring- application-in-eclipse  https://www.tutorialspoint.com/spring/spring_web_mvc_f ramework.htm  https://stackoverflow.com/questions/4545968/loading- application-context-xml 28