Summer of NHibernate Session 08: Techniques for Effective Database-Driven Modeling is now available

The latest installment of the Summer of NHibernate screencast series is now available for download.

I will warn potential viewers in advance that this session is heavily focused on techniques and approaches that tend to contradict most Domain-Driven-Design/Development practices so please don’t waste your time telling me this — I know it already smile_thinking.  Leveraging NHibernate to better support DDD principles is coming in the next session, I promise.

Instead, this session focuses on techniques, approaches, concerns, and implementation practices that support effectively leveraging NHibernate in situations where (for all kinds of really good requirements reasons) your database schema design occupies a position of primacy in the hierarchy of your design constraints.

In this session we dig into the use of the MyGeneration OSS code-generation toolset and understand how we can use it to completely slave our Data Transfer Objects and their related .hbm.xml mapping files to the design of our database schema, entirely freeing us from having to manually code and maintain these solution artifacts during our development process.

We also investigate techniques to avoid the inclusion of ‘string-literal’ values in our CriteriaAPI and HQL queries so that we can get complete compile-time type-checking on all of the statements in our NHibernateDataProvider class if/when things change in other layers of our application (e.g., the database schema), making reacting to change and catching errors all the more simpler for us.

There isn’t a whole lot of new NHIbernate-centric content in this screencast as its more about how to use tools and techniques to drive NHibernate in certain kinds of application design situations, but hopefully people will still find it to be of value.

As usual, comments and feedback (and criticism!) are greatly appreciated.