Rules
- Simple things must be simple.
- Complex things must be as simple as possible.
Meaning that the implementation should be the simplest.
Four Noble Truths
The approach is like a buddhism:
- There is a complexity.
- There is a root cause of the complexity.
- There is an absence of complexity.
- There is a way to avoid complexity.
Complexity
API depends on the model you choose: actor, callback-style, subscription, future/promise, RPC-style etc. But the model should be implementation details: you should change it if you wish. Currently, it’s not the case.
The idea is to transform the code in such way to have flexibility in the model and approaches. One should consider the model as a low-level (implementation details) architecture.
Building Blocks
You should build the application from top to bottom (from architecture to implementation), not from bottom to top (from classes and libraries to satisfy the requirements/architecture).