Welcome to MSDN Blogs Sign in | Join | Help

Is OOP dead?

While listening to DNR the other day, I was inspired by Carl's and Rory's discussion about this article about OOP. It is an interesting take on object orientation in programming, and while I don't agree with most of the opinions presented in it I have to defend the writer to some extent.

The article says: "Still trying to get OOP right after ten years? Something strange is going on here." It is certainly true that OOP has not been the be all answer to general and easy reusability that it promised to be in the early nineties. OOP has failed to be the basis for large scale reusability, mainly because complex class hierarchies quickly form a very tightly coupled and fragile construction that is hard to use and even harder to extend. Another example of where one could say that OO has gone too far is when the object paradigm is extended into distributed scenarios (RMI, DCOM etc). Location transparency (pretending that a method call is local even when it actually means calling a remote method running on the other side of earth) and thight coupleness is not a good thing to base your distributed architecture on. This has been seen on the ongoing urge towards service orientation (SO, SOA) as the base architecture for distributed systems. The basic idea there of course is that services are loosely coupled and calling them is explicit, both of which are part of the four tenets of SO. Taking OO to extremes (like distributed objects) might not be the best thing to do, as is the case of most things in life :)

So, given that the world is moving towards service orientation, what is the role of object orientation? Is it dead? Of course not, OO just isn't the topic that has the most buzz around it anymore. Naturally all of the good things in OO (and there are plenty) are still valid when these new service oriented systems are being built. It means that object orientation probably is the most popular abstraction that is used when the code that implements the services is written. And inside a service it is totally ok to use inheritance and other OO concepts wherever they make sense.

OO is in a similar state currently as COM, as Don Box likes to express it: "COM isn't dead, it's done". It means that COM is not anymore the piece of technology that evolves and is being developed further, instead it has reached a state where it works and continues to be used where it is applicable. Similarly, OO isn't dead, it's done: OO concepts are the dominant way most software is being built today, it just isn't the piece of technology that is in the center of attention.

I do agree with Carl & Rory in that copy/paste is clearly not a viable replacement of OO paradigm as the original article suggests. Also, it is interesting to note that before Java, C++ was by far the most popular OO programming language. At that time it was also considered very unlikely that nothing would replace C++ as the programming language of choice. Along came Java, and the rest is history. Java changed the rules of the game by introducing the concept of managed code and became the dominant OO programming language. A similar change might be lurking behind the corner regarding modeling: UML is considered to be the king of the hill in modeling currently. Along comes software factories and changes the rules: modeling should be based on domain specific languages that raise the level of abstraction significantly and are precise enough to compile. We'll see if it offers big enough improvement in developer productivity to be the future paradigm of choice for modeling. I for one think so, and so do others.

Published Friday, February 11, 2005 3:02 PM by AaliAlikoski
Filed under: ,

Comments

# re: Is OOP dead?

Hmm...

I tend to think that OOP fails not because of the OOP paradigm itself, but because of:

1. Incompetant, undereducated programmers following the lead of:

2. Incompetant, undereducated, self-proclaimed "architects".

3. Impatient, under-educated, results driven mid-level managers with total lack of foresight and a "Get it done yesterday" (i.e. RAD) approach to software development.

4. An educational system that does not produce good understanding of OO. Reading about animals and mammals as an example for the object oriented paradigm oversimplifies the complexity of real world systems. OO, and more importantly OO *Design*, is *hardly* the focus/emphasis of the modern day computer science curriculum.

Don't believe me? Just go find any college intern working in your company and grill them on OO. Ask the simple and straighforward question: "What is OO?" and watch them get befuddled and search for textbook definitions. Knowing the definition of OO is different from understanding how to *use* OO and how to design large systems with OO principles in mind. They don't teach this stuff in schools. Never have, never will.

Now certainly, there are those that truly do grasp the entirety of OO principles and design and there are a few who can design and implement highly orthogonal systems using OO, but those individuals are few and far between. And it's quite simple really:

