Best of Domain-Driven DesignJune 2025

  1. 1
    Article
    Avatar of awegoAwesome Go·49w

    MVC vs DDD: Go Language Architecture Deep Dive

    Compares MVC and DDD architectural patterns for Go applications, examining their structural differences, code organization approaches, and use cases. MVC organizes code by technical layers (Controller/Service/Repository) and suits smaller systems with stable requirements, while DDD structures code around business domains with four layers (Interface/Application/Domain/Infrastructure) and better handles complex business logic. The guide provides detailed directory structures, code examples, and implementation best practices for both patterns in Go, highlighting that MVC offers simplicity and rapid development while DDD provides better scalability and maintainability for complex systems.

  2. 2
    Article
    Avatar of awegoAwesome Go·50w

    Modern (Go) application design

    Explores modern Go application design principles emphasizing structure and composability. Discusses two key approaches: use case-driven structure (like CLI tools) and data model-first principles using repository patterns with generics. Demonstrates how to separate concerns through layered architecture with storage, business, and view layers. Shows practical examples of implementing CRUD operations, aggregates, and the MVC pattern while maintaining clean boundaries between components for better testability and maintainability.

  3. 3
    Article
    Avatar of swizecswizec.com·49w

    Why utils are bad, an example

    Utils-based code organization creates circular import problems that break applications unexpectedly. When payment utils depend on email utils and vice versa, Python cannot resolve the circular dependencies. The solution is vertical module organization based on domain context rather than technical function - group everything about payments (including emails) in a payment module, while keeping low-level operations like email sending in separate atomic libraries.

  4. 4
    Article
    Avatar of itnextITNEXT·51w

    Abstractions Done Right: Discussing When It Is Worth Or Not

    Abstractions like interfaces and layered architectures are valuable when used correctly, not just for replacing implementations but for deferring decisions and isolating concerns. The author advocates for a 4-layer approach (UI, Application, Domain, Infrastructure) that enables vertical development and reduces cognitive load. Two real-world examples demonstrate when abstractions provide clear value (migrating from serverless to Kubernetes) versus when they create unnecessary overhead (simple Step Function tasks). The key is understanding that abstractions' main benefit is enabling focused development and clearer intent, with implementation flexibility as a bonus.