SlideShare a Scribd company logo
1 of 17
10 May, 2009 Inversion Of Control -  Spring.NETOverview
Dependencies and Dependency Injection 10 May, 2009 2 Inversion Of Control -  Spring.NET Overview
What is Dependency Injection? Dependency injection (DI) in programming refers to the process of supplying an external dependency to a software component.  It is a specific form of inversion of control where the concern being inverted is the process of obtaining the needed dependency. 10 May, 2009 3 Inversion Of Control -  Spring.NET Overview
But … what is Inversion of control? Inversion of control, or IoC, is an abstract principle describing an aspect of some software architecture designs in which the flow of control of a system is inverted in comparison to the traditional architecture. Control flow is expressed in imperative programming in the form of a series of instructions or procedure calls. Instead of specifying a sequence of decisions and procedures to occur during the lifetime of a process, the user of a IoCframework writes the desired responses linked to particular events or data requests.  10 May, 2009 4 Inversion Of Control -  Spring.NET Overview
IOC Container 10 May, 2009 5 Inversion Of Control -  Spring.NET Overview
Aha…and what is an IOC container? 10 May, 2009 6 Inversion Of Control -  Spring.NET Overview
Spring.NET an application framework for buidling Enterprise .NET applications  an IoC Container (Inversion of Control) that manages and injects dependencies on behalf of developers (DI = Dependency Injection) 10 May, 2009 Inversion Of Control -  Spring.NET Overview 7
And more… 10 May, 2009 8 Inversion Of Control -  Spring.NET Overview
IoC Containers for .NET PicoContainer.NET: lightweight and highly embeddable IoC container StructureMap:  lightweight Inversion of Control (IoC) Container written in C#; can improve the architectural qualities of .NET apps by reducing the mechanical costs of good design techniques Castle: Tools for application development including small IoC container Spring.NET: full featured IoC container (port of Java version) 10 May, 2009 9 Inversion Of Control -  Spring.NET Overview
Practice First approach - Dependencies public class ExampleObject {   private AnotherObjectobjectOne; // dependencies   private YetAnotherObjectobjectTwo;   private inti;     public AnotherObjectObjectOne { 	set { this.objectOne = value; }   }   public YetAnotherObjectObjectTwo {     	set { this.objectTwo = value; }   }   public intIntegerProperty {     	set { this.i = value; }    }   } 10 May, 2009 10 Inversion Of Control -  Spring.NET Overview
Configuration I Preferred way to create Object Factories and Application contexts is via configuration: <configuration>  <configSections>   <sectionGroup name="spring">    <section name="context"    type="Spring.Context.Support.ContextHandler, Spring.Core"/>    <section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core" />   </sectionGroup>  </configSections>  <spring>   <context>    <resource uri="config://spring/objects"/>   </context>   <objects>    ...   </objects>  </spring> </configuration> Handlers usedfor Spring configurationsection Where to find object configuration, e.g. file, assembly, config Configurationof Spring managedobjects 10 May, 2009 11 Inversion Of Control -  Spring.NET Overview
Configuration II The configuration tells Spring.NET how objects depend on each other:  Object name Object type: namespacepath + class,  assembly <object id="exampleObject" type="Examples.ExampleObject, ExamplesLibrary">     <property name="objectOne" ref="anotherExampleObject"/>     <property name="objectTwo" ref="yetAnotherObject"/>     <property name="IntegerProperty" value="1"/> </object> <object id="anotherExampleObject" type="Examples.AnotherObject, ExamplesLibrary"/> <object id="yetAnotherObject" type="Examples.YetAnotherObject, ExamplesLibrary"/> Properties referring to other objects: often called dependencies or collaborators 10 May, 2009 12 Inversion Of Control -  Spring.NET Overview
Usage Now instantiating an   ApplicationContext is simple: ID that should appear in object configuration IApplicationContextctx = ContextRegistry.GetContext(); ExampleObject person = 	 	(ExampleObject)ctx.GetObject(“exampleObject ");  10 May, 2009 13 Inversion Of Control -  Spring.NET Overview
Example  application 10 May, 2009 14 Inversion Of Control -  Spring.NET Overview
Solve the dependencies with Spring.NET IOC Demo 10 May, 2009 15 Inversion Of Control -  Spring.NET Overview
16 Inversion Of Control -  Spring.NET Overview 10 May, 2009 http://en.wikipedia.org/wiki/Inversion_of_control http://martinfowler.com/articles/injection.html http://abdullin.com/wiki/inversion-of-control-ioc.html http://www.springframework.net/doc-latest/reference/html/objects.html http://www.developer.com/net/csharp/article.php/3722931/Dependency-Injection-with-SpringNet.htm Resources
17 Inversion Of Control -  Spring.NET Overview 10 May, 2009

More Related Content

Viewers also liked

Информационный центр StartUpSamara, С. Богданов
Информационный центр StartUpSamara, С. БогдановИнформационный центр StartUpSamara, С. Богданов
Информационный центр StartUpSamara, С. БогдановIngria. Technopark St. Petersburg
 
MIF Marketplace presentation
MIF Marketplace presentationMIF Marketplace presentation
MIF Marketplace presentationYves Lesenfants
 
WTR Club-如何讓搜尋引擎喜歡上你的網站
WTR Club-如何讓搜尋引擎喜歡上你的網站WTR Club-如何讓搜尋引擎喜歡上你的網站
WTR Club-如何讓搜尋引擎喜歡上你的網站waytorich
 
2012-WTR Club OPP
2012-WTR Club OPP2012-WTR Club OPP
2012-WTR Club OPPwaytorich
 
Инновационный центр ОАО «Ростелеком», П.Ройтберг
Инновационный центр ОАО «Ростелеком», П.РойтбергИнновационный центр ОАО «Ростелеком», П.Ройтберг
Инновационный центр ОАО «Ростелеком», П.РойтбергIngria. Technopark St. Petersburg
 
Mbc Consulting Group
Mbc Consulting GroupMbc Consulting Group
Mbc Consulting GroupKevin Cook
 
Simple Ideas To Live Greener!
Simple Ideas To Live Greener!Simple Ideas To Live Greener!
Simple Ideas To Live Greener!Melody Thacker
 
Essay Writing Business 2010
Essay Writing Business 2010Essay Writing Business 2010
Essay Writing Business 2010Orna Farrell
 
OneCafé: De toekomst van ledenorganisaties met behulp van CRM en informatie-u...
OneCafé: De toekomst van ledenorganisaties met behulp van CRM en informatie-u...OneCafé: De toekomst van ledenorganisaties met behulp van CRM en informatie-u...
OneCafé: De toekomst van ledenorganisaties met behulp van CRM en informatie-u...Orbit One - We create coherence
 
Антон Колошин - Формирование межрегионального Smart ЦОК ИТ
Антон Колошин - Формирование межрегионального Smart ЦОК ИТАнтон Колошин - Формирование межрегионального Smart ЦОК ИТ
Антон Колошин - Формирование межрегионального Smart ЦОК ИТIngria. Technopark St. Petersburg
 
Michael Muellers Resume
Michael Muellers ResumeMichael Muellers Resume
Michael Muellers Resumemlm_330
 
How the World's Top Marketers Make Emotional Connections to Win the Marketplace
How the World's Top Marketers Make Emotional Connections to Win the MarketplaceHow the World's Top Marketers Make Emotional Connections to Win the Marketplace
How the World's Top Marketers Make Emotional Connections to Win the Marketplaceprnewswire
 
L1. intro to ethics
L1. intro to ethicsL1. intro to ethics
L1. intro to ethicst0nywilliams
 
Addicted 2 Tattoos, Tampa, FL
Addicted 2 Tattoos, Tampa, FLAddicted 2 Tattoos, Tampa, FL
Addicted 2 Tattoos, Tampa, FLtattoolenny
 

Viewers also liked (20)

The rhino
The rhinoThe rhino
The rhino
 
Информационный центр StartUpSamara, С. Богданов
Информационный центр StartUpSamara, С. БогдановИнформационный центр StartUpSamara, С. Богданов
Информационный центр StartUpSamara, С. Богданов
 
MIF Marketplace presentation
MIF Marketplace presentationMIF Marketplace presentation
MIF Marketplace presentation
 
WTR Club-如何讓搜尋引擎喜歡上你的網站
WTR Club-如何讓搜尋引擎喜歡上你的網站WTR Club-如何讓搜尋引擎喜歡上你的網站
WTR Club-如何讓搜尋引擎喜歡上你的網站
 
Eng 071 aragona dc_fall11
Eng 071 aragona dc_fall11Eng 071 aragona dc_fall11
Eng 071 aragona dc_fall11
 
Gorillas by Lexi
Gorillas by LexiGorillas by Lexi
Gorillas by Lexi
 
2012-WTR Club OPP
2012-WTR Club OPP2012-WTR Club OPP
2012-WTR Club OPP
 
Инновационный центр ОАО «Ростелеком», П.Ройтберг
Инновационный центр ОАО «Ростелеком», П.РойтбергИнновационный центр ОАО «Ростелеком», П.Ройтберг
Инновационный центр ОАО «Ростелеком», П.Ройтберг
 
Mbc Consulting Group
Mbc Consulting GroupMbc Consulting Group
Mbc Consulting Group
 
Simple Ideas To Live Greener!
Simple Ideas To Live Greener!Simple Ideas To Live Greener!
Simple Ideas To Live Greener!
 
Essay Writing Business 2010
Essay Writing Business 2010Essay Writing Business 2010
Essay Writing Business 2010
 
Hippo
HippoHippo
Hippo
 
OneCafé: De toekomst van ledenorganisaties met behulp van CRM en informatie-u...
OneCafé: De toekomst van ledenorganisaties met behulp van CRM en informatie-u...OneCafé: De toekomst van ledenorganisaties met behulp van CRM en informatie-u...
OneCafé: De toekomst van ledenorganisaties met behulp van CRM en informatie-u...
 
Антон Колошин - Формирование межрегионального Smart ЦОК ИТ
Антон Колошин - Формирование межрегионального Smart ЦОК ИТАнтон Колошин - Формирование межрегионального Smart ЦОК ИТ
Антон Колошин - Формирование межрегионального Smart ЦОК ИТ
 
Michael Muellers Resume
Michael Muellers ResumeMichael Muellers Resume
Michael Muellers Resume
 
How the World's Top Marketers Make Emotional Connections to Win the Marketplace
How the World's Top Marketers Make Emotional Connections to Win the MarketplaceHow the World's Top Marketers Make Emotional Connections to Win the Marketplace
How the World's Top Marketers Make Emotional Connections to Win the Marketplace
 
L1. intro to ethics
L1. intro to ethicsL1. intro to ethics
L1. intro to ethics
 
Strategy Framework
Strategy FrameworkStrategy Framework
Strategy Framework
 
UDV 2016 Final
UDV 2016 FinalUDV 2016 Final
UDV 2016 Final
 
Addicted 2 Tattoos, Tampa, FL
Addicted 2 Tattoos, Tampa, FLAddicted 2 Tattoos, Tampa, FL
Addicted 2 Tattoos, Tampa, FL
 

Similar to Inversion Of Control: Spring.Net Overview

Spring IOC and DAO
Spring IOC and DAOSpring IOC and DAO
Spring IOC and DAOAnushaNaidu
 
Poco Es Mucho: WCF, EF, and Class Design
Poco Es Mucho: WCF, EF, and Class DesignPoco Es Mucho: WCF, EF, and Class Design
Poco Es Mucho: WCF, EF, and Class DesignJames Phillips
 
Introduction To ASP.NET MVC
Introduction To ASP.NET MVCIntroduction To ASP.NET MVC
Introduction To ASP.NET MVCAlan Dean
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperFabrit Global
 
Sprint Portlet MVC Seminar
Sprint Portlet MVC SeminarSprint Portlet MVC Seminar
Sprint Portlet MVC SeminarJohn Lewis
 
Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Pythongturnquist
 
Ef Poco And Unit Testing
Ef Poco And Unit TestingEf Poco And Unit Testing
Ef Poco And Unit TestingJames Phillips
 
TheSpringFramework
TheSpringFrameworkTheSpringFramework
TheSpringFrameworkShankar Nair
 
Annotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVCAnnotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVCJohn Lewis
 
Ionic framework one day training
Ionic framework one day trainingIonic framework one day training
Ionic framework one day trainingTroy Miles
 
Spring framework
Spring frameworkSpring framework
Spring frameworksrmelody
 
Object Oreinted Approach in Coldfusion
Object Oreinted Approach in ColdfusionObject Oreinted Approach in Coldfusion
Object Oreinted Approach in Coldfusionguestcc9fa5
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSFSoftServe
 
Spring Framework
Spring FrameworkSpring Framework
Spring Frameworknomykk
 
Ta Javaserverside Eran Toch
Ta Javaserverside Eran TochTa Javaserverside Eran Toch
Ta Javaserverside Eran TochAdil Jafri
 

Similar to Inversion Of Control: Spring.Net Overview (20)

Spring IOC and DAO
Spring IOC and DAOSpring IOC and DAO
Spring IOC and DAO
 
Spring and DWR
Spring and DWRSpring and DWR
Spring and DWR
 
Os Johnson
Os JohnsonOs Johnson
Os Johnson
 
Tdd,Ioc
Tdd,IocTdd,Ioc
Tdd,Ioc
 
Poco Es Mucho: WCF, EF, and Class Design
Poco Es Mucho: WCF, EF, and Class DesignPoco Es Mucho: WCF, EF, and Class Design
Poco Es Mucho: WCF, EF, and Class Design
 
Introduction To ASP.NET MVC
Introduction To ASP.NET MVCIntroduction To ASP.NET MVC
Introduction To ASP.NET MVC
 
Getting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular DeveloperGetting Started with React, When You’re an Angular Developer
Getting Started with React, When You’re an Angular Developer
 
Sprint Portlet MVC Seminar
Sprint Portlet MVC SeminarSprint Portlet MVC Seminar
Sprint Portlet MVC Seminar
 
Intro To Spring Python
Intro To Spring PythonIntro To Spring Python
Intro To Spring Python
 
Ibm
IbmIbm
Ibm
 
Ef Poco And Unit Testing
Ef Poco And Unit TestingEf Poco And Unit Testing
Ef Poco And Unit Testing
 
TheSpringFramework
TheSpringFrameworkTheSpringFramework
TheSpringFramework
 
Annotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVCAnnotation-Based Spring Portlet MVC
Annotation-Based Spring Portlet MVC
 
Ionic framework one day training
Ionic framework one day trainingIonic framework one day training
Ionic framework one day training
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Spring framework
Spring frameworkSpring framework
Spring framework
 
Object Oreinted Approach in Coldfusion
Object Oreinted Approach in ColdfusionObject Oreinted Approach in Coldfusion
Object Oreinted Approach in Coldfusion
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSF
 
Spring Framework
Spring FrameworkSpring Framework
Spring Framework
 
Ta Javaserverside Eran Toch
Ta Javaserverside Eran TochTa Javaserverside Eran Toch
Ta Javaserverside Eran Toch
 

More from Orbit One - We create coherence

ShareCafé: SharePoint - Een doos vol documenten of dé tool om efficiënt samen...
ShareCafé: SharePoint - Een doos vol documenten of dé tool om efficiënt samen...ShareCafé: SharePoint - Een doos vol documenten of dé tool om efficiënt samen...
ShareCafé: SharePoint - Een doos vol documenten of dé tool om efficiënt samen...Orbit One - We create coherence
 
ShareCafé: Office365 - Efficiënt samenwerken met minimum aan kosten en comple...
ShareCafé: Office365 - Efficiënt samenwerken met minimum aan kosten en comple...ShareCafé: Office365 - Efficiënt samenwerken met minimum aan kosten en comple...
ShareCafé: Office365 - Efficiënt samenwerken met minimum aan kosten en comple...Orbit One - We create coherence
 
ShareCafé 3 - Geef je samenwerking een technologische upgrade
ShareCafé 3 - Geef je samenwerking een technologische upgradeShareCafé 3 - Geef je samenwerking een technologische upgrade
ShareCafé 3 - Geef je samenwerking een technologische upgradeOrbit One - We create coherence
 
OneCafé: The future of membership organizations facilitated by CRM and collab...
OneCafé: The future of membership organizations facilitated by CRM and collab...OneCafé: The future of membership organizations facilitated by CRM and collab...
OneCafé: The future of membership organizations facilitated by CRM and collab...Orbit One - We create coherence
 
Social Computing in your organization using SharePoint: challenges and benefits
Social Computing in your organization using SharePoint: challenges and benefitsSocial Computing in your organization using SharePoint: challenges and benefits
Social Computing in your organization using SharePoint: challenges and benefitsOrbit One - We create coherence
 
Marketing Automation in Dynamics CRM with ClickDimensions
Marketing Automation in Dynamics CRM with ClickDimensionsMarketing Automation in Dynamics CRM with ClickDimensions
Marketing Automation in Dynamics CRM with ClickDimensionsOrbit One - We create coherence
 

More from Orbit One - We create coherence (20)

ShareCafé: SharePoint - Een doos vol documenten of dé tool om efficiënt samen...
ShareCafé: SharePoint - Een doos vol documenten of dé tool om efficiënt samen...ShareCafé: SharePoint - Een doos vol documenten of dé tool om efficiënt samen...
ShareCafé: SharePoint - Een doos vol documenten of dé tool om efficiënt samen...
 
HoGent tips and tricks van een self-made ondernemer
HoGent tips and tricks van een self-made ondernemer HoGent tips and tricks van een self-made ondernemer
HoGent tips and tricks van een self-made ondernemer
 
Het Nieuwe Werken in de praktijk
Het Nieuwe Werkenin de praktijkHet Nieuwe Werkenin de praktijk
Het Nieuwe Werken in de praktijk
 
ShareCafé: Office365 - Efficiënt samenwerken met minimum aan kosten en comple...
ShareCafé: Office365 - Efficiënt samenwerken met minimum aan kosten en comple...ShareCafé: Office365 - Efficiënt samenwerken met minimum aan kosten en comple...
ShareCafé: Office365 - Efficiënt samenwerken met minimum aan kosten en comple...
 
ShareCafé 3 - Geef je samenwerking een technologische upgrade
ShareCafé 3 - Geef je samenwerking een technologische upgradeShareCafé 3 - Geef je samenwerking een technologische upgrade
ShareCafé 3 - Geef je samenwerking een technologische upgrade
 
ShareCafé 2 - Werk slimmer door geïntegreerde tools
ShareCafé 2 - Werk slimmer door geïntegreerde toolsShareCafé 2 - Werk slimmer door geïntegreerde tools
ShareCafé 2 - Werk slimmer door geïntegreerde tools
 
ShareCafé 1: Hou de Nieuwe Werker gemotiveerd
ShareCafé 1: Hou de Nieuwe Werker gemotiveerdShareCafé 1: Hou de Nieuwe Werker gemotiveerd
ShareCafé 1: Hou de Nieuwe Werker gemotiveerd
 
Business value of Lync integrations
Business value of Lync integrationsBusiness value of Lync integrations
Business value of Lync integrations
 
Identity in the cloud using Microsoft
Identity in the cloud using MicrosoftIdentity in the cloud using Microsoft
Identity in the cloud using Microsoft
 
OneCafé: The future of membership organizations facilitated by CRM and collab...
OneCafé: The future of membership organizations facilitated by CRM and collab...OneCafé: The future of membership organizations facilitated by CRM and collab...
OneCafé: The future of membership organizations facilitated by CRM and collab...
 
OneCafé: The new world of work and your organisation
OneCafé: The new world of work and your organisationOneCafé: The new world of work and your organisation
OneCafé: The new world of work and your organisation
 
Social Computing in your organization using SharePoint: challenges and benefits
Social Computing in your organization using SharePoint: challenges and benefitsSocial Computing in your organization using SharePoint: challenges and benefits
Social Computing in your organization using SharePoint: challenges and benefits
 
Windows Communication Foundation (WCF) Best Practices
Windows Communication Foundation (WCF) Best PracticesWindows Communication Foundation (WCF) Best Practices
Windows Communication Foundation (WCF) Best Practices
 
Wie is Orbit One Internet Solutions
Wie is Orbit One Internet SolutionsWie is Orbit One Internet Solutions
Wie is Orbit One Internet Solutions
 
Azure Umbraco workshop
Azure Umbraco workshopAzure Umbraco workshop
Azure Umbraco workshop
 
Marketing Automation in Dynamics CRM with ClickDimensions
Marketing Automation in Dynamics CRM with ClickDimensionsMarketing Automation in Dynamics CRM with ClickDimensions
Marketing Automation in Dynamics CRM with ClickDimensions
 
Office 365, is cloud right for your company?
Office 365, is cloud right for your company?Office 365, is cloud right for your company?
Office 365, is cloud right for your company?
 
Who is Orbit One internet solutions?
Who is Orbit One internet solutions?Who is Orbit One internet solutions?
Who is Orbit One internet solutions?
 
Azure and Umbraco CMS
Azure and Umbraco CMSAzure and Umbraco CMS
Azure and Umbraco CMS
 
Ingredients of the new world of work
Ingredients of the new world of workIngredients of the new world of work
Ingredients of the new world of work
 

Recently uploaded

Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 

Recently uploaded (20)

Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 

Inversion Of Control: Spring.Net Overview

  • 1. 10 May, 2009 Inversion Of Control - Spring.NETOverview
  • 2. Dependencies and Dependency Injection 10 May, 2009 2 Inversion Of Control - Spring.NET Overview
  • 3. What is Dependency Injection? Dependency injection (DI) in programming refers to the process of supplying an external dependency to a software component. It is a specific form of inversion of control where the concern being inverted is the process of obtaining the needed dependency. 10 May, 2009 3 Inversion Of Control - Spring.NET Overview
  • 4. But … what is Inversion of control? Inversion of control, or IoC, is an abstract principle describing an aspect of some software architecture designs in which the flow of control of a system is inverted in comparison to the traditional architecture. Control flow is expressed in imperative programming in the form of a series of instructions or procedure calls. Instead of specifying a sequence of decisions and procedures to occur during the lifetime of a process, the user of a IoCframework writes the desired responses linked to particular events or data requests. 10 May, 2009 4 Inversion Of Control - Spring.NET Overview
  • 5. IOC Container 10 May, 2009 5 Inversion Of Control - Spring.NET Overview
  • 6. Aha…and what is an IOC container? 10 May, 2009 6 Inversion Of Control - Spring.NET Overview
  • 7. Spring.NET an application framework for buidling Enterprise .NET applications an IoC Container (Inversion of Control) that manages and injects dependencies on behalf of developers (DI = Dependency Injection) 10 May, 2009 Inversion Of Control - Spring.NET Overview 7
  • 8. And more… 10 May, 2009 8 Inversion Of Control - Spring.NET Overview
  • 9. IoC Containers for .NET PicoContainer.NET: lightweight and highly embeddable IoC container StructureMap: lightweight Inversion of Control (IoC) Container written in C#; can improve the architectural qualities of .NET apps by reducing the mechanical costs of good design techniques Castle: Tools for application development including small IoC container Spring.NET: full featured IoC container (port of Java version) 10 May, 2009 9 Inversion Of Control - Spring.NET Overview
  • 10. Practice First approach - Dependencies public class ExampleObject { private AnotherObjectobjectOne; // dependencies private YetAnotherObjectobjectTwo; private inti; public AnotherObjectObjectOne { set { this.objectOne = value; } } public YetAnotherObjectObjectTwo { set { this.objectTwo = value; } } public intIntegerProperty { set { this.i = value; } } } 10 May, 2009 10 Inversion Of Control - Spring.NET Overview
  • 11. Configuration I Preferred way to create Object Factories and Application contexts is via configuration: <configuration> <configSections> <sectionGroup name="spring"> <section name="context" type="Spring.Context.Support.ContextHandler, Spring.Core"/> <section name="objects" type="Spring.Context.Support.DefaultSectionHandler, Spring.Core" /> </sectionGroup> </configSections> <spring> <context> <resource uri="config://spring/objects"/> </context> <objects> ... </objects> </spring> </configuration> Handlers usedfor Spring configurationsection Where to find object configuration, e.g. file, assembly, config Configurationof Spring managedobjects 10 May, 2009 11 Inversion Of Control - Spring.NET Overview
  • 12. Configuration II The configuration tells Spring.NET how objects depend on each other: Object name Object type: namespacepath + class, assembly <object id="exampleObject" type="Examples.ExampleObject, ExamplesLibrary"> <property name="objectOne" ref="anotherExampleObject"/> <property name="objectTwo" ref="yetAnotherObject"/> <property name="IntegerProperty" value="1"/> </object> <object id="anotherExampleObject" type="Examples.AnotherObject, ExamplesLibrary"/> <object id="yetAnotherObject" type="Examples.YetAnotherObject, ExamplesLibrary"/> Properties referring to other objects: often called dependencies or collaborators 10 May, 2009 12 Inversion Of Control - Spring.NET Overview
  • 13. Usage Now instantiating an ApplicationContext is simple: ID that should appear in object configuration IApplicationContextctx = ContextRegistry.GetContext(); ExampleObject person = (ExampleObject)ctx.GetObject(“exampleObject "); 10 May, 2009 13 Inversion Of Control - Spring.NET Overview
  • 14. Example application 10 May, 2009 14 Inversion Of Control - Spring.NET Overview
  • 15. Solve the dependencies with Spring.NET IOC Demo 10 May, 2009 15 Inversion Of Control - Spring.NET Overview
  • 16. 16 Inversion Of Control - Spring.NET Overview 10 May, 2009 http://en.wikipedia.org/wiki/Inversion_of_control http://martinfowler.com/articles/injection.html http://abdullin.com/wiki/inversion-of-control-ioc.html http://www.springframework.net/doc-latest/reference/html/objects.html http://www.developer.com/net/csharp/article.php/3722931/Dependency-Injection-with-SpringNet.htm Resources
  • 17. 17 Inversion Of Control - Spring.NET Overview 10 May, 2009