From: Brian Candler Date: 2010-02-16T17:43:37+09:00 Subject: Re: "Code must be Chunkable" Caleb Clausen wrote: > So, you're saying that this method, which I had optimized away: > > class Balance::TransferDestination < Role > def transfer(amount) > increaseBalance(amount) > puts "Tranfered to account #{__id__} $#{amount}" > end > end > > should be able to contain arbitrary amounts of logic? I think so. Otherwise you end up putting all the logic about *transferring* money inside the Balance object, which really should just be a dumb model which maintains a balance. > I have the feeling this is one of those theoretical things that seems > really complicated but once you understand it its actually quite > simple. I've not yet seen a clear (to me) exposition of what DCI actually *means* in practice. But then I could say the same about AOP. -- Posted via http://www.ruby-forum.com/.