0%

Book Description

SummaryDependency Injection in .NET presents core DI patterns in plain C# so you'll fully understand how DI works, covers integration with standard Microsoft technologies like ASP.NET MVC, and teaches you to use DI frameworks like Structure Map, Castle Windsor, and Unity.About the Technology Dependency Injection is a great way to reduce tight coupling between software components. Instead of hard-coding dependencies, such as specifying a database driver, you inject a list of services that a component may need. The services are then connected by a third party. This technique enables you to better manage future changes and other complexity in your software. About this Book Dependency Injection in .NET introduces DI and provides a practical guide for applying it in .NET applications. The book presents the core patterns in plain C#, so you'll fully understand how DI works. Then you'll learn to integrate DI with standard Microsoft technologies like ASP.NET MVC, and to use DI frameworks like StructureMap, Castle Windsor, and Unity. By the end of the book, you'll be comfortable applying this powerful technique in your everyday .NET development. This book is written for C# developers. No previous experience with DI or DI frameworks is required. What's Inside

  • Many C#-based examples

  • A catalog of DI patterns and anti-patterns

  • Using both Microsoft and open source DI frameworks

Tabel of Contents

  1. PART 1 PUTTING DEPENDENCY INJECTION ON THE MAP

  2. A Dependency Injection tasting menu

  3. A comprehensive example

  4. DI Containers
    PART 2 DI CATALOG

  5. DI patterns

  6. DI anti-patterns

  7. DI refactorings
    PART 3 DIY DI

  8. Object Composition

  9. Object Lifetime

  10. Interception
    PART 4 DI CONTAINERS

  11. Castle Windsor

  12. StructureMap

  13. Spring.NET

  14. Autofac

  15. Unity

  16. MEF

Table of Contents

  1. Copyright
  2. Dedication
  3. Brief Table of Contents
  4. Table of Contents
  5. Foreword
  6. Preface
  7. Acknowledgments
  8. About this Book
  9. About the Cover Illustration
  10. Part 1. Putting Dependency Injection on the map
  11. Chapter 1. A Dependency Injection tasting menu
  12. Chapter 2. A comprehensive example
  13. Chapter 3. DI Containers
  14. Part 2. DI catalog
  15. Chapter 4. DI patterns
  16. Chapter 5. DI anti-patterns
  17. Chapter 6. DI refactorings
  18. Part 3. DIY DI
  19. Chapter 7. Object Composition
  20. Chapter 8. Object Lifetime
  21. Chapter 9. Interception
  22. Part 4. DI Containers
  23. Chapter 10. Castle Windsor
  24. Chapter 11. StructureMap
  25. Chapter 12. Spring.NET
  26. Chapter 13. Autofac
  27. Chapter 14. Unity
  28. Chapter 15. MEF
  29. Resources
  30. Glossary
  31. Appendix. Glossary conceptual map
  32. Appendix. Charts
  33. Index
  34. List of Figures
  35. List of Tables
  36. List of Listings
3.12.107.31