Mark Seemann is a celebrated software architect and author whose work bridges the worlds of functional programming and object‑oriented design. With books like Code That Fits in Your Head and Dependency Injection Principles, Practices, and Patterns, he has helped shape modern software design. His blog, blog.ploeh.dk, is filled with insightful posts on topics ranging from encapsulation in functional programming to how architectural patterns like ports and adapters can be applied functionally. In addition, his video series on cleancores.com—titled humane code—offers a humane and thoughtful take on software design. Videos in the series include:

  1. Humane Code,
  2. Composite as Universal Abstraction,
  3. Much Ado About Nothing,
  4. Church Visitor (Encapsulation Poka Yoke),
  5. Preserved in Translation.

Below, we summarize three of his blog posts that illustrate his unique perspective on encapsulation, architecture, and the evolution of SOLID principles.


Encapsulation in Functional Programming

Read the full article

In this recent post, Seemann explores how the concept of encapsulation—a staple of object‑oriented programming—is achieved differently in functional programming. Instead of relying on objects with private fields, FP leverages closures and pure functions to hide state. The article argues that by confining data within a function’s scope, functional programming can guarantee immutability and referential transparency while still providing controlled access to behavior. This approach not only aids in reasoning about code but also improves testability and modularity.


Functional Architecture Is Ports and Adapters

Read the full article

In this 2016 post, Seemann demonstrates that a functional approach to system architecture naturally aligns with the Ports and Adapters pattern (also known as Hexagonal Architecture). He explains how the core business logic—written in a pure functional style—can be isolated from external dependencies by exposing well-defined interfaces (ports) and implementing adapters to handle side effects. This separation allows for a testable, maintainable core while still accommodating the real-world demands of interacting with databases, web services, and other infrastructure components.


SOLID – The Next Step Is Functional

Read the full article

In this insightful post from 2014, Seemann challenges the reader to consider that while the SOLID principles have guided object‑oriented design for years, embracing functional programming can be the next evolutionary step. He argues that functional programming’s emphasis on immutability, pure functions, and composability provides natural solutions to many of the complexities SOLID was designed to address. By reducing mutable state and side effects, a functional approach can simplify design, making code more predictable and easier to test—a clear progression beyond traditional OO SOLID principles.


A Quick Overview of Key DDD Tactics

Although Mark Seemann’s articles focus heavily on functional programming and architecture, his work also complements Domain‑Driven Design (DDD). In DDD, you build a model based on the domain’s ubiquitous language and structure your code around tactical building blocks:

  • Entities: Objects defined by their unique identity (e.g., a Customer with a persistent ID).
  • Value Objects: Immutable objects defined solely by their attributes (e.g., a monetary value or an address).
  • Aggregates: Clusters of related entities and value objects managed as a single unit; the aggregate root is the only access point to the aggregate.
  • Repositories: Abstractions for retrieving and persisting aggregates. In DDD, repository interfaces live in the domain layer, while concrete implementations reside in the infrastructure layer. This setup follows the Dependency Inversion Principle (DIP)—ensuring that high-level domain logic depends only on abstractions rather than low-level details.

For further reading on DDD and repositories, check out Martin Fowler’s Repository Pattern and Eric Evans’ book on Domain‑Driven Design.


Conclusion

Mark Seemann’s writings offer a fascinating blend of functional and object‑oriented thinking, urging us to reconsider traditional approaches to encapsulation, architecture, and even the SOLID principles. Whether you’re interested in keeping your domain logic pure or exploring how to apply ports and adapters in a functional setting, his articles and video series provide rich, thought-provoking insights. Bookmark his blog at blog.ploeh.dk and explore his work further—you won’t want to miss a beat from this wonderful author.

Additional Resources

By studying these resources and revisiting Mark Seemann’s insights, you’ll be well equipped to design systems that are clean, maintainable, and resilient—whether you’re working in an OO or functional paradigm.