SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Downloaden Sie, um offline zu lesen
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.

Weitere Àhnliche Inhalte

Mehr von 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
 
Leadership Evolution
Leadership EvolutionLeadership Evolution
Leadership EvolutionTom Henricksen
 
IT is it for me (1)
IT is it for me (1)IT is it for me (1)
IT is it for me (1)Tom Henricksen
 

Mehr von 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)
 

KĂŒrzlich hochgeladen

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 

KĂŒrzlich hochgeladen (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

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.