ๅฐŠๆ•ฌ็š„ ๅพฎไฟกๆฑ‡็Ž‡๏ผš1ๅ†† โ‰ˆ 0.046166 ๅ…ƒ ๆ”ฏไป˜ๅฎๆฑ‡็Ž‡๏ผš1ๅ†† โ‰ˆ 0.046257ๅ…ƒ [้€€ๅ‡บ็™ปๅฝ•]
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.
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

What's hot

Spring boot
Spring bootSpring boot
Spring boot
Pradeep Shanmugam
ย 
Introduction to Spring's Dependency Injection
Introduction to Spring's Dependency InjectionIntroduction to Spring's Dependency Injection
Introduction to Spring's Dependency Injection
Richard Paul
ย 
Java spring framework
Java spring frameworkJava spring framework
Java spring framework
Rajiv Gupta
ย 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
07.pallav
ย 
Spring framework aop
Spring framework aopSpring framework aop
Spring framework aop
Taemon Piya-Lumyong
ย 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
Purbarun Chakrabarti
ย 
Spring framework Introduction
Spring framework IntroductionSpring framework Introduction
Spring framework Introduction
Anuj Singh Rajput
ย 
Hibernate Presentation
Hibernate  PresentationHibernate  Presentation
Hibernate Presentation
guest11106b
ย 
Spring Data JPA
Spring Data JPASpring Data JPA
Spring Data JPA
Knoldus Inc.
ย 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
Dzmitry Naskou
ย 
An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST
Ram Awadh Prasad, PMP
ย 
Spring mvc
Spring mvcSpring mvc
Spring mvc
Hamid Ghorbani
ย 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!
Jakub Kubrynski
ย 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
Dineesha Suraweera
ย 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
Alex Movila
ย 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
nomykk
ย 
Spring boot
Spring bootSpring boot
Spring boot
Gyanendra Yadav
ย 
ASP.NET Web API
ASP.NET Web APIASP.NET Web API
ASP.NET Web API
habib_786
ย 
Hibernate architecture
Hibernate architectureHibernate architecture
Hibernate architecture
Anurag
ย 
Spring AOP
Spring AOPSpring AOP
Spring AOP
Jeroen Rosenberg
ย 

What's hot (20)

Spring boot
Spring bootSpring boot
Spring boot
ย 
Introduction to Spring's Dependency Injection
Introduction to Spring's Dependency InjectionIntroduction to Spring's Dependency Injection
Introduction to Spring's Dependency Injection
ย 
Java spring framework
Java spring frameworkJava spring framework
Java spring framework
ย 
Spring Boot and REST API
Spring Boot and REST APISpring Boot and REST API
Spring Boot and REST API
ย 
Spring framework aop
Spring framework aopSpring framework aop
Spring framework aop
ย 
Introduction to Spring Boot
Introduction to Spring BootIntroduction to Spring Boot
Introduction to Spring Boot
ย 
Spring framework Introduction
Spring framework IntroductionSpring framework Introduction
Spring framework Introduction
ย 
Hibernate Presentation
Hibernate  PresentationHibernate  Presentation
Hibernate Presentation
ย 
Spring Data JPA
Spring Data JPASpring Data JPA
Spring Data JPA
ย 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
ย 
An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST
ย 
Spring mvc
Spring mvcSpring mvc
Spring mvc
ย 
Introduction to Spring Boot!
Introduction to Spring Boot!Introduction to Spring Boot!
Introduction to Spring Boot!
ย 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
ย 
Spring Boot in Action
Spring Boot in Action Spring Boot in Action
Spring Boot in Action
ย 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
ย 
Spring boot
Spring bootSpring boot
Spring boot
ย 
ASP.NET Web API
ASP.NET Web APIASP.NET Web API
ASP.NET Web API
ย 
Hibernate architecture
Hibernate architectureHibernate architecture
Hibernate architecture
ย 
Spring AOP
Spring AOPSpring AOP
Spring AOP
ย 

Similar to Spring framework-tutorial

