Jim Weirich, Joe O'Brien, and Chris Nelson acted out a dialog where they built an application to reserve conference rooms. Very entertaining and novel approach for a tech conference! I loved it. But, to the point now - the summary...
Their are at least two philosophies to fleshing out the model: Traditional object-based modeling and behavior-based modeling. How are these different?
Object-based data modeling starts with nouns (table names, class names), their sub-properties, and relationships with other nouns. Behavior-based, asks first what the user's goal is, defines a set of verb-based expressions (methods), and is then followed by the supporting nouns and their relationships derived. Both have advantages and disadvantages.
Object-based modeling can be brittle when new behaviors are needed. Behavior-based modeling can lead to object/relational impedance mismatches that are hard to resolve.
Conclusion
The right answer is... hold on...
"Think."
Of course. Just "think," he says. In other words, there's no right answer.
I hate hearing that, even though I know it's true. So, I pressed Jim later and got this much from him (paraphrased):
Behavior-based modeling is a good fit for application-level data modeling. Behaviors and their supporting nouns tend to be consistent within an application, regardless of varying ways the data may be persisted. For system or cross-application data modeling, a more abstract, noun-first (object-based) approach may be better. This way, the data structure doesn't have to change from application to application.
Comments