From: Robert Klemme Date: 2007-06-14T19:15:04+09:00 Subject: Re: Disadvantages of Dependency Inversion? On 14.06.2007 12:04, Trans wrote: > On Jun 8, 10:47 pm, Daniel DeLorme wrote: >> I think the best article on the topic is this by Martin Fowler:http://www.martinfowler.com/articles/injection.html >> He does a good job of analyzing the pros and cons. And basically I agree >> with him; DI is useless unless you write 3rd party packages. > > For a long time I felt DI was very interesting and potentially very > useful, but I never could quite get mileage out of it. I think I > finally figured out why: DI is just a contrived codification of an > essentially simple top-level construction layer. Here's what I mean. > Reading Jim's http://onestepback.org/articles/depinj/, he gives this > basic example: Isn't DI just about callbacks? If that was the case DI is all over Ruby code - every block is an anonymous callback function. Kind regards robert