SlideShare a Scribd company logo
Spring FundamentalsDoing it right ….inversely
AgendaWhy DI and SL vs DI.Dependency injection and The Spring IoC containerVarious approaches of Bean ConfigurationBean scopesBean LifecycleAOP with SpringSpring AspectJ integrationTesting with SpringBeyond Spring Basics
Building OO systemsIts all about ObjectsIts all about Instantiating objectsIts all about communicating between the objectsIts all about collaborating objects Its all about managing objectsIts all about extending objectsIts all about monitoring objects
But the problem isEverythingdoneBy Developer
What developers end upWriting to much boilerplateCoding the same patterns againDuplicationsManaging infrastructureEntangled interfacesComplicated Dependencies
End up spending time
You eventually end up with
S.O.L.I.D The Single Responsibility PrincipleThe Open Closed PrincipleThe Liskov Substitution PrincipleThe Interface Segregation PrincipleThe Dependency Inversion Principle
SRP: class should have one, and only one, reason to change
OCP: extend a classes behavior, without modifying it
LSP - Derived classes must be substitutable for their base classes
ISP: Make client specific fine grained interfaces
DIP: Depend on abstractions, not on concretions
DI ApproachesPre DIConstruction by handFactory PatternService Locator
DI FrameworksHollywood principleObjects are handed to youNew and Factories  - Not your concernWell managed BeansFirst class Bean scope supportNo/less boilerplate TestabilitydependencyInjectordependencyClient
Spring Framework
Spring IOC ContainerInstantiates BeansAssembles BeansManages BeansConfigure dependenciesInjects  dependencies
Containers heirarchy
Bean ConfigurationsXML ConfigurationJava ConfigurationAnnotation-driven configurationDynamic language configuration supportGroovy
Beanshell
JRubyInjecting dependenciesSupports Constructor,Method and Setter InjectionIntra-Bean dependencies bootstrappingAutowire : byName, byType, Constructor, AutodetectEnsure type safetyFirst class support PrimitivesStringsCollections : <list/>, <set/>, <map/>, and <props/> Nulls : <null/>
Bean scopesSingletonPrototypeRequestSessionGlobal SessionSupports Custom Scopes
Bean Lifecycle
Lifecycle method calls
Aspect oriented programmingOriginated at Xerox PARC during 95-96 under Gregorkiczales.Purposed towards OO Principles advancements forModularizationSeparation of concernsNon intrusive plug-abilityStructural PatternsProxyDecorator
Proxy Pattern“provide a surrogate or placeholder for another object  to control access to it “ [GOF 94]
Manifestation of proxyVirtual proxyRemote proxySecurity proxySmart Reference proxy
Decorator Pattern“Allows new/additional behavior to be added to an existing class dynamically” [Wikipedia]
Decorator manifestation//Construct the BufferedInputStream object            bufferedInput = new BufferedInputStream(new FileInputStream(filename));
Graduate to AOPEnforce inheritance to achieve concern of separation?Specification like EJB have weird inheritance, your class never implement your interface ..huh	Why not use POJOs and apply CCC on them thru runtime magic ?
OOP vs AOP
AOP Lingo and JargonsAspect – The CCC that can be modularizedAdvice – Functionality of an Aspect (logging)Jointpoint – Opportunities in program execution to apply advicePointcut – Exact jointpoint where advice are weavedWeaving :linking objects with other applicatin objects
Spring AOPSupports only method join pointsSupports only load-time weavingAdvise typesBeforeAroundAfter –returningAfter–throwingAfter – finally
Spring @AspectJIntegrationAnnotation based support as of AspectJ 5.x@Aspect@Pointcut@ execution@ within@ target@annotation
AOP applicationsTrace aspectPerformance monitoring aspectAuditing aspectTransaction managementaspectLogging aspectSecurity aspectCaching aspect
Testing with SpringSupport for Unit and integration testingSupport JUnit 3.8.x/4.x and TestNG.Readymade mocks for most JEE dependencies like JNDI, Servlet API, etcSpring TestContextFrameworkSupports Fixture wiring transparentlySupport bean cachingTransaction managementExtensive spring-specific support
Beyond Spring basicsSpring MVCSpring DAOSpring ORNSpring JEE (JMS/JCA/JMX/Remoting)Spring Web flowSpring ROOSpring IntegrationSpring Security
Books
Did you get it
Ad

