Dependency Injection Principles, Practices, and Patterns
eBook - ePub

Dependency Injection Principles, Practices, and Patterns

  1. 552 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Dependency Injection Principles, Practices, and Patterns

About this book

Summary

Dependency Injection Principles, Practices, and Patterns teaches you to use DI to reduce hard-coded dependencies between application components. You'll start by learning what DI is and what types of applications will benefit from it. Then, you'll work through concrete scenarios using C# and the .NET framework to implement DI in your own projects. As you dive into the thoroughly-explained examples, you'll develop a foundation you can apply to any of the many DI libraries for .NET and .NET Core.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the Technology

Dependency Injection (DI) is a great way to reduce tight coupling between software components. Instead of hard-coding dependencies, such as specifying a database driver, you make those connections through a third party. Central to application frameworks like ASP.NET Core, DI enables you to better manage changes and other complexity in your software.

About the Book

Dependency Injection Principles, Practices, and Patterns is a revised and expanded edition of the bestselling classic Dependency Injection in .NET. It teaches you DI from the ground up, featuring relevant examples, patterns, and anti-patterns for creating loosely coupled, well-structured applications. The well-annotated code and diagrams use C# examples to illustrate principles that work flawlessly with modern object-oriented languages and DI libraries.

What's Inside

  • Refactoring existing code into loosely coupled code
  • DI techniques that work with statically typed OO languages
  • Integration with common .NET frameworks
  • Updated examples illustrating DI in .NET Core

About the Reader

For intermediate OO developers.

About the Authors

Mark Seemann is a programmer, software architect, and speaker who has been working with software since 1995, including six years with Microsoft. Steven van Deursen is a seasoned .NET developer and architect, and the author and maintainer of the Simple Injector DI library.

Table of Contents

    PART 1 Putting Dependency Injection on the map

  1. The basics of Dependency Injection: What, why, and how
  2. Writing tightly coupled code
  3. Writing loosely coupled code
  4. PART 2 Catalog

  5. DI patterns
  6. DI anti-patterns
  7. Code smells
  8. PART 3 Pure DI

  9. Application composition
  10. Object lifetime
  11. Interception
  12. Aspect-Oriented Programming by design
  13. Tool-based Aspect-Oriented Programming
  14. PART 4 DI Containers

  15. DI Container introduction
  16. The Autofac DI Container
  17. The Simple Injector DI Container
  18. The Microsoft.Extensions.DependencyInjection DI Container

Trusted by 375,005 students

Access to over 1 million titles for a fair monthly price.

Study more efficiently using our study tools.

Information

Table of contents

  1. Dependency Injection
  2. brief contents
  3. contents
  4. Praise for the First Edition
  5. front matter
  6. Part 1. Putting Dependency Injection on the map
  7. 1 The basics of Dependency Injection: What, why, and how
  8. 2 Writing tightly coupled code
  9. 3 Writing loosely coupled code
  10. Part 2. Catalog
  11. 4 DI patterns
  12. 5 DI anti-patterns
  13. 6 Code smells
  14. Part 3. Pure DI
  15. 7 Application composition
  16. 8 Object lifetime
  17. 9 Interception
  18. 10 Aspect-Oriented Programming by design
  19. 11 Tool-based Aspect-Oriented Programming
  20. Part 4. DI Containers
  21. 12 DI Container introduction
  22. 13 The Autofac DI Container
  23. 14 The Simple Injector DI Container
  24. 15 The Microsoft.Extensions.DependencyInjection DI Container
  25. glossary
  26. resources
  27. Index
  28. Lists of Figures, Tables and Listings

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Dependency Injection Principles, Practices, and Patterns by Mark Seemann,Steven van Deursen in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming Languages. We have over one million books available in our catalogue for you to explore.