Thursday, July 10, 2008
Domain Driven Design
byIt has been about four years since Eric Evans published the first Domain Driven Design book, and the software engineering community is slowly but surely embracing the ideas behind it. Which shouldn’t be surprising, since the ideas behind Domain Driven Design (DDD) had actually been used in good software design for years before Evans coined the term.
Domain Driven Development (DDD) is an approach to designing software that sets the primary focus on the domain and domain logic (hence the incredibly creative name). Design your domain (or business) layer first, and then design the services and supporting classes around it. As it turns out, this design approach has been around longer than the book, although Evans does a very good job of describing the high level concepts and practices that make it successful. Some of the concepts incorporated into DDD are:
- Multilayer Architecture - A separate domain and service layer is essential to DDD.
- Tried and True Design Patterns - DDD encourages the use of many proven design patterns, such as Entities (Reference Objects), Value Objects, Data Access Objects, Factories, and Service Objects.
- Aspect-oriented programming (AOP) - AOP makes it easy to factor out technical concerns (such as security, transaction management, logging) from a domain model, thereby making it easier to design and implement domain models that focus purely on the business logic.