SlideShare une entreprise Scribd logo
1  sur  9
Télécharger pour lire hors ligne
Spring Framework Lunch
and Learn
Tom Henricksen and Ben Alibasic
Spring and Dependency Injection
● Spring is an open source framework, created
by Rod Johnson and described in his book
Expert One-on-One: J2EE Design and
Development
● Dependency injection-Spring promotes loose
coupling through a technique known as
dependency injection(DI)
Spring and Dependency Injection
● Coupling is a two-headed beast. On one
hand, tightly coupled code is difficult to test,
difficult to reuse, difficult to understand, and
typically exhibits "whack-a-mole" bugs.
Spring Basics
● Any Java Application can benefit from Spring
in terms of simplicity, test-ability, and loose
coupling.
● What's more, Spring is non intrusive: objects
in a Spring-enabled application often have
no dependencies on Spring-specific classes.
Spring Basics
● At the core of Spring Framework is the
Spring container.
● Spring's core container provides the
fundamental functionality of the Spring
Framework. BeanFactory
● In Spring, there are many ways to wire
components together, but the most common
approach is via XMLs.
Basic Bean Writing
● The act of creating these associations
between application objects is the essence
of dependency injection (DI) and is
commonly referred to as wiring.
● Containing your beans
● In Spring-based application, your application
objects will live within the Spring container.
Basic Bean Writing
● The container is at the core of the Spring
Framework. Spring's container uses
dependency injection (DI) to manage the
components that make up an application.
● Two types of Spring containers
● Bean factories
● Application contexts
Introducing the BeanFactory
● Bean factory is an implementation of the
Factory design pattern. That is, it is a class
whose responsibility is to create and
dispense beans.
● Bean factory is a general-purpose factory,
creating and dispensing many types of
beans.
Introducing the BeanFactory
● Beans are "lazily loaded" into bean factories,
meaning that while the bean factory will
immediately load the bean definitions (the
description of beans and their properties),
the beans themselves will not be instantiated
until they are needed.

Contenu connexe

Plus de Tom Henricksen

Socially Responsible Senior Leadership - Desmund Adams
Socially Responsible Senior Leadership - Desmund AdamsSocially Responsible Senior Leadership - Desmund Adams
Socially Responsible Senior Leadership - Desmund AdamsTom Henricksen
 
Head First Java Chapter 8
Head First Java Chapter 8Head First Java Chapter 8
Head First Java Chapter 8Tom Henricksen
 
Head First Java Chapter 7
Head First Java Chapter 7Head First Java Chapter 7
Head First Java Chapter 7Tom Henricksen
 
Head First Java Chapter 6
Head First Java Chapter 6Head First Java Chapter 6
Head First Java Chapter 6Tom Henricksen
 
Head First Java Chapter 5
Head First Java Chapter 5Head First Java Chapter 5
Head First Java Chapter 5Tom Henricksen
 
Head First Java Chapter 4
Head First Java Chapter 4Head First Java Chapter 4
Head First Java Chapter 4Tom Henricksen
 
Head First Java Chapter 3
Head First Java Chapter 3Head First Java Chapter 3
Head First Java Chapter 3Tom Henricksen
 
Head First Java Chapter 2
Head First Java Chapter 2Head First Java Chapter 2
Head First Java Chapter 2Tom Henricksen
 
Head First Java Chapter 1
Head First Java Chapter 1Head First Java Chapter 1
Head First Java Chapter 1Tom Henricksen
 
Technical screening .Net Developer
Technical screening  .Net DeveloperTechnical screening  .Net Developer
Technical screening .Net DeveloperTom Henricksen
 
Boost your tech IQ to boost IT recruiting success
Boost your tech IQ to boost IT recruiting successBoost your tech IQ to boost IT recruiting success
Boost your tech IQ to boost IT recruiting successTom Henricksen
 
Know thy client a technical primer for sales professionals
Know thy client  a technical primer for sales professionalsKnow thy client  a technical primer for sales professionals
Know thy client a technical primer for sales professionalsTom Henricksen
 
Becoming an Advanced Groovy Developer
Becoming an Advanced Groovy DeveloperBecoming an Advanced Groovy Developer
Becoming an Advanced Groovy DeveloperTom Henricksen
 
Becoming an Advanced Groovy Developer Spring One 2gx 2015
Becoming an Advanced Groovy Developer Spring One 2gx 2015Becoming an Advanced Groovy Developer Spring One 2gx 2015
Becoming an Advanced Groovy Developer Spring One 2gx 2015Tom Henricksen
 
Grails gotchas and best practices
Grails gotchas and best practicesGrails gotchas and best practices
Grails gotchas and best practicesTom Henricksen
 
Getting your Grails on
Getting your Grails onGetting your Grails on
Getting your Grails onTom Henricksen
 

Plus de Tom Henricksen (20)