Spring notes
Spring notesSpring notes
Spring notes
Rajeev Uppala
ย 
Spring Basics
Spring BasicsSpring Basics
Spring Basics
Emprovise
ย 
Spring framework
Spring frameworkSpring framework
Spring framework
Shivi Kashyap
ย 
Spring core module
Spring core moduleSpring core module
Spring core module
Raj Tomar
ย 
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
ย 
Introduction to j2 ee frameworks
Introduction to j2 ee frameworksIntroduction to j2 ee frameworks
Introduction to j2 ee frameworks
Mukesh 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 Introduction
Anuj Singh Rajput
ย 
Java Spring Framework
Java Spring FrameworkJava Spring Framework
Java Spring Framework
Mehul Jariwala
ย 
spring framework ppt by Rohit malav
spring framework ppt by Rohit malavspring framework ppt by Rohit malav
spring framework ppt by Rohit malav
Rohit malav
ย 
Java spring ppt
Java spring pptJava spring ppt
Java spring ppt
natashasweety7
ย 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
ASG
ย 
Spring framework
Spring frameworkSpring framework
Spring framework
Kani Selvam
ย 
Spring Architecture | Advanced Java
Spring Architecture | Advanced JavaSpring Architecture | Advanced Java
Spring Architecture | Advanced Java
VISHAL DONGA
ย 
Struts & spring framework issues
Struts & spring framework issuesStruts & spring framework issues
Struts & spring framework issues
Prashant Seth
ย 
How Spring Framework Really Works?
How Spring Framework Really Works?How Spring Framework Really Works?
How Spring Framework Really Works?
NexSoftsys
ย 
Spring Framework Rohit
Spring Framework RohitSpring Framework Rohit
Spring Framework Rohit
Rohit Prabhakar
ย 
Spring
SpringSpring
Spring
komalpreethi
ย 
Springs_Training
Springs_TrainingSprings_Training
Springs_Training
KAMALA KOLLURI
ย 

Similar to 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 core module
Spring core moduleSpring core module
Spring core module
ย 
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
ย 
Java Spring Framework
Java Spring FrameworkJava Spring Framework
Java Spring Framework
ย 
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
ย 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
ย 
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
ย 

Recently uploaded

Information and Communication Technology in Education
Information and Communication Technology in EducationInformation and Communication Technology in Education
Information and Communication Technology in Education
MJDuyan
ย 
The Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teachingThe Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teaching
Derek Wenmoth
ย 
220711130082 Srabanti Bag Internet Resources For Natural Science
220711130082 Srabanti Bag Internet Resources For Natural Science220711130082 Srabanti Bag Internet Resources For Natural Science
220711130082 Srabanti Bag Internet Resources For Natural Science
Kalna College
ย 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
Celine George
ย 
Diversity Quiz Prelims by Quiz Club, IIT Kanpur
Diversity Quiz Prelims by Quiz Club, IIT KanpurDiversity Quiz Prelims by Quiz Club, IIT Kanpur
Diversity Quiz Prelims by Quiz Club, IIT Kanpur
Quiz Club IIT Kanpur
ย 
Ethiopia and Eritrea Eritrea's journey has been marked by resilience and dete...
Ethiopia and Eritrea Eritrea's journey has been marked by resilience and dete...Ethiopia and Eritrea Eritrea's journey has been marked by resilience and dete...
Ethiopia and Eritrea Eritrea's journey has been marked by resilience and dete...
biruktesfaye27
ย 
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
yarusun
ย 
bryophytes.pptx bsc botany honours second semester
bryophytes.pptx bsc botany honours  second semesterbryophytes.pptx bsc botany honours  second semester
bryophytes.pptx bsc botany honours second semester
Sarojini38
ย 
Interprofessional Education Platform Introduction.pdf
Interprofessional Education Platform Introduction.pdfInterprofessional Education Platform Introduction.pdf
Interprofessional Education Platform Introduction.pdf
Ben Aldrich
ย 
Opportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive themOpportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive them
EducationNC
ย 
Slides Peluncuran Amalan Pemakanan Sihat.pptx
Slides Peluncuran Amalan Pemakanan Sihat.pptxSlides Peluncuran Amalan Pemakanan Sihat.pptx
Slides Peluncuran Amalan Pemakanan Sihat.pptx
shabeluno
ย 
Creating Images and Videos through AI.pptx
Creating Images and Videos through AI.pptxCreating Images and Videos through AI.pptx
Creating Images and Videos through AI.pptx
Forum of Blended Learning
ย 
220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology
Kalna College
ย 
Cross-Cultural Leadership and Communication
Cross-Cultural Leadership and CommunicationCross-Cultural Leadership and Communication
Cross-Cultural Leadership and Communication
MattVassar1
ย 
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Celine George
ย 
Keynote given on June 24 for MASSP at Grand Traverse City
Keynote given on June 24 for MASSP at Grand Traverse CityKeynote given on June 24 for MASSP at Grand Traverse City
Keynote given on June 24 for MASSP at Grand Traverse City
PJ Caposey
ย 
pol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdfpol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdf
BiplabHalder13
ย 
8+8+8 Rule Of Time Management For Better Productivity
8+8+8 Rule Of Time Management For Better Productivity8+8+8 Rule Of Time Management For Better Productivity
8+8+8 Rule Of Time Management For Better Productivity
RuchiRathor2
ย 
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapitolTechU
ย 
How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...
Infosec
ย 

Recently uploaded (20)

Information and Communication Technology in Education
Information and Communication Technology in EducationInformation and Communication Technology in Education
Information and Communication Technology in Education
ย 
The Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teachingThe Science of Learning: implications for modern teaching
The Science of Learning: implications for modern teaching
ย 
220711130082 Srabanti Bag Internet Resources For Natural Science
220711130082 Srabanti Bag Internet Resources For Natural Science220711130082 Srabanti Bag Internet Resources For Natural Science
220711130082 Srabanti Bag Internet Resources For Natural Science
ย 
How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17How to Download & Install Module From the Odoo App Store in Odoo 17
How to Download & Install Module From the Odoo App Store in Odoo 17
ย 
Diversity Quiz Prelims by Quiz Club, IIT Kanpur
Diversity Quiz Prelims by Quiz Club, IIT KanpurDiversity Quiz Prelims by Quiz Club, IIT Kanpur
Diversity Quiz Prelims by Quiz Club, IIT Kanpur
ย 
Ethiopia and Eritrea Eritrea's journey has been marked by resilience and dete...
Ethiopia and Eritrea Eritrea's journey has been marked by resilience and dete...Ethiopia and Eritrea Eritrea's journey has been marked by resilience and dete...
Ethiopia and Eritrea Eritrea's journey has been marked by resilience and dete...
ย 
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
Get Success with the Latest UiPath UIPATH-ADPV1 Exam Dumps (V11.02) 2024
ย 
bryophytes.pptx bsc botany honours second semester
bryophytes.pptx bsc botany honours  second semesterbryophytes.pptx bsc botany honours  second semester
bryophytes.pptx bsc botany honours second semester
ย 
Interprofessional Education Platform Introduction.pdf
Interprofessional Education Platform Introduction.pdfInterprofessional Education Platform Introduction.pdf
Interprofessional Education Platform Introduction.pdf
ย 
Opportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive themOpportunity scholarships and the schools that receive them
Opportunity scholarships and the schools that receive them
ย 
Slides Peluncuran Amalan Pemakanan Sihat.pptx
Slides Peluncuran Amalan Pemakanan Sihat.pptxSlides Peluncuran Amalan Pemakanan Sihat.pptx
Slides Peluncuran Amalan Pemakanan Sihat.pptx
ย 
Creating Images and Videos through AI.pptx
Creating Images and Videos through AI.pptxCreating Images and Videos through AI.pptx
Creating Images and Videos through AI.pptx
ย 
220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology220711130097 Tulip Samanta Concept of Information and Communication Technology
220711130097 Tulip Samanta Concept of Information and Communication Technology
ย 
Cross-Cultural Leadership and Communication
Cross-Cultural Leadership and CommunicationCross-Cultural Leadership and Communication
Cross-Cultural Leadership and Communication
ย 
Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17Creation or Update of a Mandatory Field is Not Set in Odoo 17
Creation or Update of a Mandatory Field is Not Set in Odoo 17
ย 
Keynote given on June 24 for MASSP at Grand Traverse City
Keynote given on June 24 for MASSP at Grand Traverse CityKeynote given on June 24 for MASSP at Grand Traverse City
Keynote given on June 24 for MASSP at Grand Traverse City
ย 
pol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdfpol sci Election and Representation Class 11 Notes.pdf
pol sci Election and Representation Class 11 Notes.pdf
ย 
8+8+8 Rule Of Time Management For Better Productivity
8+8+8 Rule Of Time Management For Better Productivity8+8+8 Rule Of Time Management For Better Productivity
8+8+8 Rule Of Time Management For Better Productivity
ย 
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptxCapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
CapTechTalks Webinar Slides June 2024 Donovan Wright.pptx
ย 
How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...How to stay relevant as a cyber professional: Skills, trends and career paths...
How to stay relevant as a cyber professional: Skills, trends and career paths...
ย 

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.
  ็ฟป่ฏ‘๏ผš