Domain driven content management?
I'm 开发者_如何转开发wondering - what i should keep in mind when trying to apply domain driven design on CMS app that has quite complex business logic? Aren't those beasts mutually exclusive?
Here's article to show what i mean.
It's all about decoupling shit properly.
Usage of CMS when building application by following DDD ideas ain't mutually exclusive.
CMS is just another technology, another way to express solution of our problem that does not differ much from another technologies like Asp.Net Mvc, Ruby on Rails, programming languages and even completely abstract stuff like design patterns.
what i should keep in mind...
DDD was designed to handle complex logic so start reading:
Best practices, Best practices and Best practices
This is a Great article about (do not forget, to look at DDD resources topic ; )
And this Listing will bring some code to the table (it's C#).
Aren't those beasts mutually exclusive?
Not at all. in fact there is a hard relationship between DDD and complex domain logic. lots of the patterns you ended up using, when working with DDD, were conceived looking for a simple way to encapsulate complex logic needed when working with the domain. e.g. Repository, Factory, Aggregate, etc.
I know what you mean. after reading the article you refer, you discover that a CMS could easily be though as a project with two different domains -content and representation-. and it's a good approach, in fact I like it. But DDD patterns still applying -and are designed- to work with them : ).
I'm supposing your are talking about to use DDD to develop a complex CMS.
UPDATE: I'm not supposing your are talking about to use DDD to develop a complex CMS anymore. hahahaha
I just can't imagine how to untie business logic from infrastructure... yet.
Hi again Arnis!
Yes! CMS stands at top of aaaaaaall kind of systems. nice point. so what can we do to make a flexible and decoupled CMS, that could be easily integrated over the shoulders of other systems?
About the data:
-Data contracts, regardless the system you are integrating your CMS with. your CMS domain model should stay almost unmodified. limit your efforts to adapt other system data sources to your CMS model. ; ) useful links:
- Data contracts
- Adapter pattern
About the business rules:
-Ad-Hoc Business rules, but different systems, have different business rules. and your CMS require certain grade of flexibility in this aspect. useful links:
- Web application filters
- Business rules engines
Hope this bring you some helpful ideas for your project ; )
The Guardian did a talk on their experience applying DDD which may have some relevance as a case-study in a content-rich domain:
精彩评论