SlideShare a Scribd company logo
1 of 12
Spring Framework
• Spring is a lightweight framework. It can be thought of
as a framework of frameworks because it provides
support to various frameworks such as Struts,
Hibernate, Tapestry, EJB, JSF etc. The framework, in
broader sense, can be defined as a structure where we
find solution of the various technical problems.
• The Spring framework comprises several modules such
as IOC, AOP, DAO, Context, ORM, WEB MVC etc. We
will learn these modules in next page. Let's understand
the IOC and Dependency Injection first.
Inversion Of Control (IOC) and
Dependency Injection
• These are the design patterns that are used to remove
dependency from the programming code. They make
the code easier to test and maintain. Let's understand
this with the following code:
class Employee{
Address address;
Employee(){
address=new Address();
}
}
• In such case, there is dependency between the
Employee and Address (tight coupling).
• In the Inversion of Control scenario, we do this something like this:
class Employee{
Address address;
Employee(Address address){
this.address=address;
}
}
• Thus, IOC makes the code loosely coupled. In such case, there is no
need to modify the code if our logic is moved to new environment.
• In Spring framework, IOC container is responsible to inject the
dependency. We provide metadata to the IOC container either by
XML file or annotation.
• Advantage of Dependency Injection
– makes the code loosely coupled so easy to maintain
– makes the code easy to test
Advantages of Spring Framework
• 1) Predefined Templates
– Spring framework provides templates for JDBC, Hibernate, JPA etc.
technologies. So there is no need to write too much code. It hides the
basic steps of these technologies.
• Let's take the example of JdbcTemplate, you don't need to write the code
for exception handling, creating connection, creating statement,
committing transaction, closing connection etc. You need to write the
code of executing query only. Thus, it save a lot of JDBC code.
• 2) Loose Coupling
– The Spring applications are loosely coupled because of dependency
injection.
• 3) Easy to test
– The Dependency Injection makes easier to test the application. The
EJB or Struts application require server to run the application but
Spring framework doesn't require server.
• 4) Lightweight
– Spring framework is lightweight because of its POJO
implementation. The Spring Framework doesn't force the
programmer to inherit any class or implement any
interface. That is why it is said non-invasive.
• 5) Fast Development
– The Dependency Injection feature of Spring Framework
and it support to various frameworks makes the easy
development of JavaEE application.
• 6) Powerful abstraction
– It provides powerful abstraction to JavaEE specifications
such as JMS, JDBC, JPA and JTA.
• 7) Declarative support
– It provides declarative support for caching, validation,
transactions and formatting.
Spring Modules
• The Spring Framework consists of features
organized into about 20 modules. These
modules are grouped into Core Container,
Data Access/Integration, Web, AOP (Aspect
Oriented Programming), Instrumentation, and
Test, as shown in the following diagram.
• Test
– This layer provides support of testing with JUnit and
TestNG.
• Spring Core Container
– The Spring Core container contains core, beans, context
and expression language (EL) modules.
– Core and Beans
• These modules provide IOC and Dependency Injection features.
– Context
• This module supports internationalization (I18N), EJB, JMS, Basic
Remoting.
– Expression Language
• It is an extension to the EL defined in JSP. It provides support to
setting and getting property values, method invocation, accessing
collections and indexers, named variables, logical and arithmetic
operators, retrieval of objects by name etc.
• AOP, Aspects and Instrumentation
– These modules support aspect oriented programming
implementation where you can use Advices, Pointcuts etc. to
decouple the code.
– The aspects module provides support to integration with
AspectJ.
– The instrumentation module provides support to class
instrumentation and classloader implementations.
• Data Access / Integration
– This group comprises of JDBC, ORM, OXM, JMS and Transaction
modules. These modules basically provide support to interact
with the database.
• Web
– This group comprises of Web, Web-Servlet, Web-Struts and
Web-Portlet. These modules provide support to create web
application.
IoC Container
• The IoC container is responsible to instantiate,
configure and assemble the objects. The IoC
container gets informations from the XML file and
works accordingly. The main tasks performed by
IoC container are:
– to instantiate the application class
– to configure the object
– to assemble the dependencies between the objects
• There are two types of IoC containers. They are:
– BeanFactory
– ApplicationContext
Difference between BeanFactory and
the ApplicationContext
• The org.springframework.beans.factory.
BeanFactory and the org.springframework.context.
ApplicationContext interfaces acts as the IoC container.
The ApplicationContext interface is built on top of the
BeanFactory interface. It adds some extra functionality
than BeanFactory such as simple integration with
Spring's AOP, message resource handling (for I18N),
event propagation, application layer specific context
(e.g. WebApplicationContext) for web application. So it
is better to use ApplicationContext than BeanFactory.

More Related Content

What's hot

Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - CoreDzmitry Naskou
 
JSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End FrameworksJSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End FrameworksIan Hlavats
 
Best Practices for JSF, Gameduell 2013
Best Practices for JSF, Gameduell 2013Best Practices for JSF, Gameduell 2013
Best Practices for JSF, Gameduell 2013Edward Burns
 
Web apps architecture
Web apps architectureWeb apps architecture
Web apps architectureTanmoy Barman
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring FrameworkHùng Nguyễn Huy
 
Getting Started with Spring Framework
Getting Started with Spring FrameworkGetting Started with Spring Framework
Getting Started with Spring FrameworkEdureka!
 
[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JSIvano Malavolta
 
Concepts of Asp.Net
Concepts of Asp.NetConcepts of Asp.Net
Concepts of Asp.Netvidyamittal
 
Spring Framework
Spring FrameworkSpring Framework
Spring Frameworknomykk
 
Jdbc architecture and driver types ppt
Jdbc architecture and driver types pptJdbc architecture and driver types ppt
Jdbc architecture and driver types pptkamal kotecha
 
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
 
Java Training in Chennai
Java Training in Chennai Java Training in Chennai
Java Training in Chennai raj esaki
 

What's hot (20)

Spring Framework - Core
Spring Framework - CoreSpring Framework - Core
Spring Framework - Core
 
JSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End FrameworksJSF 2.3: Integration with Front-End Frameworks
JSF 2.3: Integration with Front-End Frameworks
 
Webapplication ppt prepared by krishna ballabh gupta
Webapplication ppt prepared by krishna ballabh guptaWebapplication ppt prepared by krishna ballabh gupta
Webapplication ppt prepared by krishna ballabh gupta
 
Devjyotippt
DevjyotipptDevjyotippt
Devjyotippt
 
[2015/2016] Backbone JS
[2015/2016] Backbone JS[2015/2016] Backbone JS
[2015/2016] Backbone JS
 
Spring User Guide
Spring User GuideSpring User Guide
Spring User Guide
 
Best Practices for JSF, Gameduell 2013
Best Practices for JSF, Gameduell 2013Best Practices for JSF, Gameduell 2013
Best Practices for JSF, Gameduell 2013
 
JavaCro'14 - Consuming Java EE Backends in Desktop, Web, and Mobile Frontends...
JavaCro'14 - Consuming Java EE Backends in Desktop, Web, and Mobile Frontends...JavaCro'14 - Consuming Java EE Backends in Desktop, Web, and Mobile Frontends...
JavaCro'14 - Consuming Java EE Backends in Desktop, Web, and Mobile Frontends...
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Spring MVC Framework
Spring MVC FrameworkSpring MVC Framework
Spring MVC Framework
 
Web apps architecture
Web apps architectureWeb apps architecture
Web apps architecture
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Getting Started with Spring Framework
Getting Started with Spring FrameworkGetting Started with Spring Framework
Getting Started with Spring Framework
 
[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS[2015/2016] Require JS and Handlebars JS
[2015/2016] Require JS and Handlebars JS
 
Concepts of Asp.Net
Concepts of Asp.NetConcepts of Asp.Net
Concepts of Asp.Net
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Jdbc architecture and driver types ppt
Jdbc architecture and driver types pptJdbc architecture and driver types ppt
Jdbc architecture and driver types ppt
 
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 mvc
Spring mvcSpring mvc
Spring mvc
 
Java Training in Chennai
Java Training in Chennai Java Training in Chennai
Java Training in Chennai
 

Similar to 1. Spring intro IoC (20)

Spring ppt
Spring pptSpring ppt
Spring ppt
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Spring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggetsSpring Framework Tutorial | VirtualNuggets
Spring Framework Tutorial | VirtualNuggets
 
Introduction to Spring
Introduction to SpringIntroduction to Spring
Introduction to Spring
 
spring
springspring
spring
 
Spring
SpringSpring
Spring
 
Spring
SpringSpring
Spring
 
Month 3 report
Month 3 reportMonth 3 report
Month 3 report
 
Introduction to Spring & Spring BootFramework
Introduction to Spring  & Spring BootFrameworkIntroduction to Spring  & Spring BootFramework
Introduction to Spring & Spring BootFramework
 
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
 
Hybernat and structs, spring classes in mumbai
Hybernat and structs, spring classes in mumbaiHybernat and structs, spring classes in mumbai
Hybernat and structs, spring classes in mumbai
 
스프링 프레임워크
스프링 프레임워크스프링 프레임워크
스프링 프레임워크
 
Introduction to j2 ee frameworks
Introduction to j2 ee frameworksIntroduction to j2 ee frameworks
Introduction to j2 ee frameworks
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Spring notes
Spring notesSpring notes
Spring notes
 
Java Spring
Java SpringJava Spring
Java Spring
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
The Complete Spring Tutorial
The Complete Spring TutorialThe Complete Spring Tutorial
The Complete Spring Tutorial
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Suman
SumanSuman
Suman
 

Recently uploaded

Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 

Recently uploaded (20)

Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 

1. Spring intro IoC

  • 1.
  • 2. Spring Framework • Spring is a lightweight framework. It can be thought of as a framework of frameworks because it provides support to various frameworks such as Struts, Hibernate, Tapestry, EJB, JSF etc. The framework, in broader sense, can be defined as a structure where we find solution of the various technical problems. • The Spring framework comprises several modules such as IOC, AOP, DAO, Context, ORM, WEB MVC etc. We will learn these modules in next page. Let's understand the IOC and Dependency Injection first.
  • 3. Inversion Of Control (IOC) and Dependency Injection • These are the design patterns that are used to remove dependency from the programming code. They make the code easier to test and maintain. Let's understand this with the following code: class Employee{ Address address; Employee(){ address=new Address(); } } • In such case, there is dependency between the Employee and Address (tight coupling).
  • 4. • In the Inversion of Control scenario, we do this something like this: class Employee{ Address address; Employee(Address address){ this.address=address; } } • Thus, IOC makes the code loosely coupled. In such case, there is no need to modify the code if our logic is moved to new environment. • In Spring framework, IOC container is responsible to inject the dependency. We provide metadata to the IOC container either by XML file or annotation. • Advantage of Dependency Injection – makes the code loosely coupled so easy to maintain – makes the code easy to test
  • 5. Advantages of Spring Framework • 1) Predefined Templates – Spring framework provides templates for JDBC, Hibernate, JPA etc. technologies. So there is no need to write too much code. It hides the basic steps of these technologies. • Let's take the example of JdbcTemplate, you don't need to write the code for exception handling, creating connection, creating statement, committing transaction, closing connection etc. You need to write the code of executing query only. Thus, it save a lot of JDBC code. • 2) Loose Coupling – The Spring applications are loosely coupled because of dependency injection. • 3) Easy to test – The Dependency Injection makes easier to test the application. The EJB or Struts application require server to run the application but Spring framework doesn't require server.
  • 6. • 4) Lightweight – Spring framework is lightweight because of its POJO implementation. The Spring Framework doesn't force the programmer to inherit any class or implement any interface. That is why it is said non-invasive. • 5) Fast Development – The Dependency Injection feature of Spring Framework and it support to various frameworks makes the easy development of JavaEE application. • 6) Powerful abstraction – It provides powerful abstraction to JavaEE specifications such as JMS, JDBC, JPA and JTA. • 7) Declarative support – It provides declarative support for caching, validation, transactions and formatting.
  • 7. Spring Modules • The Spring Framework consists of features organized into about 20 modules. These modules are grouped into Core Container, Data Access/Integration, Web, AOP (Aspect Oriented Programming), Instrumentation, and Test, as shown in the following diagram.
  • 8.
  • 9. • Test – This layer provides support of testing with JUnit and TestNG. • Spring Core Container – The Spring Core container contains core, beans, context and expression language (EL) modules. – Core and Beans • These modules provide IOC and Dependency Injection features. – Context • This module supports internationalization (I18N), EJB, JMS, Basic Remoting. – Expression Language • It is an extension to the EL defined in JSP. It provides support to setting and getting property values, method invocation, accessing collections and indexers, named variables, logical and arithmetic operators, retrieval of objects by name etc.
  • 10. • AOP, Aspects and Instrumentation – These modules support aspect oriented programming implementation where you can use Advices, Pointcuts etc. to decouple the code. – The aspects module provides support to integration with AspectJ. – The instrumentation module provides support to class instrumentation and classloader implementations. • Data Access / Integration – This group comprises of JDBC, ORM, OXM, JMS and Transaction modules. These modules basically provide support to interact with the database. • Web – This group comprises of Web, Web-Servlet, Web-Struts and Web-Portlet. These modules provide support to create web application.
  • 11. IoC Container • The IoC container is responsible to instantiate, configure and assemble the objects. The IoC container gets informations from the XML file and works accordingly. The main tasks performed by IoC container are: – to instantiate the application class – to configure the object – to assemble the dependencies between the objects • There are two types of IoC containers. They are: – BeanFactory – ApplicationContext
  • 12. Difference between BeanFactory and the ApplicationContext • The org.springframework.beans.factory. BeanFactory and the org.springframework.context. ApplicationContext interfaces acts as the IoC container. The ApplicationContext interface is built on top of the BeanFactory interface. It adds some extra functionality than BeanFactory such as simple integration with Spring's AOP, message resource handling (for I18N), event propagation, application layer specific context (e.g. WebApplicationContext) for web application. So it is better to use ApplicationContext than BeanFactory.