Skip to main content

XMI and UML combine to drive product development

Ideogramic suite demonstrates UML-oriented XML processing

Cameron Laird, Vice president, Phaseit Inc.
Author photo: Cameron Laird
Cameron Laird is a full-time developer for independent consultancy Phaseit Inc. He writes frequently on XML and other technical subjects. You can contact Cameron at Cameron@Lairds.com.

Summary:  Countless organizations rely on UML (Unified Modeling Language) in the software development process. But software to manage UML itself has a well-earned reputation for being inflexible and difficult. This article describes how the Danish development house Ideogramic ApS extended XMI (an XML specification targeted at such metadata as UML), and explores both the benefits and limitations of "XMLization."

Date:  01 Oct 2001
Level:  Introductory
Activity:  2400 views

UML (Unified Modeling Language) is a software modeling notation. That's generally taken to mean that UML practitioners don't start a software development project by writing computer programs. Instead, they talk, write notes on index cards, draw pictures, perform tiny technical dramas, criticize diagrams, and undertake other abstractions designed to lead to greater efficiency when it comes time to code. Typical UML "work products" include class profiles captured on stacks of physical note cards, diagrams like the one shown in Figure 1, and narratives called use cases that describe how users are expected to interact with the deliverable software product.

Briefly put, UML aims to be ergonomic engineering. Its success is founded on the fact that humans are particularly efficient at expressing useful ideas and understanding when we write on whiteboards or thrash out ideas in small groups.

These methods have proven to be well matched with human expressive patterns, but they do not lend themselves to the process of computerization. While it's possible to capture a whiteboard drawing digitally, it's generally an expensive operation, and the resulting datum is clumsy to transmit, version, archive, validate, and transform. The computing infrastructure is far better prepared to manage data in the form of source code, or the HTML that underlies this Web page.

XML bridges part of that gap, by providing the building blocks for "serializing" UML data textually. XML Metadata Interchange (XMI) is an open industry standard that applies XML to abstract systems such as UML. Its method is to capture and express the relationships UML expresses, while discarding most of the visual details of a particular UML diagram. This partitioning into essential content and dispensable form enhances UML's manageability.

This article studies the impact of XMI on a small development house, Ideogramic ApS. In particular, it looks at how the XML standard, and the growing sophistication of tools to integrate that standard with others on the market, has enabled one organization to focus on its own product development.

Ideogramic ApS

Ideogramic ApS is a development house that specializes in gestural digitization and collaboration. Ideogramic has elaborated a body of academic knowledge into products that provide, as the company Web site puts it: "intuitive tool support for programming, especially in combination with pen-based interfaces such as electronic whiteboards and tablet computers."

A designer can work with any number of common input devices -- leading electronic whiteboards, trackballs, and so on -- and Ideogramic's proprietary Gesture Recognition algorithms convert the sketches into UML diagrams. The results are captured and rendered into XMI, then fit to be imported into a visual modeling tool such as Rational Rose, from Rational Software Corporation.

This process is worth examining because up until a few years ago it would have been untenable. Interoperability of products from different vendors was so poor that anyone with a good UML idea had to bring it to market with a comprehensive toolset. Although XMI standardization remains only partial, it's now good enough to allow Ideogramic to focus on what it does best: trusting third-party tools to process the results.

A working example

To better understand how Ideogramic's Gesture Recognition works, we'll employ an example that contains a single class, Small. Figure 1 shows the slightly jagged designer sketch after Gesture Recognition has cleaned it up a bit.


Figure 1. UML sketch rendered by Gesture Recognition
UML sketch rendered by  Gesture Recognition

The Ideogramic product, of course, has plenty of tools and selections to elaborate such diagrams graphically. What's interesting for us, though, is that its default serialization is in XMI. The product in effect saves Figure 1 into the document instance shown in Listing 1.

XMI defines a "plug" that allows Ideogramic and other products, such as Rational Rose or another UML diagrammer, to snap together. This liberates Ideogramic to concentrate on refining the unique value of its Gesture Recognition tool. It can do so with confidence that, for example, an organization committed to Rational Rose will be able to combine the visual modeling tool with its Ideogramic UML technology, relying on XMI to transfer information back and forth between the two. In addition to single iterations, round trips are possible so that even reverse-engineered Rational diagrams can flow back to Ideogramic and serve as the basis for further collaboration and refinement.


Implementation realities

That's the intent, at least. Realization of the dream remains imperfect. As Ideogramic Product Manager Klaus Marius Hansen explains, as of fall 2001, "the XMI standard itself doesn't support all that is needed, and vendors unfortunately implement it differently."

Ideogramic's solution is to use as much of XMI as is practical and define extensions for what is otherwise not captured. Maintaining version consistency is a challenge, as UML, XMI, and other marketplace products all continue to change, but Gesture Recognition is a powerful technology, and well worth the effort. In Hansen's words, "All this [creates] a lot of work for us in terms of testing with different tools, making alternative implementations, etcetera, but it's worth the trouble."

The sections that follow look closely at the steps taken by Ideogramic engineers to extend and leverage XMI while maintaining optimal flexibility in their product implementation.


Functional extensions to XMI

XMI currently addresses only pure UML model information. In practice, however, users also want to preserve diagrammatic layout. An example of this work is the <Diagramming.Diagram ...> tag that appears in Listing 1. This tag is a Rational Rose-specific extension to standard XMI which provides presentational information about the diagram. This and associated tags communicate size, position, color, and other information undefined in UML, but essential to the Rational tools built with UML as a base. Ideogramic's format for these extensions is the one used first by the Unisys XMI plug-in.

Ideogramic further extends XMI by encoding diagrams that are partial, and thus invalid, UML. It can be quite valuable during preliminary work to "stub" a relationship with a class defined for only one end. Ideogramic also allows freehand drawings on diagrams.

In some sense, XMI's architectural standardization functions to "Rationalize" Ideogramic's UML implementation. While this article discusses XMI almost exclusively as a sort of UML serialization, XMI's definition is actually much broader. Strictly speaking, XMI functions to serialize mappings from Object Management Group (OMG) Meta Object Facility (MOF) models to a variety of loaders, savers, and schemas. UML is simply the most popular MOF model.

Because it targets XMI, Gesture Recognition is only weakly coupled to the details of UML. Rather than being tied to a specific methodology in the software-engineering sense, Hansen says that, "We don't aim to support any specific prescribed process. But we try to provide flexible tools that can be used in such processes, be they Business Object Notation (BON), Extreme Programming, or the Rational Unified Process." In fact, Ideogramic is already developing a gesture-based modeling tool that targets a proprietary notation developed by e-GIP Software AG. This notation, in turn, is related to the graphical form of Issue-Based Information System (gIBIS), developed by Jeffrey Conklin.


Reading and writing XMI

The engine that powers all of these capabilities for Ideogramic is tDOM, a high-performance XML processor. Unlike most XML products, tDOM supports Tcl rather than Java. Ideogramic codes its UML metamodel in [incr Tcl]. In this object-oriented extension of standard Tcl, a segment of the XMI loading code looks like the one shown in Listing 2.

This is typical of the highly regular load and save code Ideogramic implements. Hansen relates, "We have even created scripts that may be used to generate an initial shot at load and save code based on UML models reverse engineered from [incr Tcl] code." For each class of the UML metamodel, there is a method to load that specific element and call other methods that correspond to the structure of the metamodel. So, for example, class Class inherits from class Classifier. Class Classifier, in turn, inherits from Namespace and GeneralizableElement and aggregates Attributes and Operations.

The class structure for the source code thus imitates the UML metamodel closely. In Hansen's words, "Attributes are mapped to simple attributes, associations and aggregations are mapped to simple references between [incr Tcl] objects, and there're a few specifics to, for example, handle the fact that [incr Tcl] cannot handle multiple inheritance with overlapping base classes."

One consequence of this is that the only work left for the DOM::scanChildren method is quite simple. It uses tDOM to make a structured switch on the contents of the XMI elements, as the example code in Listing 2 illustrates.


Summary

XMI is a working example of the benefits of XML standardization. With XML as a base technology, organizations are encouraged to focus attention on their own unique products, trusting that an XML "bus" will enable them to connect to processes and data in other organizations.

In this article, I've shown how Ideogramic ApS exploits XMI to connect its Gesture Recognition product to Rational Software's range of UML products, thus enriching the use of both product sets for the developer community. I've also shown how Ideogramic has extended XMI to suit its particular objectives. In some cases, this extension has proven fairly simple and effective, in others it's both complex and partial. In either case, it seems clear that the effort has paid off for one small, highly innovative startup.

Although both UML and XMI remain a bit incomplete, each is sufficiently mature to support successful commercial products, including Ideogramic's Gesture Recognition. And, as I believe this case study shows, the resulting implementation is much like any other XML engine and specific DTD-based application.


Resources

XML and XMIUMLIdeogramic ApSAdditional related links

About the author

Author photo: Cameron Laird

Cameron Laird is a full-time developer for independent consultancy Phaseit Inc. He writes frequently on XML and other technical subjects. You can contact Cameron at Cameron@Lairds.com.

Comments (Undergoing maintenance)



Trademarks  |  My developerWorks terms and conditions

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=XML
ArticleID=12047
ArticleTitle=XMI and UML combine to drive product development
publish-date=10012001
author1-email=Cameron@Lairds.com
author1-email-cc=

My developerWorks community

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Rate a product. Write a review.

Special offers