Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Introduction to Dependency Injection using Spring.NET Ryan Montgomery
So why Spring.NET? <ul><li>We use more than IoC. </li></ul><ul><li>Well documented. </li></ul><ul><li>Large community. </l...
Spring.Core <ul><li>IoC is the heart of spring. </li></ul><ul><li>Additional Features </li></ul><ul><ul><li>Expression Lan...
What is Inversion of Control? <ul><li>Hollywood Principle. </li></ul><ul><ul><li>“ Don't call us, we'll call you.” </li></...
What is Dependency Injection? <ul><li>“ Dependency injection is a style of object configuration in which an objects fields...
DAO Refactor 0
DAO Refactor 0
DAO Refactor 1
DAO Refactor 2
Biz Component
Biz Component
Spring IoC Container <ul><li>Responsible for the Instantiation and Injection of dependencies based on configuration. </li>...
Demo This demonstration is based on the Movie Finder example in Spring.NET.
Contact Information <ul><li>Ryan Montgomery </li></ul><ul><ul><li>Blog </li></ul></ul><ul><ul><ul><li>http://rmontgomery42...
References <ul><li>Spring.NET Framework </li></ul><ul><ul><li>Chapter 5. The IoC container </li></ul></ul><ul><ul><ul><li>...
Parking Lot
Upcoming SlideShare
Loading in …5
×

Introduction To Dependency Injection Using Spring.NET

4,127 views

Published on

Inversion of Control a.k.a. Dependency Injection opens the doors of application design to greater flexibility and testability. Learn how to break the dependencies of your application enabling easier implementation of OO best practices, Unit Testing, and greater flexibility throughout a multi tiered architecture.

Published in: Business, Technology
  • Login to see the comments

Introduction To Dependency Injection Using Spring.NET

  1. 1. Introduction to Dependency Injection using Spring.NET Ryan Montgomery
  2. 2. So why Spring.NET? <ul><li>We use more than IoC. </li></ul><ul><li>Well documented. </li></ul><ul><li>Large community. </li></ul><ul><li>A proven framework. </li></ul><ul><li>Supported. </li></ul>
  3. 3. Spring.Core <ul><li>IoC is the heart of spring. </li></ul><ul><li>Additional Features </li></ul><ul><ul><li>Expression Language </li></ul></ul><ul><ul><li>Validation Framework </li></ul></ul><ul><ul><li>Data binding Framework </li></ul></ul><ul><ul><li>Dynamic Reflection </li></ul></ul><ul><ul><li>Threading </li></ul></ul><ul><ul><li>Resource abstraction </li></ul></ul>
  4. 4. What is Inversion of Control? <ul><li>Hollywood Principle. </li></ul><ul><ul><li>“ Don't call us, we'll call you.” </li></ul></ul><ul><li>Dependency Injection </li></ul><ul><li>Service Locator </li></ul>
  5. 5. What is Dependency Injection? <ul><li>“ Dependency injection is a style of object configuration in which an objects fields and collaborators are set by an external entity. In other words objects are configured by an external entity . Dependency injection is an alternative to having the object configure itself.” </li></ul><ul><ul><li>Jenkov Aps </li></ul></ul>
  6. 6. DAO Refactor 0
  7. 7. DAO Refactor 0
  8. 8. DAO Refactor 1
  9. 9. DAO Refactor 2
  10. 10. Biz Component
  11. 11. Biz Component
  12. 12. Spring IoC Container <ul><li>Responsible for the Instantiation and Injection of dependencies based on configuration. </li></ul><ul><li>The IObjectFactory is the actual representation of the Spring IoC container. </li></ul><ul><li>The most commonly used IObjectFactory implementation is the XmlObjectFactory class. </li></ul>
  13. 13. Demo This demonstration is based on the Movie Finder example in Spring.NET.
  14. 14. Contact Information <ul><li>Ryan Montgomery </li></ul><ul><ul><li>Blog </li></ul></ul><ul><ul><ul><li>http://rmontgomery429.blogspot.com </li></ul></ul></ul><ul><ul><li>Email </li></ul></ul><ul><ul><ul><li>[email_address] </li></ul></ul></ul><ul><li>Rapidparts Inc. </li></ul><ul><ul><li>Site </li></ul></ul><ul><ul><ul><li>http://www.rpionline.com </li></ul></ul></ul><ul><ul><li>Blog </li></ul></ul><ul><ul><ul><li>http://blogs.rpionline.com </li></ul></ul></ul>
  15. 15. References <ul><li>Spring.NET Framework </li></ul><ul><ul><li>Chapter 5. The IoC container </li></ul></ul><ul><ul><ul><li>http://www.springframework.net/doc-latest/reference/html/objects.html </li></ul></ul></ul><ul><li>Martin Fowler </li></ul><ul><ul><li>Inversion of Control Containers and the Dependency Injection pattern </li></ul></ul><ul><ul><ul><li>http://martinfowler.com/articles/injection.html </li></ul></ul></ul><ul><li>Jenkov </li></ul><ul><ul><li>What is Dependency Injection </li></ul></ul><ul><ul><ul><li>http://tutorials.jenkov.com/dependency-injection/index.html </li></ul></ul></ul>
  16. 16. Parking Lot

×