Iâ€™m a big advocate of domain driven design. One of the â€˜gurusâ€™ in the community, Udi Dahan (NServiceBus creator, etcâ€¦) has written an article for the latest version of MSDN magazine titled â€˜Employing the Domain Model Patternâ€™
- Domain model pattern
- Scenarios for using the domain model pattern
- Domain events
- Keeping the business in the domain
While Iâ€™m here, Iâ€™d like to make a plug for NCommon â€“ which is a framework that helps fulfill the DDD pattern (including recent addition of domain events). NCommon currently supports NHibernate, Linq to Sql, and the Entity Framework. The trunk already has parts of EF 4.0 being setup as well.
This article builds off the concepts here:
â€˜Domain Events â€“ Salvationâ€™ by Udi
For usage in NCommon see â€˜Domain Events pattern in NCommon
This is a very powerful way of keeping with the SRP. One technique I hope to deploy is the ability to separate out service to service calls.
ie. EmailService handles emailing. I donâ€™t want to inject an â€˜EmailServiceâ€™ into my â€˜OrdersServiceâ€™
When the SendEmail event is fired, it can be handled by a handler that has an EmailService injected into it instead.
I might as well also mention an article in the same issue â€˜N-Tier Application Patternsâ€™ â€“ although it should be titled â€˜Entity Framework with WCFâ€™
This article discusses:
- N-tier design patterns
- Entity Framework
- Microsoft .NET Framework 4
This article uses the following technologies:
Entity Framework, Windows Communication Foundation
Included in this monthâ€™s MSDN is â€˜Entity Framework v2 and Data Access Architecture Best Practicesâ€™