Warning - I am pretty skeptical about DI

DI one of the most most widely discussed design patterns, but  
probably not than most widely used.
My opinion is that, as with SOA, web services, EJBs, XML, Corba the  
idea moved from "sounds interesting"
to "widely accepted without question" without a body of compelling  
data that pointed to clear business
benefit. My hunch is this is partly do to the "this looks cool"  
effect impressing us technologists.

Given this, I'd say the drawbacks of DI are:

uncertain value proposition
less explicit than the ServiceLocater pattern and thus harder to  
debug/comprehend
not a fit for Ruby
canonical implementation (Spring) is a bit fat and overcomplex
other Java implementations are sparsely documented and have uncertain  
viability
not pragmatic

- Peter

On Jun 8, 2007, at 2:55 PM, sweetchuck74 / gmail.com wrote:

> Nowadays, DI (Dependency Inversion) is one of the widely used design
> pattern.
> It provides several benefits, such as (1) loose coupling between
> component (2) effective and easy testing (component testing or unit
> testing)
>
> What are the drawbacks or disadvantages of using DI?
>
> Thank you very much for your answer in advance.
>
>

Peter Booth
peter_booth / mac.com
917 445 5663