In the beginning there was chaos:
- ANYTHING was done to save memory |
- Modifiying code at runtime |
- No chance to reason about the code |
Then came procedures:
- they give structure to the program |
- they decouple from registers |
- they decouple from state in the calling procedure |
- they can be reused anywhere in the program |
- they can be reuse across projects |
- This is still used a lot. |
- It grew strong together with GUIs |
- Classes encapsulate functionality and state |
- Thus they decouple from other classes |
- OOP works best for purely technical domains |
- Inheritence creates a lot of coupling |
- Favour Composition over Inheritance |
- Separation of Concerns |
- Information Hiding Principle |
- Tell, don´t ask! (High cohesion) |
- Dependency injection |
SOLID principles:
- Single Responsibility Principle |
- Open Closed Principle |
- Liskov Substitution Principle |
- Interface Segregation Principle |
- Dependency Inversion Principle |
Note:
- Open Closed Principle: open for extension, closed for changes
- Interface Segregation Principle: many client-specific interfaces are better than one general-purpose interface
- Dependency Inversion Principle: one should depend upon abstractions, not concretions
- Why don't we use HTTP internaly? |
- Asynchronism prevents time wise coupling: |
- no timeout handling
- Persistence prevents stability wise coupling: |
- no retries with exponential backoff
- that have to be randomised
- no circuit breaker
- Sender and receiver are decoupled with messaging. |
- Functors (higher-order functions) allow composition of decoupled functions |
- Immutable data structures decouple concurrently running functions |
- Pure (side-effect free) functions are decoupled from any context including timing (lazy evaluation) |
---?image=assets/green-pasture.jpg
- Decoupling as a natural thing |
- Great match for business logic |
- Easy to understand |
- Natural graphical representation |
- Parallel to the Barzahlen solution I am working on a spike implementation for the EBICS service. |