Socially Responsible Senior Leadership - Desmund Adams
Socially Responsible Senior Leadership - Desmund AdamsSocially Responsible Senior Leadership - Desmund Adams
Socially Responsible Senior Leadership - Desmund Adams
 
Head First Java Chapter 8
Head First Java Chapter 8Head First Java Chapter 8
Head First Java Chapter 8
 
Head First Java Chapter 7
Head First Java Chapter 7Head First Java Chapter 7
Head First Java Chapter 7
 
Head First Java Chapter 6
Head First Java Chapter 6Head First Java Chapter 6
Head First Java Chapter 6
 
Head First Java Chapter 5
Head First Java Chapter 5Head First Java Chapter 5
Head First Java Chapter 5
 
Head First Java Chapter 4
Head First Java Chapter 4Head First Java Chapter 4
Head First Java Chapter 4
 
Head First Java Chapter 3
Head First Java Chapter 3Head First Java Chapter 3
Head First Java Chapter 3
 
Head First Java Chapter 2
Head First Java Chapter 2Head First Java Chapter 2
Head First Java Chapter 2
 
Head First Java Chapter 1
Head First Java Chapter 1Head First Java Chapter 1
Head First Java Chapter 1
 
Technical screening .Net Developer
Technical screening  .Net DeveloperTechnical screening  .Net Developer
Technical screening .Net Developer
 
Boost your tech IQ to boost IT recruiting success
Boost your tech IQ to boost IT recruiting successBoost your tech IQ to boost IT recruiting success
Boost your tech IQ to boost IT recruiting success
 
Know thy client a technical primer for sales professionals
Know thy client  a technical primer for sales professionalsKnow thy client  a technical primer for sales professionals
Know thy client a technical primer for sales professionals
 
Becoming an Advanced Groovy Developer
Becoming an Advanced Groovy DeveloperBecoming an Advanced Groovy Developer
Becoming an Advanced Groovy Developer
 
Becoming an Advanced Groovy Developer Spring One 2gx 2015
Becoming an Advanced Groovy Developer Spring One 2gx 2015Becoming an Advanced Groovy Developer Spring One 2gx 2015
Becoming an Advanced Groovy Developer Spring One 2gx 2015
 
Grails gotchas and best practices
Grails gotchas and best practicesGrails gotchas and best practices
Grails gotchas and best practices
 
Getting your Grails on
Getting your Grails onGetting your Grails on
Getting your Grails on
 
Leadership Evolution
Leadership EvolutionLeadership Evolution
Leadership Evolution
 
15 Years in IT
15 Years in IT15 Years in IT
15 Years in IT
 
#AliveIN1-5
#AliveIN1-5#AliveIN1-5
#AliveIN1-5
 
IT is it for me (1)
IT is it for me (1)IT is it for me (1)
IT is it for me (1)
 

Dernier

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

Dernier (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

Spring Framework Lunch and Learn Presentation

  • 1. Spring Framework Lunch and Learn Tom Henricksen and Ben Alibasic
  • 2. Spring and Dependency Injection ● Spring is an open source framework, created by Rod Johnson and described in his book Expert One-on-One: J2EE Design and Development ● Dependency injection-Spring promotes loose coupling through a technique known as dependency injection(DI)
  • 3. Spring and Dependency Injection ● Coupling is a two-headed beast. On one hand, tightly coupled code is difficult to test, difficult to reuse, difficult to understand, and typically exhibits "whack-a-mole" bugs.
  • 4. Spring Basics ● Any Java Application can benefit from Spring in terms of simplicity, test-ability, and loose coupling. ● What's more, Spring is non intrusive: objects in a Spring-enabled application often have no dependencies on Spring-specific classes.
  • 5. Spring Basics ● At the core of Spring Framework is the Spring container. ● Spring's core container provides the fundamental functionality of the Spring Framework. BeanFactory ● In Spring, there are many ways to wire components together, but the most common approach is via XMLs.
  • 6. Basic Bean Writing ● The act of creating these associations between application objects is the essence of dependency injection (DI) and is commonly referred to as wiring. ● Containing your beans ● In Spring-based application, your application objects will live within the Spring container.
  • 7. Basic Bean Writing ● The container is at the core of the Spring Framework. Spring's container uses dependency injection (DI) to manage the components that make up an application. ● Two types of Spring containers ● Bean factories ● Application contexts
  • 8. Introducing the BeanFactory ● Bean factory is an implementation of the Factory design pattern. That is, it is a class whose responsibility is to create and dispense beans. ● Bean factory is a general-purpose factory, creating and dispensing many types of beans.
  • 9. Introducing the BeanFactory ● Beans are "lazily loaded" into bean factories, meaning that while the bean factory will immediately load the bean definitions (the description of beans and their properties), the beans themselves will not be instantiated until they are needed.