From: Jamis Buck Date: 2004-03-20T00:38:34+09:00 Subject: Re: Copland tutorials Charles Comstock wrote: > I skimmed through them, they seemed reasonably informative. It might > help if you had some example code that showed a sort of before/after, > demonstrating how much cleaner the code was through your method, as I > guess I'm not quite following the advantage. That or a small case study > of a good application to use this for. That or a link showing > equivalent examples offsite somewhere even if it is in another language. > > Charles Comstock Thanks for your input, Charles. I'll try the before/after approach, though I fear it won't be a very dramatic different for such small applications as the tutorials. (Frankly, IoC is really only useful for larger, enterprise-scale applications. Smaller applications may actually be negatively impacted by using IoC.) I do have a small case study that demonstrates the power of IoC. It is on the main Copland page (http://copland.rubyforge.org). Just scroll down until you get to the section titled "Inversion of Control" (in particular, the subsection titled "Dependency Injection in Action"). I probably need to refactor the documentation and find a better way to navigate between it all... And I'll see what I can do about finding some offsite examples. I know I've seen some impressive ones in Java--I'm sure they would do to show the power of IoC. Thanks again! -- Jamis Buck jgb3@email.byu.edu http://www.jamisbuck.org/jamis ruby -h | ruby -e 'a=[];readlines.join.scan(/-(.)\[e|Kk(\S*)|le.l(..)e|#!(\S*)/) {|r| a << r.compact.first };puts "\n>#{a.join(%q/ /)}<\n\n"'