on 25 October 2011
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.
on 16 July 2012
'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).
on 1 November 2011
In this book Mark Seemann describes Dependency Injection into great detail and guides you on how to architect and develop a real world application, the right way.
You will get detailed information on most popular DI containers in .NET with lots of useful tips for each one. Even more, you will be able to see Dependency Injection applied with plenty amount of high-quality source code available - from simple samples to complex real-world ones! And it goes even further by including high-quality unit test code from where you may see how you can efficiently focus on the essentials of each test case and how everything play nicely when you have followed the catalog of DI patterns described.
This book can definitely make you want to go back in time and re-write all of your applications! Everyone building any kind of software should read this book.
on 23 February 2013
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.
on 6 April 2013
Probably the most useful and well-written computing book I have had the pleasure to read. It's detailed, well thought out and pretty comprehensive. One of those rare books where you find any questions you have answered a page or two later. This book will teach you a lot - not just how to use DI but how to write good, loosely coupled code. I found it a revalation.
If I had a criticism it would be that I didn't really need a full life history of a made-up character nor imaginary conversations with office co-workers. But this is no "Heads-Up Design Patterns" - this is a serious book and it's well worth your time if you have any interest at all in this kind of thing. Also it would have been nice to see Ninject in the DI containers roundup, but that's just being picky.
on 3 January 2016
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.
on 5 June 2016
If you're a .net developer, that's the book you need to and have to read.
I'm not new to DI concepts and how to use it in building asp.net application. But I still learning a lot from this book. The parts I like the book the most is it explains why some implementations are better than one others, which maybe are widely used and are considered to be good practise.
In short, it's a must read for .NET developer from my point of view.