|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV |
TODAY'S TOP SOA & WEBSERVICES LINKS Tools Introducing XML or Non-XML Based Creative Modeler In Microsoft .NET
A general-purpose diagramming and data translation tool automation API is based on .NET and XML/XSL
By: Patrick Gannon
Jan. 8, 2006 04:45 PM
Creative Modeler is a full-featured diagramming environment that can be extended to create any type of diagram. It includes a data translation engine that facilitates the editing and conversion of data in any structured file format into any other structured file format (XML or non-XML). The automation API is based on .NET and XML/XSL. This article will discuss how Creative Modeler can be used to edit arbitrary data in a visual format.
Once converted to the appropriate XML format, the data can be visually edited in the diagramming environment. After editing the data in one or more diagrams, the user can generate the source data with the changes. This functionality utilizes a user-provided XSL file. Additionally, a command-line tool and .NET automation class are provided to allow transformations to occur outside of the diagramming environment.
Case Study: Web Application Framework The framework has seven types of interrelated XML files that consultants create to form the foundation of a data-driven Web site. The file types are Business, Data Action, Data Location, Form, Menu, Mode, and Process. The following relationships exist between the file types:
Implementation Artifacts are the data objects that are modeled in Creative Modeler, which in the case of the Web application framework, correspond to a single, unique file type. As such, the artifact types would be Business, Data Action, Data Location, Form, Menu, Mode, and Process. In general, Creative Modeler also supports file types that contain multiple artifacts. For each artifact, the developer creates a .NET class, inheriting from "SDA.ArtifactModel." Each field and property in the artifact class that will be edited graphically is annotated with the "SDA.Editable" attribute, which takes arguments that specify details about the .NET WinForms class that will be used to edit the field value in the property window. If an area larger than 20 pixels high is needed to edit the value (the control will be instantiated in a grid format), then the Editable attribute refers to a control containing a button that activates a new window for more sophisticated editing (see Figure 1). The configuration file also contains information about the interface symbols that are to be used to represent the artifacts in a diagram. A .NET WinForms control is created for each symbol, which inherits from "SDA.SymbolControl," or alternately, implements the "SDA.ISymbol" interface. New symbol/artifact pairs are created at run time using the Creative Modeler toolbox, and then are dragged around, resized, edited, or deleted in the diagram. The symbols have references to their corresponding artifact instance, so changes can be made to the model by listening to the click event in part of the control. One could, for example, have a check box within his or her symbol control that toggled a Boolean field in the artifact. More detailed editing would be accomplished through the property window (which is invoked at run time by right-clicking on a symbol in the diagram). Next, the types of relationships that exist between the artifacts are specified in configuration.xml. For generic "Boolean-type" relationships (where the relationship has no custom properties), a predefined relationship (like "SDA.AssociationRelationship") can be used. If the relationship has custom properties (as is the case with the relationships that exist between Process artifacts and Business artifacts), the developer creates a .NET class that inherits from "SDA.Relationship," which contains the custom fields and properties (annotated with the "Editable" attribute, in the same manner as when creating artifact classes), as well as the method for rendering the relationship in the diagram. The predefined relationships (such as "SDA.AssociationRelationship") can be extended to eliminate the need to render the relationship's "arrow." The data transformations that are used to import and export artifacts to and from data are also specified in configuration.xml. Each file type represents a language and is recognized by its file extension. Within a language, details are specified about what translations occur upon importing and exporting. There are two built-in translation types: "SourceTransform" and "XslTransform." The "Source-Transform" translation converts source-data (non-XML) to XML, using a grammar. The "XslTransform" translation converts XML data to another XML format, or to a source-data format, using an XSLT file. Custom translations can be declared as well, which involves writing a .NET class that inherits from the "SDA.Translator" class (see Figure 2). configuration.xml also contains information about which diagram types are available, and what symbols are allowed in them. Last, it contains information about the structure of the "artifact tree" (which organizes artifacts hierarchically in the Creative Modeler interface) and the commands that can be invoked from it (which correspond to .NET classes that implement the "SDA.ICommand" interface, or optionally to the "SDA.ILongCommand" interface to make use of the progress window).
Deployment
UML and E/R Support
Conclusion CREATIVE MODELER IS ©2005 PATRICK GANNON, AND HAS A PATENT PENDING. YOUR FEEDBACK
XML JOURNAL LATEST STORIES . . .
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING XML NEWS |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||