Hasty Briefsbeta

Bilingual

Simplifying Application Architecture with Modular Design and MIM

12 hours ago
  • #modular-design
  • #testability
  • #software-architecture
  • MIM AA (Module Infrastructure-Module Application Architecture) is proposed as an alternative to prescriptive architectures like Clean or Hexagonal.
  • The architecture divides applications into independent modules, each representing a specific business process.
  • Complex business logic modules can have infrastructure code extracted into separate Infrastructure-Modules (Infra-Modules).
  • MIM AA emphasizes high cohesion, low coupling, and information hiding, along with testability and dependency inversion.
  • Business-Modules should have clear public APIs, encapsulate data, and be responsible for independent flows.
  • Infrastructure-Modules contain no business logic and adhere to DIP, serving subordinate roles to Business-Modules.
  • MIM AA is compared to Clean/Hexagonal/Onion architectures, highlighting its simplicity and flexibility.
  • An example application (H&V Server) demonstrates modular refactoring from a 'big ball of mud' to MIM AA.
  • The Adaptive Testing Strategy is recommended, focusing on integration tests, sociable unit tests, and overlapping unit tests.
  • MIM AA is compatible with DDD, CQRS, Event Sourcing, and can be applied to microservices, monoliths, and CLI apps.
  • Modules should be designed as if they could become microservices, ensuring clear boundaries and responsibilities.
  • The appendix introduces Modular Design fundamentals, emphasizing patterns like high cohesion and low coupling.