More Related Content

What's hot (6)

SOLID Design Principles
SOLID Design PrinciplesSOLID Design Principles
SOLID Design Principles
Samuel Breed
 
Chapter1
Chapter1Chapter1
Chapter1
teknik komputer ui
 
Solid and ioc principles
Solid and ioc principlesSolid and ioc principles
Solid and ioc principles
eleksdev
 
Refactoring Applications using SOLID Principles
Refactoring Applications using SOLID PrinciplesRefactoring Applications using SOLID Principles
Refactoring Applications using SOLID Principles
Steven Smith
 
AOP in C# 2013
AOP in C# 2013AOP in C# 2013
AOP in C# 2013
Antya Dev
 
Solid principles of oo design
Solid principles of oo designSolid principles of oo design
Solid principles of oo design
Confiz
 
SOLID Design Principles
SOLID Design PrinciplesSOLID Design Principles
SOLID Design Principles
Samuel Breed
 
Solid and ioc principles
Solid and ioc principlesSolid and ioc principles
Solid and ioc principles
eleksdev
 
Refactoring Applications using SOLID Principles
Refactoring Applications using SOLID PrinciplesRefactoring Applications using SOLID Principles
Refactoring Applications using SOLID Principles
Steven Smith
 
AOP in C# 2013
AOP in C# 2013AOP in C# 2013
AOP in C# 2013
Antya Dev
 
Solid principles of oo design
Solid principles of oo designSolid principles of oo design
Solid principles of oo design
Confiz
 

Similar to Spring fundamentals (20)

1669609053088_oops_final.pptx
1669609053088_oops_final.pptx1669609053088_oops_final.pptx
1669609053088_oops_final.pptx
PandeeswariKannan
 
Object Oriented Concepts and Principles
Object Oriented Concepts and PrinciplesObject Oriented Concepts and Principles
Object Oriented Concepts and Principles
deonpmeyer
 
Object Oriented Concepts in Real Projects
Object Oriented Concepts in Real ProjectsObject Oriented Concepts in Real Projects
Object Oriented Concepts in Real Projects
EPAM
 
Adobe Photoshop Lightroom Classic Crack Free Download
Adobe Photoshop Lightroom Classic Crack Free DownloadAdobe Photoshop Lightroom Classic Crack Free Download
Adobe Photoshop Lightroom Classic Crack Free Download
adnan01kp
 
Adobe Photoshop 2025 Free crack Download
Adobe Photoshop 2025 Free crack DownloadAdobe Photoshop 2025 Free crack Download
Adobe Photoshop 2025 Free crack Download
adnan01kp
 
4K Video Downloader Crack 4.28.0.5600 + License Key [2025]
4K Video Downloader Crack 4.28.0.5600 + License Key [2025]4K Video Downloader Crack 4.28.0.5600 + License Key [2025]
4K Video Downloader Crack 4.28.0.5600 + License Key [2025]
hyderik195
 
Wondershare Filmora Crack 14.3.2 + Key Full Download
Wondershare Filmora Crack 14.3.2 + Key Full DownloadWondershare Filmora Crack 14.3.2 + Key Full Download
Wondershare Filmora Crack 14.3.2 + Key Full Download
hyderik195
 
The Open-Closed Principle - Part 2 - The Contemporary Version - An Introduction
The Open-Closed Principle - Part 2 - The Contemporary Version - An IntroductionThe Open-Closed Principle - Part 2 - The Contemporary Version - An Introduction
The Open-Closed Principle - Part 2 - The Contemporary Version - An Introduction
Philip Schwarz
 
