Programmers spend a lot of time arguing about which mental model is best. I think this question is unanswerable in the general case, but I want to propose a new way of thinking about it: the object model tax. The object model tax is the drag that an object model introduces to some other layer of your architecture. This drag can take the form of:
The object model tax is very annoying because it bites you again and again. If there is something about your object model that causes problems, these problem may occur again and again in different tiers of your enterprise application. Also, the object model tax, when it is noticed at all, is usually seen as a defect of the higher layer where it manifests. (For example, programmers report a problem with an MVC framework that stems from an underlying language issue.)
To make this specific, I spent an hour this morning reading through the FAQs for two technologies we use at Relevance: the Hibernate FAQ (several pages linked from here) and the Rails FAQ. I was looking for evidence of the "object model tax" -- Hibernate problems that were really Java problems, and Rails problems that were really Ruby problems. Here's what I found:
(I am not going to post the breakdown, at least yet, because doing it is a good exercise, and you might come up with different numbers.)
What does this mean? I am not sure. There are lots of other factors to consider:
Is anybody aware of any more detailed analysis along these lines?