DeepRead
Cover of Dependency injection in .NET

Dependency injection in .NET

Mark Seemann · 2012

Programming and computer science › Web architecture and microservices

#4,333 most recommended

About the book

Dependency injection in .NET covers how to structure C# applications so that components receive their collaborators from outside rather than creating them. It starts from object-oriented fundamentals and the reasons for loose coupling, then moves to the practical work of composing an application and managing object lifetimes in .NET. The central claim is that dependency injection is a design practice grounded in principles such as SOLID and the explicit declaration of dependencies, and that it matters more than any particular tool. The book argues for constructor injection and a single composition root where the object graph is wired, and it treats DI containers as optional helpers rather than requirements. It also argues against patterns such as the service locator that hide dependencies, and it presents decorators and related techniques as ways to extend behaviour without changing existing classes.

Written by Claude from what it knows of this book.

What Hacker News says 78% recommend · 11% critical

02.552013201420162018202020212017 peak · 5
This bookAverage book in Web architecture and microservices

In the commenters’ own words

What Open Library readers say 4.50 from 2 ratings

  1. 51
  2. 41
  3. 30
  4. 20
  5. 10
  • 8 want to read
  • 1 reading
  • 2 have read

Only 2 ratings: treat the average as a hint.

Open Library’s page for the book

What critics say, via Wikipedia

No Wikipedia article about this book yet, so no critics to quote.

Reddit communities — coming later

The threads it came up in

Details

First published
2012
ISBN
9781935182504
Editions known
2 at Open Library
Open Library
OL16506210W

Application softwareDevelopmentInternet programmingMicrosoft .NET FrameworkObject-oriented programming (computer science)

Explore in the mosaic

Read next: its neighbours on the mosaic