Adobe Photoshop 2025 Free crack Download
Adobe Photoshop 2025 Free crack DownloadAdobe Photoshop 2025 Free crack Download
Adobe Photoshop 2025 Free crack Download
juttjolie9
 
OO Design Principles
OO Design PrinciplesOO Design Principles
OO Design Principles
Anju Kanjirathingal
 
Jump Start To Ooad And Design Patterns
Jump Start To Ooad And Design PatternsJump Start To Ooad And Design Patterns
Jump Start To Ooad And Design Patterns
Lalit Kale
 
Jump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design PatternJump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design Pattern
Nishith Shukla
 
Design poo my_jug_en_ppt
Design poo my_jug_en_pptDesign poo my_jug_en_ppt
Design poo my_jug_en_ppt
agnes_crepet
 
Design Patterns Course
Design Patterns CourseDesign Patterns Course
Design Patterns Course
Ahmed Soliman
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
NexThoughts Technologies
 
Android architecture
Android architectureAndroid architecture
Android architecture
Vandana Srivastava
 
Gof design patterns
Gof design patternsGof design patterns
Gof design patterns
Srikanth R Vaka
 
AOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC Team
AOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC TeamAOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC Team
AOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC Team
Thuy_Dang
 
Aspect Oriented Programming
Aspect Oriented ProgrammingAspect Oriented Programming
Aspect Oriented Programming
Anumod Kumar
 
Object- Relational Persistence in Smalltalk
Object- Relational Persistence in SmalltalkObject- Relational Persistence in Smalltalk
Object- Relational Persistence in Smalltalk
ESUG
 
1669609053088_oops_final.pptx
1669609053088_oops_final.pptx1669609053088_oops_final.pptx
1669609053088_oops_final.pptx
PandeeswariKannan
 
Object Oriented Concepts and Principles
Object Oriented Concepts and PrinciplesObject Oriented Concepts and Principles
Object Oriented Concepts and Principles
deonpmeyer
 
Object Oriented Concepts in Real Projects
Object Oriented Concepts in Real ProjectsObject Oriented Concepts in Real Projects
Object Oriented Concepts in Real Projects
EPAM
 
Adobe Photoshop Lightroom Classic Crack Free Download
Adobe Photoshop Lightroom Classic Crack Free DownloadAdobe Photoshop Lightroom Classic Crack Free Download
Adobe Photoshop Lightroom Classic Crack Free Download
adnan01kp
 
Adobe Photoshop 2025 Free crack Download
Adobe Photoshop 2025 Free crack DownloadAdobe Photoshop 2025 Free crack Download
Adobe Photoshop 2025 Free crack Download
adnan01kp
 
4K Video Downloader Crack 4.28.0.5600 + License Key [2025]
4K Video Downloader Crack 4.28.0.5600 + License Key [2025]4K Video Downloader Crack 4.28.0.5600 + License Key [2025]
4K Video Downloader Crack 4.28.0.5600 + License Key [2025]
hyderik195
 
Wondershare Filmora Crack 14.3.2 + Key Full Download
Wondershare Filmora Crack 14.3.2 + Key Full DownloadWondershare Filmora Crack 14.3.2 + Key Full Download
Wondershare Filmora Crack 14.3.2 + Key Full Download
hyderik195
 
The Open-Closed Principle - Part 2 - The Contemporary Version - An Introduction
The Open-Closed Principle - Part 2 - The Contemporary Version - An IntroductionThe Open-Closed Principle - Part 2 - The Contemporary Version - An Introduction
The Open-Closed Principle - Part 2 - The Contemporary Version - An Introduction
Philip Schwarz
 
Adobe Photoshop 2025 Free crack Download
Adobe Photoshop 2025 Free crack DownloadAdobe Photoshop 2025 Free crack Download
Adobe Photoshop 2025 Free crack Download
juttjolie9
 
