Book description
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.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.
Quotes
Actually three books in one: a really good introduction to DI in .NET, an even better one to DI in general, and an absolutely excellent introduction to OO principles and software design.
- Mikkel Arentoft, Danske Bank
This book is a masterpiece. It’s amazing and fundamental for every software developer who wants to write solid and correct code.
- Emanuele Origgi, Funambol
A marvelous, clear, and exhaustive journey into all aspects of DI in .NET, with very focused and complete real world examples.
- Pasquale Zirpoli, MIED Open Source Initiative
Publisher resources
Table of contents
- Dependency Injection
- brief contents
- contents
- Praise for the First Edition
- front matter
- 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
- Part 2. Catalog
- 4 DI patterns
- 5 DI anti-patterns
- 6 Code smells
- Part 3. Pure DI
- 7 Application composition
- 8 Object lifetime
- 9 Interception
- 10 Aspect-Oriented Programming by design
- 11 Tool-based Aspect-Oriented Programming
- Part 4. DI Containers
- 12 DI Container introduction
- 13 The Autofac DI Container
- 14 The Simple Injector DI Container
- 15 The Microsoft.Extensions.DependencyInjection DI Container
- glossary
- resources
- Index
- Lists of Figures, Tables and Listings
Product information
- Title: Dependency Injection Principles, Practices, and Patterns
- Author(s):
- Release date: March 2019
- Publisher(s): Manning Publications
- ISBN: 9781617294730
You might also like
book
Unit Testing Principles, Practices, and Patterns
Unit Testing Principles, Patterns and Practices shows you how to refine your existing unit tests by …
book
Design Patterns: Elements of Reusable Object-Oriented Software
Capturing a wealth of experience about the design of object-oriented software, four top-notch designers present a …
video
Clean Code Fundamentals
Expanded Edition (Updated February 2022) Updated with episodes from SOLID Principles and Advanced TDD in the …
book
Clean Architecture: A Craftsman's Guide to Software Structure and Design
Building upon the success of best-sellers The Clean Coder and Clean Code, legendary software craftsman Robert …