Synopses & Reviews
Dependency Injection in .NET, winner of the 2013 Jolt Awards for Productivity, 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.
Purchase of the print book comes with an offer of a free PDF, ePub, and Kindle eBook from Manning. Also available is all code from the book.
Winner of 2013 Jolt Awards: The Best Books—one of five notable books every serious programmer should read.
- Many C#-based examples
- A catalog of DI patterns and anti-patterns
- Using both Microsoft and open source DI frameworks
Tabel of Contents
PART 1 PUTTING DEPENDENCY INJECTION ON THE MAP
- A Dependency Injection tasting menu
- A comprehensive example
- DI Containers
PART 2 DI CATALOG
- DI patterns
- DI anti-patterns
- DI refactorings
PART 3 DIY DI
- Object Composition
- Object Lifetime
PART 4 DI CONTAINERS
- Castle Windsor
Dependency Injection (DI) is a software design technique behind the wildly popular Spring tool in Java. .NET developers are only now discovering how DI can improve the quality and maintainability of their .NET code.
Dependency Injection in .NET is a comprehensive guide that introduces DI to .NET developers. It covers core concepts and patterns, and introduces important DI frameworks, such as StructureMap, Windsor and Spring.NET. For each framework, it presents examples of its particular usage, as well as examines how the framework relates to the common patterns.
Featuring examples in Java, Ruby, and C#, this in-depth guide explores Dependency Injection, sometimes called Inversion of Control, in fine detail.
Dependency Injection is an in-depth guide to the current best practices for using the Dependency Injection pattern-the key concept in Spring and the rapidly-growing Google Guice. It explores Dependency Injection, sometimes called Inversion of Control, in fine detail with numerous practical examples. Developers will learn to apply important techniques, focusing on their strengths and limitations, with a particular emphasis on pitfalls, corner-cases, and best practices.
This book is written for developers and architects who want to understand Dependency Injection and successfully leverage popular DI technologies such as Spring, Google Guice, PicoContainer, and many others. The book explores many small examples of anchor concepts and unfolds a larger example to show the big picture.
Written primarily from a Java point-of-view, this book is appropriate for any developer with a working knowledge of object-oriented programming in Java, Ruby, or C#.
About the Author
Mark Seemann is a professional software developer and architect living in Copenhagen, Denmark. He has been working with software since 1995 and TDD since 2003, including six years with Microsoft as a consultant, developer and architect. Mark is currently the Windows Azure Technical Lead for Commentor.