Skip to content

Instantly share code, notes, and snippets.

@dimabory
Last active January 28, 2019 10:42
Show Gist options
  • Save dimabory/0be35424593411aad99a38900116a776 to your computer and use it in GitHub Desktop.
Save dimabory/0be35424593411aad99a38900116a776 to your computer and use it in GitHub Desktop.
system design

To design well decoupled components, it helps to reflect about: “if I would want to remove this business concept, by deleting its component root folder would all of the business concept code be removed and would the remaining application not break?” If the answer is yes, then we have a well decoupled component.

For example, in a Command Bus architecture the command and the handler do not work one without the other, they are conceptually and functionally bound together, so if we would need to remove that logic, we would remove them both, and if they are in the same place, we just remove one folder (the problem we are trying to solve is not about deleting code, it’s about having decoupled and cohesive code, but it helps to think in these terms). So to follow the CCP and the CRP, a command should be in the same folder as its handler.

Your architectures should tell readers about the system, not about the frameworks you used in your system. If you are building a health-care system, then when new programmers look at the source repository, their first impression should be: “Oh, this is a heath-care system”.

Robert C. Martin 2011, Screaming Architecture

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment