Object-oriented design is well known since 20 years. Domain specific languages and domain driven design have become popular with dynamic languages such as Ruby or Python. If your domain consists mainly of objects, for example a subystem to grant badges or achievements (like the badges on Stackoverflow), then one could use both, object-oriented design and domain driven design, since a badge is certainly an object. For example for Ruby, there are two gems to implement this functionality, Badgeable and Paths of Glory. Badgeable uses a DSL, Paths of Glory is based on an object-oriented design. In which cases is it better to use modeling by object-oriented analysis & design, and for what cases is it preferable to use modeling by a domain specific language (i.e. domain driven design)?
- Domain-specific languages (and language-oriented programming) is a much wider thing than just a DDD. And it is much more powerful and flexible than OOP (which is just one of the possible domain models). So, it makes sense to always use a DSL-based approach. When objects are useful (it is quite a rare case in practice) your domain analysis will choose them as an underlying representation.SK-logic– SK-logic2012-10-26 12:24:29 +00:00Commented Oct 26, 2012 at 12:24
Add a comment |
1 Answer
OOD and DDD are not interchangable things.
A DDD will very often involve using OOD.
From the Wikipedia page:
Domain-driven design is not a technology or a methodology. DDD provides a structure of practices and terminology for making design decisions that focus and accelerate software projects dealing with complicated domains.
In particular, read the Relationship to other ideas part.
1 Comment
0x4a6f4672
Well, you may be right, but from a pragmatic point of view, do you better start with objects or with a DSL if you can use both? Is there any rule of thumb which helps the humble programmer to make the right decision (say for example if it is the connections between objects that matter most then it is useful to use a DSL, as for example in routing)