All code can be classified into two distinct roles; code that does work (algorithms) and code that coordinates work (coordinators).
The real complexity that gets introduced into a code bases is usually directly related to the creation of classes that group together both of these roles under one roof.
I’m guilty of it myself. I would say that 90% of the code I have written does not nicely divide my classes into algorithms and coordinators.
Defining things a bit more clearly
Before I dive into why we should be dividing our code into clear algorithmic or coordinating classes, I want to take a moment to better define what I mean by algorithms and coordinators.
Ver la entrada original 957 palabras más