Architectural principles we will follow

Building an extensible, testable, and maintainable data access layer is a topic very close to my heart. I cannot claim to be an expert on the topic but I have had a fair amount of success with implementing clean data access layer code using NHibernate on different projects. What has helped me get better over time is few architectural or design principles that I have discovered during this journey. I would like to introduce these principles to you briefly as I am going to base most conversations in this chapter and next on these principles. At first, some of the principles sound unnecessarily complex but my experience with these is that in the long run these are always beneficial.

No anaemic domain model

Get Learning NHibernate 4 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.