Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Dependency Injection with Unity (Microsoft patterns & practices) Paperback – August 15, 2013
|New from||Used from|
The Amazon Book Review
Author interviews, book reviews, editors picks, and more. Read it now
Frequently bought together
Customers who bought this item also bought
About the Author
Dominic Betts is a principal technologist at Content Master, part of CM Group Ltd, a technical authoring and consulting company. An expert on developing applications with the Microsoft .NET Framework and Windows Azure, Dominic has produced numerous training courses, white papers, and other technical material on .NET, Windows Azure, and Microsoft BizTalk.
Dr. Grigori Melnik is a Principal Program Manager in the patterns & practices group at Microsoft. He leads the Microsoft Enterprise Library, Unity, Acceptance Testing Guidance, and CQRS Guidance projects. Prior to that, Grigori was a researcher, software engineer, and educator - long enough to remember the joy of programming in Fortran. His areas of expertise include agile methods, empirical software engineering, and software testing. Grigori is a regular contributor to software conferences around the world. He is a member of the IEEE Software Advisory board. Grigori holds a Ph.D. in Computer Science from the University of Calgary, Canada. Contact him at http://blogs.msdn.com/agile or follow him on twitter via @gmelnik.
Fernando Simonazzi is a software developer and architect with over 12 years of professional experience. He has been a contributor to several projects for Microsoft's patterns & practices group, including Prism v4 and several versions of the Enterprise Library.
Mani Subramanian is a software tester on the patterns & practices team. His recent projects include Enterprise Library (Windows Azure, V5), CQRS Journey, Unity, Prism 4.1. Areas he has worked on include core.net, Windows Azure and Windows Phone, BizTalk ESB, performance, security, and test management. He has 12+ years of industry experience. Prior to joining p&p, he was a developer for products that enable network security and worked as a project manager and test consultant.
Browse award-winning titles. See more
Top customer reviews
1. This is a surprisingly good book - and when I say "book" I mean it: it's not the typical cold user manual you usually find for free on the MSDN website for this format. Authors take the time to explain difficult concepts in the best way (the subject is NOT for the feint of heart!).
2. Great short but intelligent explanation on why and how to create loosely coupled classes and prepare them for the DI, using interfaces. Remarkable connection with the SOLID principles and the Factory patterns to get us ready for the rest. I'm still waiting for "The" book on the Dependency Injection ("The Art of Unit Testing" is still the reference most people use), but the way it is explained here is not bad at all. Separation between Registration, Resolve and Release looks good.
3. Great chapter on Interception! It helped me see better the link to AOP (Aspect Oriented Programming) and how Decorators work to accomplish logging, caching etc without changing the classes these crosscutting concerns are applied to.
1. Some chapters or paragraphs are too long and verbose, while in few other chapters we're left up in the air on interesting subjects (for instance, on the Abstract Factory Pattern and the Service Locator Pattern). The samples ("Trenches") are poor or send us - through hyperlinks - to tones of content found online (?). And I miss an appendix with an API reference, cheat sheet etc. Or a short technical summary at the end of each chapter.
2. While you get deeper into the complex configuration and setup of a DI/IoC Container, you start wondering: why do you need all this trouble?! Why not simply using the Facade design pattern approach to instantiate all those object in a similar sequence? Why do we really need a complex IoC container and a new API to learn? Especially when later on we get just a tiny small half-page example on how to use these classes in unit tests and we see no benefit regarding our DI container. It's good to have the classes disconnected (connected only through interfaces), because we can use mocks or other test doubles. But why the IoC container (and there are many other alternatives to Unity, such as Castle Windsor, Spring.NET, Ninject)? And how does Unity compare to MEF (another Microsoft product with a similar container)?
3. Everything becomes gradually way too complex. While some typical methods of the container are clearly useful and can be found in other similar products, you start wondering in Microsoft didn't try to do (again) too much specialization here. They suggest KISS (keep it simple stupid) at some point at the begin, but when you reach the policy injection and the ways to extend Unity, you're already exhausted and seriously wonder if you'll EVER use most of this stuff anywhere. And you have different approaches and extensions for standalone, MVC, WebForms, WFC applications...
To be honest, I read is quickly to see what I might be missing. Turns out I wasn't missing a whole lot. But the section on using Unity for Interception was quite useful.
Be forewarned, this book is LOADED with code. Maybe too much. I expect programming books to have code, but I prefer the code to come in smaller sections or to be heavily commented. The code in this book follows neither convention.
Also, be aware that if you get the kindle version of the book, the code may be difficult to read on that device or any of it's readers.
I use it as a reference now when I want to verify how I might implement something related to the Unity framework.