Federico Cargnelutti has been posting a series of articles to his blog recently about domain-driven design, a method for organizing your code for maximum reuse between domains. He focuses on the "M" (model) in the MVC structure (model/view/controller) and how it can be separated out into a layer all its own - the domain layer. Here's the parts of his series so far:
- Domain-Driven Design and MVC Architectures - an introduction to the domain-driven concept and some definition of terms that he'll be using.
- Domain-Driven Design: Data Access Strategies - a look at some of the different data access methods (like Active Record, Data Transfer Objects and generic Data Access Objects)
- Domain-Driven Design: The Repository - illustrating how the user-created code would interface with a DAO instead of directly working with the database itself. It provides another abstraction layer that is more specific to your current application instance.