Programming Books C Java PHP Python Learn more Browse Programming Books

Sorry, this item is not available in
Image not available for
Color:
Image not available

To view this video download Flash Player

 


or
Sign in to turn on 1-Click ordering
Sell Us Your Item
For a $14.46 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
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
4.7 out of 5 stars  See all reviews (47 customer reviews)

List Price: $49.99
Price: $33.34 & FREE Shipping on orders over $35. Details
You Save: $16.65 (33%)
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.
Ships from and sold by Amazon.com. Gift-wrap available.
Want it Monday, July 14? Choose One-Day Shipping at checkout. Details
Free Two-Day Shipping for College Students with Amazon Student

Formats

Amazon Price New from Used from
Paperback $33.34  
Books for Pragmatic Programmers
Find resources for various programming needs, including agile teams, programming languages, and the life of a programmer, in the Pragmatic Bookshelf.

Book Description

September 28, 2011 1935182501 978-1935182504 1

Summary

Dependency Injection in .NET, winner of the 2013 Jolt Awards for Productivity, 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.

Purchase of the print book comes with an offer of a free PDF, ePub, and Kindle eBook from Manning. Also available is all code from the book.

Winner of 2013 Jolt Awards: The Best Books—one of five notable books every serious programmer should read.

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

Frequently Bought Together

Dependency Injection in .NET + The Art of Unit Testing: with examples in C# + Professional Test Driven Development with C#: Developing Real World Applications with TDD
Price for all three: $105.43

Buy the selected items together


Editorial Reviews

About the Author

Mark Seemann is a professional software developer and architect living in Copenhagen, Denmark. He has been working with software since 1995 and TDD since 2003, including six years with Microsoft as a consultant, developer and architect. These days he's more into best-of-breed technologies and methodologies such as Continuous Integration, Continuous Delivery, Distributed Version Control Systems, Domain Specific Languages for unit testing and whatever else catches his fancy.

Product Details

  • Paperback: 584 pages
  • Publisher: Manning Publications; 1 edition (September 28, 2011)
  • Language: English
  • ISBN-10: 1935182501
  • ISBN-13: 978-1935182504
  • Product Dimensions: 9.2 x 7.3 x 1.3 inches
  • Shipping Weight: 2.3 pounds (View shipping rates and policies)
  • Average Customer Review: 4.7 out of 5 stars  See all reviews (47 customer reviews)
  • Amazon Best Sellers Rank: #28,137 in Books (See Top 100 in Books)

More About the Author

Mark Seemann is a Danish software developer based in Copenhagen, Denmark. His professional interests include object-oriented development and software architecture, as well as software development in general. Apart from writing a book about Dependency Injection he has also written numerous articles and blog posts about related topics.

Despite being a .NET developer he takes most of his inspiration from sources across a wide range of technologies, including lots of pattern books.

Originally poised to become a rock star or (failing that) graphic novelist (in the European tradition) he one day found himself with insufficient talent for either, a masters degree in Economics, and a desire for working with computers. He has been doing the latter intermittently since 1995.

When not working with software or spending time with his family, Mark enjoys reading, drawing and painting, listening to and playing music, as well as preparing or consuming gourmet food and wine.

Customer Reviews

Most Helpful Customer Reviews
38 of 38 people found the following review helpful
5.0 out of 5 stars No Adjectives Left September 5, 2012
Format:Paperback|Verified Purchase
The Short Story: This is the best software development book I have ever read. By miles. Or, in deference to Mr. Seeman, in kilometers. Stop. Buy this book. It will change how you think, how you reason, how you sleep at night. See you in a year, we will both be smarter.

The Long Story: I bought this book last year. I can't remember exactly why I bought it, but I suspect that it had something to do with intellectual intimidation and the frightening title. I come from a non-OO background, but I am too young to get through the next 20 years without dealing with the reality of OO prevalence in small (i.e. numerous) projects. I had 2 choices ... start at the bottom or start at the top. Believe me, I chose the latter with this book.

I'm not going to explain the content in every chapter, simply because other reviewers have already done the job as I would have. Read Mr. T. Anderson's fine review if you need that kind of detail. Instead, I will talk about the effect that this book had had on how I think.

Chapter 2 is the velvet sledgehammer in the face. I read along with the case study, nodding my head and exercising my (in retrospect, tiny) brain as Seeman describes how "Mary" and "Jens" go about building a layered application. I'm thinking, yes Mary and Jens, this is what the magazines, blog articles, and dime-a-dozen gurus are saying regarding the construction of layered application. Seeman then dissects the "layered" application. Actually, he doesn't dissect it; he tears it to shreds and stamps all over it. Brilliantly. It's truly scary to read this chapter. You will feel like a complete novice at the end of it. You then have two choices ... (1) reject this stuff as abstract, ivory tower nonsense, or (2) put on your big-boy-pants.
Read more ›
Was this review helpful to you?
32 of 33 people found the following review helpful
5.0 out of 5 stars Must read for .NET Devs November 17, 2011
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.
Comment | 
Was this review helpful to you?
21 of 23 people found the following review helpful
5.0 out of 5 stars Awesome, Awesome, Awesome, Awesome, Awesome... January 4, 2012
Format:Paperback|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.
Read more ›
Comment | 
Was this review helpful to you?
10 of 10 people found the following review helpful
5.0 out of 5 stars Best Book in .NET best practices hands down December 14, 2011
Format:Paperback|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.
Comment | 
Was this review helpful to you?
Most Recent Customer Reviews
5.0 out of 5 stars Second edition please!
I learned so much from this book! Not only the DI concept but also about proper OO design. Every time I re-read a chapter I find more hidden gems. Read more
Published 6 days ago by Mosaic
5.0 out of 5 stars One of the books you need to read in your career.
This book is a must read for anybody interested in IoC and DI. Simple like that, no need to keep making statements about it. Read more
Published 1 month ago by Rafael Soares
5.0 out of 5 stars Best book EVER !
Best book ever about Object Oriented Design. Even much better than the java books about it. An absolute need for people being serious about software development. Read more
Published 1 month ago by Ignacio Jorge
5.0 out of 5 stars Excellent
Mark gives great insight into not only Dependency injection but good coding practices in general. This book has changed some of my coding practices for sure.
Published 2 months ago by Matthew C.
2.0 out of 5 stars Good book, problems running code in Visual Studio 2013.
While the book is very good, the source code only appears to run in Visual Studio 2010.
I have spent quite a while updating/installing previous versions of MVC, with no luck... Read more
Published 3 months ago by Eric Yeoman
5.0 out of 5 stars Great book for learning the proper way to program using DI
Mark has a writing style I enjoy and I'm learning so much from reading his book. Not just about DI but about programming in general. Read more
Published 3 months ago by fuelpagan
5.0 out of 5 stars Definitely one of the most helpful .Net books I have read
I have now read this book 3 times and have picked up something new each time I have read it. It is full of useful patterns and anti-patterns and explains concepts in an easy to... Read more
Published 4 months ago by Jonny Irwin
4.0 out of 5 stars Great book
This is a great book on Dependency Injection. It covered several aspects of DI that I was not aware of. Read more
Published 4 months ago by Mark Pearl
5.0 out of 5 stars Great Book!
The author covers the topic of "dependency injection" in great detail, highly useful if you are reading up on "web api" programming.
Published 4 months ago by Cruz Carpenter
5.0 out of 5 stars Great book!
A great overview of using Dependency Injection in .NET. This book demonstrates the concepts of DI, the anti-patterns for DI, and gives a good illustration of many DI containers... Read more
Published 4 months ago by Brian Mains
Search Customer Reviews
Search these reviews only

What Other Items Do Customers Buy After Viewing This Item?


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

Forums

Topic From this Discussion
Buy this book now! Be the first to reply
Have something you'd like to share about this product?
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Search Customer Discussions
Search all Amazon discussions