> and each method call could mean one of many different things depending on the runtime class of the object it’s being called on. That makes it much harder to look at code and know what path will be executed, so the code becomes much harder to keep in my head.
This is precisely the problem DCI solves. It puts system level behavior (collaboration between objects) into contexts, so that the code path is readable within a single method, rather than spread out across the network of objects.
You get to keep the abstraction and malleability of your objects, while still being readable. If you're not familiar with it, this is a great talk:
This is precisely the problem DCI solves. It puts system level behavior (collaboration between objects) into contexts, so that the code path is readable within a single method, rather than spread out across the network of objects.
You get to keep the abstraction and malleability of your objects, while still being readable. If you're not familiar with it, this is a great talk:
http://www.infoq.com/presentations/The-DCI-Architecture