Generic Domain Modeling

Apr 13, 2011 at 2:30 AM

To me, the Silk project shows a really good example of middle-tier design. I really like the clarity of your layering from database to services.

I have coincidentally been working on Domain-Driver, a domain modeling framework, that touches on similar subjects, but focuses much more on building cohesive, decoupled domain models. I provide alot of generic code that orchestrates the persistence of domain objects and allows users to build models faster. Specifically, my example model articulates how to 1) use generic repositories and storage strategies, and 2) decouple storage from domain logic (I implemented both database and file-based persistence), and 3) use flexible, linq-based query objects with the generic repositories.

To be able to run domain models independent of the database, I implemented a facility for specifying cross-repository constraints in-memory. These constraints can be disabled for database implementations if desired to improve performance.

I also implemented alot of generic unit tests so that developers can easily build comprehensive tests.

I encourage anyone interested in more comprehensive domain modeling support to visit my project and check it out...