Software engineering is about data modeling: Specifying the structure of the data, and specifying how it is processed.
All behaviors we associate with computer applications emerge from how data is processed over time.
The only thing computers can do is data processing. They can't do anything else.
It makes no sense to talk about "business logic" as if it's a separate thing from the data processing.
The purpose of reading code is to deduce how data is being processed. When code is written in such a way to purposely obfuscate what the data is and how it's processed, we say the code is hard to read.
We advocate straight forward programming: writing code in the most simple and direct way to perform its duty:
Process the data correctly
This is the essence of programming. If you can't do this you're not a programmer.
Lend itself to be easy to understand
If you can't deduce the data model and the operations being performed on it, then the code is not easy to understand. (skill issues non-withstanding)
The purpose of software architecture is to model data processing such that:
Building blocks allow a wide range of desired behaviors
You get the desired behavior by composing building blocks together in different ways. You can experiment until you find what works well
Code paths can be simplified and collapsed
The data model is rich enough to describe a wide range of behaviors that can be implemented by very few code paths
We oppose architectures that:
Hide the data and obfuscates its processing
Making systems opaque and difficult to reason about is not a virtueOverfit to the current iteration of the requirements
A good architecture is flexible, allowing exploration of the design space
Emphasize abstract processes that are not defined in terms of data
Good abstractions are defined in terms of data.
Bad abstractions are defined in terms of abstract objects.
We Encourage proven techniques to untangle code complexities
Separate data processing into stages
Each stage prepares the data to feed to the next stage.Semantic Compression
Extract common code patterns into reusable functions that operate on dataCollapsing code paths
When the same code path can process many cases without modification
We de-emphasize irrelevant concerns
How to organize code in files and folders?
How big should files be?
How long should functions be?
How to format code?
It doesn’t matter. Use your taste. Find what works for you.