5

Dependency Injection in .NET

 3 years ago
source link: https://www.amazon.com/Dependency-Injection-NET-Mark-Seemann/dp/1935182501/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=ploeh-20&linkId=6ffa37475ff957ebc833bf08c792135b&language=en_US
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Top reviews from other countries

default._CR0,0,1024,1024_SX48_.png
James World

5.0 out of 5 stars

Essential reading

Reviewed in the United Kingdom on October 25, 2011
Verified Purchase

This book gives one of the best explanations of Dependency Injection you will find. Given that DI is applicable almost everywhere, this has to make it one of the most important books for any .NET developer to read.

I thought that with over 15 years of OO coding experience there wouldn't be much for me here, but I couldn't have been more wrong. Somehow, although the vast majority of the text seems familiar, the clarity of the explanations have had a revitalising effect on me - coding the right way just seems to be so much clearer now! The exposition is brought to life with a set of example code that is simple enough not to cloud the issues at hand yet complex enough to translate easily to real-world applications. This is a difficult balance to strike but Mark has really hit the nail on the head.

I found the sections on Anti-Patterns particularly enlightening - the description of each explains why these anti-patterns arise in a way that reinforces the understanding and motivation for the Patterns covered in the preceding section, and provides you a clear refactoring path towards a better solution.

I'm not ashamed to say that reading this book has had a significant positive impact on my application design and also improved my approach to Test Driven Development. I've found myself detecting and correcting code smells far more efficiently than I was previously able to.

If you are completely new to DI, then your experience may be harder going. This book does assume a fair degree familiarity with OO concepts - and references to ideas like SOLID code and refactoring are brought up without going into too much background detail. However, there are plenty of links in the footnotes to informative blog posts and books. If phrases like "coding to interfaces", "pattern", "anti-pattern" and "abstract factories" are only vaguely familiar to you, then you will have some reading around the subject to do to get full benefit from this book.

The benefits of understanding the ideas so well presented in this book cannot really be understated. Mark Seemann has created a book that ranks alongside the works of Bob Martin, Eric Evans, Jon Skeet and Jeffrey Richter in terms of its potential impact and importance to C# developers. Highly recommended.

25 people found this helpful
Report abuse
default._CR0,0,1024,1024_SX48_.png

4.0 out of 5 stars

First of all it's an excellent introduction to Dependency Injection and I would definitely recommend ...

Reviewed in the United Kingdom on January 3, 2016
Verified Purchase

First of all it's an excellent introduction to Dependency Injection and I would definitely recommend it. I won't cover the good stuff because other reviews have already. I do however wish to voice a few gripes. This should not put you off from buying the book, it's more directed at the author.

1. Almost every chapter (except the ones on DI Containers) starts with an analogy, mostly involving food preparation. I found these distracting and annoying. Surely this book's chapters aren't such esoteric topics for the target audience that we require examples from another domain. As I am neither a chef nor a foodie I did not find them enlightening, and spent more time trying to understand how the example was relevant than actually understanding the concept in its proper context.

2. Each chapter spent too long summarising what it was going to be telling me. I don't think a two page summary at the start of each chapter is necessary. An index can tell me what each chapter holds. This was an issue not only at the start of the chapters but also throughout; the sections making up the chapter frequently ended by summarising what they had told me. I don't need to know that - I've just read the text! Repetition can be very annoying.

Overall the author should have just got to the point and been more concise. When he did though, it was an enjoyable and informative read.

default._CR0,0,1024,1024_SX48_.png
Richard

5.0 out of 5 stars

Essential Reading

Reviewed in the United Kingdom on February 23, 2013
Verified Purchase

Relatively new to .NET, I recently joined a project team who were well under way developing a large solution which uses DI all over the place. I immediately recognised the need for me to learn about this, and all roads point to this book. The early chapters offer an excellent introduction to the subject matter and explain the basic concepts clearly and concisely.

On the containers front, I have only read the chapter about Castle Windsor as that is what we use, however it did wonders for my confidence and knowledge in setting up and configure solutions to use Windsor.

Much of the book is excellent to read chapter by chapter, plus more focussed sections offer good reference material which I'm sure I'll be going back to time and again.

If you're a ,NET developer using DI, buy this book - its that simple.

3 people found this helpful
Report abuse
default._CR0,0,1024,1024_SX48_.png
moody1987

5.0 out of 5 stars

Just brilliant!

Reviewed in the United Kingdom on July 16, 2012
Verified Purchase

'Dependency Injection in .NET' is not only about dependency injection but about designing your application in general. The book is a real roundup of design patterns and good practices for (future) software architects. I highly recommend this book for developers who have never heard about IoC and for those ones who have been using IoC for some time. I have been using a few different IoC/DI containers and thanks to this book I realized I was doing it wrong.

Author focuses on desinging loosely coupled applications and he shows how DI can help us do it. He mentions a lot of design patterns and explaines how they are associated with DI. He also provides a reader with a lot of examples using different IoC containers.

Tha last chapter contains a catalogue of a few popular .NET IoC containers (StructureMap, Castle Windsor, Autofac, Unity, MEF).

5 people found this helpful
Report abuse
default._CR0,0,1024,1024_SX48_.png
Alex KeySmith

5.0 out of 5 stars

Essential reading for those wanting advanced knowledge

Reviewed in the United Kingdom on February 4, 2016
Verified Purchase

I picked this up as although I'm familiar and use Ioc day to day I'm contributing to an open source project so want to be absolutely certain of my choices. Although this is quite wordy, it goes into fantastic detail far greater than online resources do. It also comes with a voucher to get the eBook if you're on the move.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK