MOF, UML, and XML

Don Box's Spoutlet

Syndication

Stefan Tilkov has a great post in reaction to my question of MOF vs. UML in which I asked the following:
 
…why the UML camp puts so much emphasis on UML relative to MOF and XMI, which I've always found much more compelling.
Between Stefan's blog post and a late night email exchange, Stefan helped me see a few things far more clearly.
 
  1. Having a common basis for defining arbitrary languages/vocabularies is good architectural hygiene, as it (potentially) allows multiple DSLs to benefit from a common tooling (and storage and query and…) platform.  This part I already figured out ages ago, and is why I didn't get the lack of energy behind MOF.
  2. Having a common basis for defining arbitrary languages/vocabularies does not excuse you from producing DSL-specific editors or other tooling. 
 
What's interesting is that I already groked #2 vividly, but not from the MOF/UML angle.
 
I was a big early supporter of our new XML editor in VS.  The XML team has been doing some great work building a general purpose XML-aware text editor that does validation, intellisense, snippets, schema inferencing, the works.
 
I can use that editor to edit any XML dialect and if I have an XSD or DTD for that dialect, I get an amazingly good textual experience.
 
But what if I want to edit a lot of XHTML? Or better yet, WordML?
 
To edit XHTML, I typically use InfoPath (in fact, I'm using it right now), as I get familiar formatting commands and a WYSIWYG editing experience.
 
To edit WordML, I use winword.exe.
 
Could I use the new VS XML Editor to edit XHTML and WordML?    Absolutely.
 
Would I want to?   Absolutely not.
 
I pick the DSL-specific editor every time.
 
So why is it important then for WordML and XHTML to be XML based?
 
Not because I can edit in a general purpose XML (or even raw text) editor, although that's a nice benefit (especially when you want your Group VP to edit some XAML in VI).
 
Rather, it's important because I can use a common toolset to parse, manipulate, query, transform, store, and transmit XHTML and WordML without getting too bogged down in mundane format details.
 
I've had these intuitions about the role of XML for a very long time now.
 
Thanks to Stefan, I now see how these intuitions apply in the DSL/modeling world.
 
And thanks to Steve Cook who (post facto) sent me this nice paper that had already come to similar conclusions. I'll admit it was more fun having Stefan drag me to the well…

Posted Jan 06 2005, 03:53 AM by don-box

Comments

The 19th Hole wrote Don Box on Domain Specific Languages and Tools
on 01-06-2005 11:08 AM
Stefan Tilkov's Random Stuff wrote MOF <--> XML, UML <--> XHTML
on 01-07-2005 2:26 AM
Don Box has written a response posting after our discussion about DSLs and UML. A point I only noticed during that discussion was that there is in fact a very nice analogy with MOF/UML and XML/XHTML — with a lot of arguments that could easily be interchanged between the two domains: If I build my own MOF meta-model (or DSL,...
Kalani wrote re: MOF, UML, and XML
on 01-07-2005 7:37 AM
That's right -- XML can represent anything in the same way that byte sequences can represent anything. But obviously you wouldn't use a hex editor to edit Word documents either.

This is why I made my little general context-free grammar based editor (and a basic system for translating these CFG parse results to a common format -- S-expressions now, but those can also be transformed to XML when I have to deal with the rest of the world).
Jason Gorman wrote re: MOF, UML, and XML
on 01-09-2005 5:07 AM
I wonder if in 10 years time anybody outside of Microsoft or the MDA community will care which meta-meta-(meta-)language their models are built using - just as long as it works. In fact, I wonder if anybody outside of Microsoft or the MDA community cares now. The wranglings over UML 2.0 and MDA went on far too long and ultimately it's still not a reality. That's why more and more of us are starting to roll our eyes and grind our teeth whenever we hear about MDA. If the UML community had gotten their heads together and produced an MDA tool that worked during the 8 years they've been arguing about the standard then maybe there'd be no need for DSLs. There's also the fact that many of us (well, at the moment the vast majority of us) aren't using UML to generate code or even to describe software systems. UML is most valuable as a tool for visualisation - whether we're visualising software, business processes or even Domain-Specific Languages (as I understand some of the team creating the tools do). There's every chance that it will remain a whiteboard-based modeling language and that new "programming with pictures" tools will emerge and pass it by. That would be fine by me. I'll probably flesh out my domain models on whiteboards using UML, then incrementally translate those into a DSL :-)

One question remains for me, though - which applies to both technologies. What happens to our existing DSL-generated systems if our understanding of the domain changes? It sounds like that could have a major impact.
phentermine online wrote re: MOF, UML, and XML
on 02-07-2005 11:21 AM
phentermine online
Juha-Pekka Tolvanen wrote re: MOF, UML, and XML
on 03-18-2005 11:18 AM
Jason Gorman made an excellent question: "What happens to our existing DSL-generated systems if our understanding of the domain changes?".

This question is relevant in practice and goes beyond the usual discussion on getting the first DSL editor running. The answer is that the metamodeling tool must provide support for language (and generator) evolution and capability to update the existing models based on the language changes, if required. This capability is to some extent already supported by the most advanced metamodeling tools. There is also ongoing research in the subject, like in the workshops on Domain-Specific Modeling, see http://www.dsmforum.org/events/DSM04/DSM04.html
phentermine wrote re: MOF, UML, and XML
on 11-06-2005 8:55 AM
What's interesting is that I already groked #2 vividly, but not from the MOF/UML angle.I was a big early supporter of our new XML editor in VS. The XML team has been doing some great work building a general purpose XML-aware text editor that does validation, intellisense, snippets, schema inferencing, the works.I can use that editor to edit any XML dialect and if I have an XSD or DTD for that dialect, I get an amazingly good textual experience.But what if I want to edit a lot of XHTML Or better yet, WordMLTo edit XHTML, I typically use InfoPath (in fact, I'm using it right now), as I get familiar formatting commands and a WYSIWYG editing experience.To edit WordML, I use winword.exe.Could I use the new VS XML Editor to edit XHTML and WordML Absolutely.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?