Monday, February 23, 2009

Stop Relational Thinking

In my opinion the only reason why relational thinking should be kept in the contemporary curriculum is because of historical purpose and the constraint imposed by contemporary corporate data centers running relational databases. Come on people, there's a much better way to do things. Why are we constrained by this outdated, inferior and inadequate mode of thinking?

Developers should never have to think relationally except when they need to interact with those ignorant of object-oriented thinking. The object model is vastly more powerful than the relational model and when developers are thinking relationally, they are creating the wrong environment. Developers should always be thinking of the domain-object model which includes behavior along with data. The data model is a subset of the domain-object model and is easy to generate when needed. The data model is considered for those on the relational side of the operation and have limited understanding (MIS types).

Yes, I understand about the object-relational impedance mismatch. All developers need to understand this important constraint when interfacing the OO world to the relational world. In the meantime, the language of the developer should be in the context of the domain-object model. If the organization isn't using an ORM tool (ie., Hibernate), then the least acceptable architecture would include a persistence layer so separation of concerns is maintained. SQL should never appear in your POJOs.

No comments:

Post a Comment