Unlearning Object-Oriented Theory

Back in the programming nursery, life seemed simple. An object was introduced to us as a data structure that you could give instructions to, using things called methods. We were taught all about inheritance, encapsulation and polymorphism, and a great future beckoned. All we had to do was use objects all the time and our software would be better structured, more maintainable and, joy of joys, reusable! So, every time we saw something that looked like a data structure, we dutifully wrapped it up inside an object, and waited to reap the rich rewards that would in time accrue to us.

Since then, one or two curious things have happened.

Does this mean, then, that we should pack non-visual objects in altogether? Obviously not, because, for one thing, that would undermine most of the rationale for this book. Besides, objects (and COM objects in particular) turn out to be excellent vehicles for representing business processes, and, in particular, transactions. However, if we are to develop really useful business objects, we’re going to have to separate the business logic from the underlying data.

I think it’s time to introduce the three-tier model. (I’m still itching to do some MTS coding, by the way. It’s just that there’s a lot of stuff we need to get out of the way before we get going…)

© 1998 by Wrox Press. All rights reserved.