From: Eric Hodel Date: 2007-06-09T04:27:29+09:00 Subject: Re: Disadvantages of Dependency Inversion? On Jun 8, 2007, at 11:55, 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? Ruby is dynamic enough that you probably don't need it. I can build a duck-type object for testing very easily. I can inject these duck-type objects into classes that at test-time very easily. See the ar_mailer gem for an example. -- Poor workers blame their tools. Good workers build better tools. The best workers get their tools to do the work for them. -- Syndicate Wars