04/20/09 :: [MOP] M is the new O [permalink]

M is the new O. OOP no longer exists in case you have not noticed, what everybody is doing is MOPing around without guidance or lights.

You want a proof? Look no further than Kris Horrocks's post. Kris gives a classical view of Model Driven Engineering, he paints the "picture" of HTML:

 

Yes, this is exactly how Model Driven Engineering has been hashed for nearly two decades. I have a simple question for Kris: Where does JavaScript fits? Yes, even the AJAX guys are MOPing. HTML without JavaScript has little value. Anemic DSLs have little value. Do you really think that the Web will be where it is today without JavaScript, i.e. with an anemic HTML? I mean that in a RESTless way. The Web is what it is because of MOP not because of REST. Lots of people have been MOPing with "code behind" or with "annotations" for quite some time. How long will we have to go before we leave the "O" behind? I say that respectfully, OOP has opened avenues for Software Engineering that were unimaginable 30 years ago, but Object Orientation has reached its limits.

If you want to understand the source of all software engineering aches and pain, look no further than this figure in the MOF specification, which states that everything MUST-BE-A class:

You are probably wondering if Eclipse's ecore can do better? No ! Vladimir Bacvanski and Petter Graff make it very clear in this ecore tutorial:

ecore allows you to define structural models

These models are often found in organizations as:

• UML class diagrams

• XML Schema Definitions

• Entity Relationship Diagrams

Why one more essential modeling structure?

• Ecore is focusing only on the essential information

• EMF provides tools that support

- Code generation

- Import/export to/from various other forms

-- It has IBM support

Kris, this is precisely the problem, everything HAS-BEEN a class in "classical" MDE. For decades now, MDE has been trapped in the Caudine Forks of OOP. For decades, we have trained millions of developers to ignore the subject over the object: an Object-based M3 layer enforces (anemic) "essentialism" over (vibrant) "existentialism".

So when Kris quotes Ben Gillis who expresses that:

Many applications are so large and complex even the most knowledgeable working on them can’t answer the above questions beyond generalities.  And, general answers aren’t good enough for a lot of development and support scenarios.

You guessed it, the question is how can OOP survive architecture? No, not everything IS-A class and HAS-SOME operations. This view has hurt us so much in the last decade, in the wake of the rise of architecture. How can EMOF (Essential MOF) map to the HTML modeling structure? where does JavaScript fits?

We are in dire need of going from MOF to MAF (Meta-Architecture-Framework), we are in dire need of creating a modeling framework that enables us to deliver architecture friendly programming models without the stone age techniques of code behind and annotations.

Kris concludes:

Today, application (meta)data is strewn across a wild west of distant, isolated towns with fractured infrastructure, poor communication, and little to no law and order. This is true both on the Microsoft platform and across the industry at large. It's time for something better.

Yes, it is indeed time for something better, but O-based approaches will not drag us out of the current vortex. This is not just a "metadata" problem, it is about enabling M as the new O.