Software Architecture & Engineering
82 notes
Some notes are currently available only in Chinese. English translations are shown when available.
- Functional Options Patternhistorical
A Go functional-options example for constructing an object with default values while allowing selected fields to be changed flexibly.
- Function Types as Interfaceshistorical
What an interface function is, why it is useful, and a Go implementation that allows either function values or structs to satisfy the same interface.
- Event Sourcinghistorical
What event sourcing is, why it is needed, how it addresses some CRUD problems, its disadvantages, and design notes.
- Publish–Subscribe Patternhistorical
What the publish–subscribe pattern is, why it is needed, how it differs from producer–consumer and observer patterns, and a Go implementation.
- Producer–Consumer Patternhistorical
What the producer/consumer pattern is, why it is needed, and Go implementations using channels, timeouts, object-oriented encapsulation, and error handling.
- Open–Closed Principlehistorical
What the open–closed principle is, why it is needed, and how to implement it through abstractions, inheritance, composition, and aggregation.
- Liskov Substitution Principlehistorical
What the Liskov substitution principle is, why it is needed, and how subclasses should preserve the meaning of parent-class behavior.
- Dependency Inversion Principlehistorical
What the dependency inversion principle is, why it is needed, and implementation guidance centered on interfaces and abstract classes.
- Single Responsibility Principlehistorical
What the single responsibility principle is, why it is needed, and how to separate different responsibilities into different classes or modules.
- Interface Segregation Principlehistorical
What the interface segregation principle is, why it is needed, and how to keep interfaces small and tailored to their callers.