9

I really love the idea of domain driven design, however, as I'm learning Go, I'm wondering if there's the equivalent of DDD that's aimed at an effectively more functional language?

12

There's no equivalent. DDD needed a paradigm to support frequent rewriting in an evolutionary software development scenario. OOP looked like the only viable strategy back then. But Functional languages can serve such a scenario as well.

You might want to have a look to Greg Young's video about DDD and Functional Programming and Patrik Fredriksson's video about implementing DDD with a functional language like Clojure

2

I believe DDD is not about OOP design itself, but more about how you approach the whole development process. Iterative development, ubiquitous language, close cooperation of business experts and developers are all language and paradigm agnostic.

Design of objects in DDD is not something new. The patterns that are described in DDD existed long before DDD saw light of the world. Agregate roots, strategy pattern, value objects were only good fit for describing the business logic. So your question should be more like "How to express business logic and persists it's state in functional language". You are probably looking in design patterns for functional programming languages.

  • What you've described is the first part of DDD, but the second part is the actual construction of domain models. The second part is the one I'm interested in. I'm not exactly sure how I'd model a domain in a functional language (albeit one that has interfaces). – Matty Jun 28 '12 at 6:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.