"There is not one naturally straight arrow or naturally round piece of wood in a hundred generations, and yet in every generation people ride carriages and shoot birds. Why? Because of the application of the methods of straightening and bending." -- Han Fei Tzu

Our processes of "straightening and bending", our educational system (either collegiate or private training) is failing because of the simplicity of the cases it concerns itself with. Do you really think that guys who've been writing VB6 and ASP scripts for the last 4 years can be trained in the ways of OO and .Net in a 5 day course? in a 2 week course? in a 4 week course? Hell no. But such is the expectation of mid-level managers when they hire these "gurus" to train their existing programmers and "architects". The problem is not OO, but rather that large systems are naturally difficult to design correctly and 99.9% of the time, proper design and implementation is shunned for RAD and "right now" results which help the code monkeys keep their jobs.

Microsoft doesn't help any of this (yet) by oversimplifying the process of writing software (vs. just writing code). Drag-and-drop design? VB? VBScript? Microsoft has been practically pushing for productivity over good design with the tools that they've been releasing. I could probably teach my wife to create a "web application" in one weekend, but it sure as hell doesn't mean she understands good design and good OO principles.

In regards to SO vs. OO, these two are entirely different animals. SO is a higher level abstraction of an OO _system_. SO is more of a communication paradigm rather than a design or implementation paradigm. Whatever SOA you design still depends on objects pumping away at the different service endpoints spitting out results. Objects still get passed around from node do node, except they're serialized.
Friday, February 11, 2005 4:18 PM by Charles Chen

# re: Is OOP dead?

You are absolutely right about the fact that knowing the tools you use is a prerequisite to successful projects. As I say there earlier, OO is definitely a good choice for implementing services because of the many benefits that it provides.
One additional thing causing projects to fail is of course the commercial pressure that comes from competing with other bidders often ending in making a contract with the one offering the job done for the lowest price. It results naturally very easily in situation where the one with the least chance gets to do the project :(
Friday, February 11, 2005 5:24 PM by Aali

# re: Is OOP dead?

"It results naturally very easily in situation where the one with the least chance gets to do the project"

Very true. And the thing is, to do it the "right way" (the "Righteous Way"?) requires much more upfront time, money, and effort than most people are willing to allow/invest.

I've been consulting since I graduated college and I see the same things over and over and I get asked the same questions over and over: "How soon do you think you can have this wrapped up?" Most shops are not concerned whether the underlying implementation is elegant or not. I mean, from a management point of view, if you're not selling a class library as your primary product, why would you even care whether your contractors have a pristine, flexible, highly extensible object model? You'd most certainly be more concerned with whether they can get it done in 9 months, 15% under budget over whether 18 months from now, you're gonna have a hell of a time trying to add upgrades and modifications to the model.

Good minds are rare. The architects that can design these large systems are few and far between and the thing is, even if a company has a brilliant software architect, he/she may be swamped with with same line, over and over: "How soon do you think you can have this wrapped up?" And, most likely, the implementation is left to lesser developers who end up making implementation decisions but may or may not understand the entire picture or the proper way to add to the model.

I worked at Factiva where my team leader and self proclaimed "Architect" was ill-informed in the ways of OOP/D. Meanwhile, we had a brilliant guy on our team who had purchased "Design Patterns" (by Gamma, Helm, et al) for the entire development team, who had read and consumed Fowler's "Patterns of EA", who had also purchased Fowler's "Distilled UML". His ideas were frequently better than our so called "Architect" and yet his ideas were frequently shot down due to seniority. The guy had *no concept* whatsoever of what an object oriented system was.

*sigh*
Friday, February 11, 2005 6:18 PM by Charles Chen

# can i learn OOD without any procedural 1st - Page 8 | keyongtech

# Aali s blog Is OOP dead | Wood TV Stand

Sunday, May 31, 2009 5:56 PM by Aali s blog Is OOP dead | Wood TV Stand

# Aali s blog Is OOP dead | bird baths

Friday, June 19, 2009 5:42 AM by Aali s blog Is OOP dead | bird baths
New Comments to this post are disabled
 
Page view tracker