or
Sign in to turn on 1-Click ordering.
or
Amazon Prime free trial required. Sign up when you check out. Learn more
More Buying Choices
Have one to sell? Sell yours here
or
Get a £11.75 Amazon.co.uk Gift Card
Dependency Injection in .NET
 
 
Tell the Publisher!
I’d like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Dependency Injection in .NET [Paperback]

Mark Seemann
5.0 out of 5 stars  See all reviews (2 customer reviews)
RRP: £33.99
Price: £28.89 & this item Delivered FREE in the UK with Super Saver Delivery. See details and conditions
You Save: £5.10 (15%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In stock.
Dispatched from and sold by Amazon.co.uk. Gift-wrap available.
Want guaranteed delivery by Wednesday, May 30? Choose Express delivery at checkout. See Details
Trade In this Item for up to £11.75
Get an extra £5 when you trade in books worth £10 or more until June 30, 2012. Trade in Dependency Injection in .NET for an Amazon.co.uk gift card of up to £11.75, which you can then spend on millions of items across the site. Trade-in values may vary (terms apply). Find more products eligible for trade-in.

Frequently Bought Together

Dependency Injection in .NET + The Art of Unit Testing: with Examples in .NET + C# in Depth
Price For All Three: £81.57

Show availability and delivery details

Buy the selected items together

Customers Who Bought This Item Also Bought


Product details

  • Paperback: 584 pages
  • Publisher: Manning Publications; 1 edition (7 Oct 2011)
  • Language English
  • ISBN-10: 1935182501
  • ISBN-13: 978-1935182504
  • Product Dimensions: 23.3 x 18.6 x 3.3 cm
  • Average Customer Review: 5.0 out of 5 stars  See all reviews (2 customer reviews)
  • Amazon Bestsellers Rank: 14,231 in Books (See Top 100 in Books)

More About the Author

Mark Seemann
Discover books, learn about writers, and more.

Visit Amazon's Mark Seemann Page

Product Description

Product Description

Summary

Dependency Injection in .NET

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.

What's Inside
  • 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
  1. A Dependency Injection tasting menu
  2. A comprehensive example
  3. DI Containers
  4. PART 2 DI CATALOG
  5. DI patterns
  6. DI anti-patterns
  7. DI refactorings
  8. PART 3 DIY DI
  9. Object Composition
  10. Object Lifetime
  11. Interception
  12. PART 4 DI CONTAINERS
  13. Castle Windsor
  14. StructureMap
  15. Spring.NET
  16. Autofac
  17. Unity
  18. MEF

About the Author

Mark Seemann is a software architect living in Copenhagen. Previously a developer and architect at Microsoft, Mark is now an independent consultant.


Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index | Back Cover
Search inside this book:

Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

What Other Items Do Customers Buy After Viewing This Item?


Customer Reviews

4 star
0
3 star
0
2 star
0
1 star
0
Most Helpful Customer Reviews
11 of 11 people found the following review helpful
Essential reading 25 Oct 2011
Format:Paperback|Amazon 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.
Comment | 
Was this review helpful to you?
2 of 2 people found the following review helpful
Format:Paperback
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.
Comment | 
Was this review helpful to you?
Most Helpful Customer Reviews on Amazon.com (beta)
Amazon.com:  17 reviews
13 of 13 people found the following review helpful
Must read for .NET Devs 17 Nov 2011
By Art Gorr - Published on Amazon.com
Format:Paperback
I have never written a review for Amazon before but I want to take the time here to give major props to the author for this quality book on Dependency Injection. This is easily in the top 2 of software development books that I have read. (The other being R. Martin's Agile Principles, Patterns, and Practices in C#)

I have been using DI successfully for several years, yet I was able to learn an enormous amount about the topic from this book. Explanations of DI principles and related patterns such as Decorator really clicked for me. Read this book and you will understand how to develop loosely coupled software components. Excellent code examples in C#. The section on object composition in MS frameworks like ASP.NET MVC and WCF is an extremely valuable resource. The footnotes will direct you to very interesting reading for an even deeper dive. I could go on.

I highly recommend this book for .NET developers.
8 of 8 people found the following review helpful
Awesome, Awesome, Awesome, Awesome, Awesome... 4 Jan 2012
By T. Anderson - Published on Amazon.com
Format:Paperback|Amazon Verified Purchase
Uhg. Sometimes my ability to be a complete ignoramus really annoys me. When I first saw this book on the upcoming list of books to be published I thought, "That sucks, I just got done reading Dependency Injection by Dhanji R. Prasanna last year. I don't need to read the .NET version", and so I ignored this book.

As time went on I saw all the great reviews coming out about the book and it made me curious. A buddy of mine had purchased it and I know that Manning gives ebooks with there book purchases, so I asked to borrow it. I ordered the book the next day.

I have nothing bad to say about Dependency Injection by Dhanji R. Prasanna, it was a great book. The difference is this one spoke my language of choice, .NET. It made the read so much better for me. Plus all the coverage of the popular DI Containers for .NET rocks.

This book is broken down into 4 parts the first part introduces DI. Part two is a catalog of patterns, anti-patterns, and refactorings. Part three covers Object Composition, Lifetime Management, and Interception. Part four covers all the popular DI .NET Containers which include Castle Windsor, StructureMap, Spring.NET, Autofac, Unity, and MEF.

One of the coolest things about the book is that it uses poor man's DI in the first 3 parts of the book to teach you how it all works, and then covers the popular DI .NET Containers in details to help you be more productive.

Coverage of the popular DI .NET Containers is nice deep coverage which also highlights the advantages and disadvantages of each one. Each popular DI .NET Container gets its own chapter. There are also some nice feature and lifestyle comparison charts to help you zero in on which DI Container will fit your needs.

The chapter on Object Composition is pretty cool too. It include coverage of console applications, ASP.NET MVC, Windows Communication Foundation, Windows Presentation Foundation, ASP.NET (Web Forms), and PowerShell.

The chapters on patterns and anti-patterns are a really big help in making sure you are using DI correctly. The patterns covered include Constructor Injection, Property Injection, Method Injection, and Ambient Context. The anti-patterns covered include Control Freak, Bastard Injection, Constrained Construction, and Service Locator. Both include nice code samples.

The chapter on DI refactoring covers mapping runtime value to abstractions, working with short-lived dependencies, resolving cyclic dependencies, dealing with constructor over-injection, and monitoring coupling.

This book is packed with diagrams that help you visualize the topic at hand. The author includes just the right amount.

Over all I found this author's writing style made the book a nice cover to cover read, but I will also be keeping it near to use as a reference. I have been on projects that use Castle Windsor, StructureMap, Unity, and MEF, so having coverage of each handy will be nice.

All the downloadable code is very well organized and usable.

This book is not only about DI, it is about proper object oriented programming. Every .NET architect and developer should read this book.
4 of 4 people found the following review helpful
Best Book in .NET best practices hands down 14 Dec 2011
By T. Stickel - Published on Amazon.com
Format:Paperback|Amazon Verified Purchase
I started in the 90's with VB and then VB.NET for .NET in 2001-2002. I made the transition to C# in 2002-2003 and I used the standard code behind model. I didn't know about DI / IOC / Unit Testing etc... until 3 years ago as I was using so many technologies. In the past few years of using MVC 1,2,3 and now doing unit testing , DI, design patterns, Mocking with Moq etc..., this book is vital for my development as a good developer. Mark Seemann writes so well. I now look best at the code I wrote 6 months ago as utter garbage. Knowing fundamental C# development is essential backbone to this book, but to skip on not owning and reading this book may possibly be the difference between having a job and not a having a job in .NET in 5 years. The .NET interviews I have had in the last 3-4 years have been increasingly demanding on what to know etc... This book fosters how to do things the right way. The manning books have also become a favorite, ... so move over Apress and Wrox ... Manning is king IMO. This book was recommended to me by a friend who worked for a Microsoft Gold Partner. Sometimes I go with Ebooks, but I'm glad I was the paperback of this one. Take your .NET to the next leavel. IOC and DI are NOT the same thing! The author is on stackoverflow.com answering questions etc... Even if you do Java or a Dynamic language, you will end up really thinking about software development that is loosely coupled for real, and not just a buzz word. Enjoy as I did.
Search Customer Reviews
Only search this product's reviews

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   


Listmania!


Look for similar items by category


Look for similar items by subject


Feedback


Amazon.co.uk Privacy Statement Amazon.co.uk Delivery Information Amazon.co.uk Returns & Exchanges