YOUR FEEDBACK
Three RIA Platforms Compared: Adobe Flex, Google Web Toolkit, and OpenLaszlo
NN wrote: Yeah you are right GWT is poor man's Flex. After using GWT on two...

SYS-CON.TV
TOP MICROSOFT .NET LINKS


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

Digg This!

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.

Data Translation
The data translation engine built into Creative Modeler supports converting data from source (non-XML) formats into XML formats, and back again. It also supports converting XML formats into other XML formats via XSLT (Extensible Stylesheet Language Transformations). To convert non-XML into XML, users create a grammar file, in a variant of Chomsky normal form (for more information on the Chomsky normal form, refer to the Wikipedia: http://en.wikipedia.org/wiki/Chomsky_normal_form). In a Chomsky normal form, grammars have a start (or root) symbol, which refers to two other symbols (either as a sequence, or a choice - a logical "and" and "or," respectively). Those symbols may refer to other symbols, or they may be terminal (or leaf) symbols (such as a constant). Creative Modeler extends this concept by adding the notion of variable symbols (for capturing data), along with a number of other conveniences. Grammars are specified in a new XML format (a ".cmgrammar" file). This approach is used to convert C# source code and T/SQL table scripts into XML. In addition, any structured data format can be converted into XML, using this approach (see Listing 1).

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
To illustrate how Creative Modeler can be utilized in a business scenario, consider a Web application framework that is used internally by one of Microsoft's top consulting partners. This framework allows consultants to quickly create data-driven forms, complete with validation, navigation, declarative business rules processing, and much more.

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:

  • Process files refer to multiple Business files
  • Business files refer to a Data Action file
  • Form files refer to multiple Business files
  • Form files may refer to another Form file
  • Form files refer to a Mode file
This company is in the process of leveraging Creative Modeler to allow their consultants to create and edit all of these files in a set of diagrams. By doing this, they dramatically lower the learning curve for creating and maintaining applications using their framework. An additional benefit is that the time it takes to develop a framework application is greatly reduced because the visual nature of Creative Modeler eliminates time spent double-checking file references, resolving typos, and copying/pasting boilerplate XML. A final benefit is that less technical business analysts create the core of an application, based on a deep understanding of the requirements, in which case the developer consultant is only involved in refinement.

Implementation
To implement a solution such as the one described for the Web application framework, a developer creates a set of XML files and .NET classes that are collectively referred to as a "profile." An empty profile is created by clicking on the button resembling an asterisk in Creative Modeler and entering a name. Creative Modeler creates a new directory structure and a ".cmprofile" XML file where deployment details are specified (more on deployment later). Afterwards, the developer edits the configuration file that was also generated (configuration.xml) to specify the details of the profile, including the types of artifacts to edit.

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
Creative Modeler comes in two editions: Architect and Business. The Architect edition is geared toward the developers who create and maintain the profile or profiles. The Business edition is designed for business users who make use of a profile. In other words, the Architect edition users configure the Creative Modeler implementation, which Business edition users leverage to create diagrams and import and export data. The profile (Creative Modeler implementation) contains a ".cmprofile" file, which specifies the deployment targets. When a new version of the profile is available, it is deployed to Business edition users by an Architect edition user, using functionality that is built in to Creative Modeler.

UML and E/R Support
Creative Modeler has built-in support for creating UML diagrams, as well as importing and exporting to and from C#. Inheritance and aggregation relationships expressed in code are added to the diagram automatically when both classes involved in the relationship are added to a diagram. A subset of T/SQL is also supported for creating Entity-Relationship (E/R) diagrams. Similar to the class diagram, foreign key relationships expressed in the script are added to a database diagram when both tables are added to the diagram (see Figure 3).

Conclusion
Given how Creative Modeler has the capability to translate and edit any structured data, it is easy to see how businesses can leverage the technology to enable their developers and business users to easily create and modify a wide variety of system artifacts. Workflows, configuration files, and proprietary scripts (and much more) can all be easily round-trip engineered using Creative Modeler. If you have an application that requires significant customization, this is the software for you.

CREATIVE MODELER IS ©2005 PATRICK GANNON, AND HAS A PATENT PENDING.

About Patrick Gannon
Patrick Gannon is the president of Creative Metasoft in San Francisco, CA. For more information, code samples, or an evaluation copy of Creative Modeler, visit www.creativemodeler.com or e-mail pat@creativemodeler.com.

news desk wrote: 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.
read & respond »
XML News Desk wrote: 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.
read & respond »
MICROSOFT .NET LATEST STORIES
Peer Networking Series - A Closer Look at PNRP vs. Bonjour/ZeroConf
It seems as though whenever I bring up PNRP and its benefits, I am immediately inundated with a list of questions or comments indicating that Microsoft is re-inventing the wheel and that PNRP has already been implemented before in the form of ZeroConf and, more specifically, Apple's im
Microsoft, Unisys, Yahoo and Vista
Microsoft, which spent $6 billion on aQuantive and was chasing Yahoo for its ads before it came to a dead stop, has been supporting - as in helping write - legislation in New York and Connecticut that would regulate the data that companies like Yahoo and Google collect for targeted adv
AJAX World - Xceed Launches Microsoft Silverlight 2 Control
Xceed launched Xceed Upload for Silverlight, the commercial offering in support of Microsoft's promising new Silverlight technology. The product is available now for purchase or as a fully functional 45-day trial on Xceed's website. Xceed Upload for Silverlight lets developers add uplo
Microsoft To Keynote 4th International Virtualization Conference & Expo
Mike Neil is general manager for virtualization strategy in the Windows Server Division at Microsoft. Mike is focused on the delivery of the Windows virtualization technology, including Windows Server 2008 Hyper-V, Microsoft Hyper-V Server and Virtual PC 2007. Mike also directs the tec
Microsoft Virtualization Takes Management Cross-Platform
Microsoft is making System Center, its central management scheme, natively manage Linux, Unix and VMware virtual servers. The widgetry has always been a Windows-only affair, but now there are betas available showing off Microsoft's cross-platform prowess, important to Microsoft's place
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE
BREAKING NEWS FROM THE WIRES
Actium Partners with GraphOn to Web-Enable Financial Management Platform
GraphOn Corporation (OTCBB:GOJO), a leading worldwide developer of application publishi