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

What's hot

Spring boot
Spring bootSpring boot
Spring boot
Pradeep Shanmugam
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
tola99
 
Spring introduction
Spring introductionSpring introduction
Spring introduction
Manav Prasad
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
Rasheed Waraich
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
Purbarun Chakrabarti
 
Java spring framework
Java spring frameworkJava spring framework
Java spring framework
Rajiv Gupta
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
NexThoughts Technologies
 
Spring Boot Tutorial
Spring Boot TutorialSpring Boot Tutorial
Spring Boot Tutorial
Naphachara Rattanawilai
 
Spring ppt
Spring pptSpring ppt
Spring ppt
Mumbai Academisc
 
Spring core module
Spring core moduleSpring core module
Spring core module
Raj Tomar
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
nomykk
 
Spring User Guide
Spring User GuideSpring User Guide
Spring User Guide
Muthuselvam RS
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!Jakub Kubrynski
 
Spring MVC Framework
Spring MVC FrameworkSpring MVC Framework
Spring MVC Framework
Hùng Nguyễn Huy
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
Dzmitry Naskou
 
Spring - Part 1 - IoC, Di and Beans
Spring - Part 1 - IoC, Di and Beans Spring - Part 1 - IoC, Di and Beans
Spring - Part 1 - IoC, Di and Beans
Hitesh-Java
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
ASG
 

What's hot (20)

Spring boot
Spring bootSpring boot
Spring boot
 
Spring Framework
Spring Framework  Spring Framework
Spring Framework
 
Spring introduction
Spring introductionSpring introduction
Spring introduction
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
 
Java spring framework
Java spring frameworkJava spring framework
Java spring framework
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Spring Boot Tutorial
Spring Boot TutorialSpring Boot Tutorial
Spring Boot Tutorial
 
Spring ppt
Spring pptSpring ppt
Spring ppt
 
Spring annotation
Spring annotationSpring annotation
Spring annotation
 
Spring core module
Spring core moduleSpring core module
Spring core module
 
Spring notes
Spring notesSpring notes
Spring notes
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Spring User Guide
Spring User GuideSpring User Guide
Spring User Guide
 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!
 
Spring MVC Framework
Spring MVC FrameworkSpring MVC Framework
Spring MVC Framework
 
Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
 
Spring - Part 1 - IoC, Di and Beans
Spring - Part 1 - IoC, Di and Beans Spring - Part 1 - IoC, Di and Beans
Spring - Part 1 - IoC, Di and Beans
 
Spring framework core
Spring framework coreSpring framework core
Spring framework core
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 

Similar to Java Spring Framework

Spring framework-tutorial
Spring framework-tutorialSpring framework-tutorial
Spring framework-tutorial
vinayiqbusiness
 
Java spring ppt
Java spring pptJava spring ppt
Java spring ppt
natashasweety7
 
Spring Architecture | Advanced Java
Spring Architecture | Advanced JavaSpring Architecture | Advanced Java
Spring Architecture | Advanced Java
VISHAL DONGA
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
Dineesha Suraweera
 
Spring (1)
Spring (1)Spring (1)
Spring (1)
Aneega
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggets
Virtual Nuggets
 
Screenshot from 2024-05-28 16-46-45 (30 files merged).ppt
Screenshot from 2024-05-28 16-46-45 (30 files merged).pptScreenshot from 2024-05-28 16-46-45 (30 files merged).ppt
Screenshot from 2024-05-28 16-46-45 (30 files merged).ppt
imjdabhinawpandey
 
Spring Basics
Spring BasicsSpring Basics
Spring Basics
Emprovise
 
How Spring Framework Really Works?
How Spring Framework Really Works?How Spring Framework Really Works?
How Spring Framework Really Works?
NexSoftsys
 
Introduction to j2 ee frameworks
Introduction to j2 ee frameworksIntroduction to j2 ee frameworks
Introduction to j2 ee frameworks
Mukesh Kumar
 
Introduction Java Web Framework and Web Server.
Introduction Java Web Framework and Web Server.Introduction Java Web Framework and Web Server.
Introduction Java Web Framework and Web Server.
suranisaunak
 
Framework adoption for java enterprise application development
Framework adoption for java enterprise application developmentFramework adoption for java enterprise application development
Framework adoption for java enterprise application development
Clarence Ho
 
Spring framework Introduction
Spring framework  IntroductionSpring framework  Introduction
Spring framework Introduction
Anuj Singh Rajput
 
Spring
SpringSpring
Introduction to Spring sec1.pptx
Introduction to Spring sec1.pptxIntroduction to Spring sec1.pptx
Introduction to Spring sec1.pptx
NourhanTarek23
 
Java J2EE Interview Question Part 2
Java J2EE Interview Question Part 2Java J2EE Interview Question Part 2
Java J2EE Interview Question Part 2
Mindsmapped Consulting
 
Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2Java J2EE Interview Questions Part 2
Java J2EE Interview Questions Part 2
javatrainingonline
 

Similar to Java Spring Framework (20)

Spring framework-tutorial
Spring framework-tutorialSpring framework-tutorial
Spring framework-tutorial
 
Java spring ppt
Java spring pptJava spring ppt
Java spring ppt
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Spring Architecture | Advanced Java
Spring Architecture | Advanced JavaSpring Architecture | Advanced Java
Spring Architecture | Advanced Java
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to 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
 
Screenshot from 2024-05-28 16-46-45 (30 files merged).ppt
Screenshot from 2024-05-28 16-46-45 (30 files merged).pptScreenshot from 2024-05-28 16-46-45 (30 files merged).ppt
Screenshot from 2024-05-28 16-46-45 (30 files merged).ppt
 
Spring Basics
Spring BasicsSpring Basics
Spring Basics
 
How Spring Framework Really Works?
How Spring Framework Really Works?How Spring Framework Really Works?
How Spring Framework Really Works?
 
Introduction to j2 ee frameworks
Introduction to j2 ee frameworksIntroduction to j2 ee frameworks
Introduction to j2 ee frameworks
 
Introduction Java Web Framework and Web Server.
Introduction Java Web Framework and Web Server.Introduction Java Web Framework and Web Server.
Introduction Java Web Framework and Web Server.
 
Framework adoption for java enterprise application development
Framework adoption for java enterprise application developmentFramework adoption for java enterprise application development
Framework adoption for java enterprise application development
 
Spring Framework -I
Spring Framework -ISpring Framework -I
Spring Framework -I
 
Spring 2
Spring 2Spring 2
Spring 2
 
Spring framework Introduction
Spring framework  IntroductionSpring framework  Introduction
Spring framework Introduction
 
Spring
SpringSpring
Spring
 
Introduction to Spring sec1.pptx
Introduction to Spring sec1.pptxIntroduction to Spring sec1.pptx
Introduction to Spring sec1.pptx
 
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
 

Recently uploaded

Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
CarlosHernanMontoyab2
 

Recently uploaded (20)

Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 

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