Jump Start To Ooad And Design Patterns
Jump Start To Ooad And Design PatternsJump Start To Ooad And Design Patterns
Jump Start To Ooad And Design Patterns
Lalit Kale
 
Jump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design PatternJump start to OOP, OOAD, and Design Pattern
Jump start to OOP, OOAD, and Design Pattern
Nishith Shukla
 
Design poo my_jug_en_ppt
Design poo my_jug_en_pptDesign poo my_jug_en_ppt
Design poo my_jug_en_ppt
agnes_crepet
 
Design Patterns Course
Design Patterns CourseDesign Patterns Course
Design Patterns Course
Ahmed Soliman
 
AOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC Team
AOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC TeamAOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC Team
AOP-IOC made by Vi Quoc Hanh and Vu Cong Thanh in SC Team
Thuy_Dang
 
Aspect Oriented Programming
Aspect Oriented ProgrammingAspect Oriented Programming
Aspect Oriented Programming
Anumod Kumar
 
Object- Relational Persistence in Smalltalk
Object- Relational Persistence in SmalltalkObject- Relational Persistence in Smalltalk
Object- Relational Persistence in Smalltalk
ESUG
 
Ad

Recently uploaded (20)

Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
AI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamsonAI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamson
UXPA Boston
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
IT484 Cyber Forensics_Information Technology
IT484 Cyber Forensics_Information TechnologyIT484 Cyber Forensics_Information Technology
IT484 Cyber Forensics_Information Technology
SHEHABALYAMANI
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
Agentic Automation - Delhi UiPath Community Meetup
Agentic Automation - Delhi UiPath Community MeetupAgentic Automation - Delhi UiPath Community Meetup
Agentic Automation - Delhi UiPath Community Meetup
Manoj Batra (1600 + Connections)
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptxTop 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
mkubeusa
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
João Esperancinha
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)
Kaya Weers
 
IT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information TechnologyIT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information Technology
SHEHABALYAMANI
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
Dark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanizationDark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanization
Jakub Šimek
 
Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?Shoehorning dependency injection into a FP language, what does it take?
Shoehorning dependency injection into a FP language, what does it take?
Eric Torreborre
 
AI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamsonAI-proof your career by Olivier Vroom and David WIlliamson
AI-proof your career by Olivier Vroom and David WIlliamson
UXPA Boston
 
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
GDG Cloud Southlake #42: Suresh Mathew: Autonomous Resource Optimization: How...
James Anderson
 
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptxReimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
Reimagine How You and Your Team Work with Microsoft 365 Copilot.pptx
John Moore
 
IT484 Cyber Forensics_Information Technology
IT484 Cyber Forensics_Information TechnologyIT484 Cyber Forensics_Information Technology
IT484 Cyber Forensics_Information Technology
SHEHABALYAMANI
 
How to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabberHow to Install & Activate ListGrabber - eGrabber
How to Install & Activate ListGrabber - eGrabber
eGrabber
 
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Crazy Incentives and How They Kill Security. How Do You Turn the Wheel?
Christian Folini
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptxTop 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
mkubeusa
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Unlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web AppsUnlocking Generative AI in your Web Apps
Unlocking Generative AI in your Web Apps
Maximiliano Firtman
 
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
Could Virtual Threads cast away the usage of Kotlin Coroutines - DevoxxUK2025
João Esperancinha
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)
Kaya Weers
 
IT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information TechnologyIT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information Technology
SHEHABALYAMANI
 
Mastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B LandscapeMastering Testing in the Modern F&B Landscape
Mastering Testing in the Modern F&B Landscape
marketing943205
 
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Enterprise Integration Is Dead! Long Live AI-Driven Integration with Apache C...
Markus Eisele
 
Dark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanizationDark Dynamism: drones, dark factories and deurbanization
Dark Dynamism: drones, dark factories and deurbanization
Jakub Šimek
 
Ad

Spring fundamentals

  翻译: