Jump to ratings and reviews
Rate this book

Dependency Injection: With Examples in Java, Ruby, and C#

Rate this book
Dependency Injection is an in-depth guide to the current best practices forusing the Dependency Injection pattern-the key concept in Spring and therapidly-growing Google Guice. It explores Dependency Injection, sometimescalled Inversion of Control, in fine detail with numerous practical examples.Developers will learn to apply important techniques, focusing on their strengthsand limitations, with a particular emphasis on pitfalls, corner-cases, and bestpractices.

This book is written for developers and architects who want to understandDependency Injection and successfully leverage popular DI technologies such asSpring, Google Guice, PicoContainer, and many others. The book exploresmany small examples of anchor concepts and unfolds a larger example to showthe big picture.

Written primarily from a Java point-of-view, this book is appropriate for anydeveloper with a working knowledge of object-oriented programming in Java,Ruby, or C#.

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.

352 pages, Paperback

First published May 28, 2009

4 people are currently reading
175 people want to read

About the author

Dhanji R. Prasanna

1 book9 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
22 (24%)
4 stars
36 (40%)
3 stars
25 (28%)
2 stars
4 (4%)
1 star
2 (2%)
Displaying 1 - 12 of 12 reviews
Profile Image for Yolanda Dewi.
4 reviews1 follower
September 26, 2015
Pretty good as a technical book. Really improves my knowledge about dependency injection so I think I'm ready to learn Dagger 2.
6 reviews
February 15, 2017
This is a book I wished I had read when i started programming. Great introduction and reasoning on why DI is a really good thing, but if you have some experience with DI it's nothing too new.
Profile Image for Ronald.
33 reviews2 followers
August 15, 2011
I've have been a user of the Spring framework for years now and like to think I know a thing or two about DI so I was a dubious about the book, but I checked my ego at the door and purchased the book anyway. I'm glad that I did. For one thing, being a Spring fan it was nice to see some examples of Guice, another popular DI framework. The author helped clarify the nuances of scoping and provided some interesting ideas on how to apply custom scopes. The book also reminds us how important it is to remember about thread safety when creating DI managed services. If you are new to the DI world then you should pick up this book. If you are a DI veteran, then some of the material will be familiar to you but I am confident that there are some nuggets in there worth the purchase price. If I could give it a 3 1/2 stars I would.
Profile Image for Christian Brumm.
85 reviews21 followers
February 5, 2012
Good read on dependency injection in Java, mostly Guice and Spring (with a clear emphasis on Guice). The topics covered are very broad and circle around DI, patterns and best practices. There are complete code examples for everything, using commonly used Java frameworks. Even contains the "boilerplate" - I woudn't describe this book as "dense". For some chapters I felt that they added little value on top of the high-level summary at the end of each chapter, but that might be because I am already quite familiar with the topic.
Profile Image for Taylor.
220 reviews8 followers
October 7, 2010
If you need to know about Dependency Injection, this is the book to get. Even though the examples are in Java, the principles are applicable to any language where dependency injection is used. when I started this book, I was a DI dabbler, but really did not grasp how useful this technique could be. Now, I see it as a "must-have" part of any programmers toolchest.
Profile Image for Michael.
61 reviews2 followers
December 30, 2014
Good introduction to DI. Covers all the bases and provides reasonable justifications for the suggested designs. I had already picked up just about all the material already through experience, and I think a lot can be learned just by reading DI libraries' documentation. The book examples are quite web-centric. All in all this book still holds up, even 5 years after publication.
45 reviews2 followers
Read
May 15, 2015
a good book knowledge Dependency Injection , through some code and example with spring and guice, explain the benefit and disadvantage of the each strategy.through read the book,i think my project can use Dependency Injection in many aspects.
Profile Image for Maksim.
7 reviews2 followers
January 1, 2014
Very descriptive and comprehensive DI book, showing great patterns (and anti-patterns) and best practices along with clear explanations and examples.
Displaying 1 - 12 of 12 reviews

Can't find what you're looking for?

Get help and learn more about the design.