A spe cts of Graphical DSLs in C#.NET

Printer Quick Response Code in C#.NET A spe cts of Graphical DSLs
A spe cts of Graphical DSLs
Generating QR Code ISO/IEC18004 In Visual C#.NET
Using Barcode generation for .NET Control to generate, create QR image in .NET framework applications.
lane1 a1 a2 a3 a4 Return Call lane2 lane3 Object1 Object2
Bar Code Encoder In C#.NET
Using Barcode creation for VS .NET Control to generate, create barcode image in .NET framework applications.
Activities and Swimlanes
Quick Response Code Generation In VS .NET
Using Barcode maker for ASP.NET Control to generate, create Quick Response Code image in ASP.NET applications.
Objects and Lifelines
QR Code 2d Barcode Drawer In .NET Framework
Using Barcode encoder for .NET Control to generate, create QR Code ISO/IEC18004 image in .NET applications.
s1 s2
QR Code 2d Barcode Drawer In Visual Basic .NET
Using Barcode maker for .NET Control to generate, create QR Code ISO/IEC18004 image in .NET framework applications.
UseCase
Barcode Creator In Visual C#.NET
Using Barcode maker for VS .NET Control to generate, create barcode image in Visual Studio .NET applications.
s2 States and Transitions
Barcode Drawer In C#
Using Barcode encoder for .NET Control to generate, create barcode image in VS .NET applications.
Actor Actors and Use Cases
Create Code 39 In Visual C#
Using Barcode generator for Visual Studio .NET Control to generate, create Code 39 Extended image in .NET applications.
Figure 1-12: Behavioral conventions
USS Code 128 Printer In Visual C#
Using Barcode printer for .NET Control to generate, create ANSI/AIM Code 128 image in .NET applications.
Building your own graphical language on top of a given set of notational elements and conventions is analogous to building an embedded textual DSL, where instead of writing type wrappers and methods to make the language convenient to your domain, you de ne a mapping from the notational elements to your own domain concepts If you want to de ne a graphical language that uses different notational elements and conventions, you have to be more expert and know how to create new diagrammatic elements from lower-level constructs This is analogous to building your own parser for a textual DSL
Data Matrix ECC200 Creation In Visual C#
Using Barcode creator for Visual Studio .NET Control to generate, create DataMatrix image in .NET applications.
Aspects of Graphical DSLs
Painting ANSI/AIM Code 39 In Java
Using Barcode maker for Java Control to generate, create ANSI/AIM Code 39 image in Java applications.
A graphical DSL has several important aspects that must be de ned The most important of these are its notation, domain model, generation, serialization, and tool integration
Paint EAN / UCC - 13 In Visual Studio .NET
Using Barcode encoder for .NET Control to generate, create EAN128 image in .NET applications.
1: Domain-Spe cific Development
Bar Code Generator In Visual Studio .NET
Using Barcode encoder for ASP.NET Control to generate, create barcode image in ASP.NET applications.
Notation In the previous section we talked about the notation of the language and how it can be built by reusing basic elements, often derived from wellestablished conventions, particularly those that originate in UML For the kinds of graphical DSLs that we support, the basic building blocks are various kinds of shapes and connectors laid out on a two-dimensional drawing surface These shapes and connectors contain decorators, which are used to display additional information such as text and icons attached to the shapes and connectors in particular places In 4 we ll see full details of how to de ne these shapes and connectors and how to associate them with the other aspects of the language Domain Model The domain model is a model of the concepts described by a language The domain model for a graphical language plays a rather similar role in its de nition to that played by a BNF grammar for a textual language But for graphical languages, the domain model is usually itself represented graphically The basic building blocks for a domain model are domain classes and domain relationships Each domain class represents a concept from the domain; each domain relationship represents a relationship between domain concepts Typically, domain concepts are mapped to shapes in order to be represented on diagrams Domain relationships can be mapped to connectors between those shapes or to physical relationships between shapes, such as containment Another important aspect of the domain model is the de nition of constraints, which can be de ned to check that diagrams created using the language are valid For example, the class diagram in Figure 1-13 uses the correct diagrammatical conventions but de nes a cyclic class hierarchy that is semantically invalid 7 describes how to de ne constraints in the DSL Tools and discusses the differences between hard and soft constraints Generation You de ne a language because you want to do something useful with it Having created some models using the language, you normally want to generate some artifacts: some code, or data, or a con guration le, or another diagram, or even a combination of all of these You ll want to be
Bar Code Encoder In VB.NET
Using Barcode creator for Visual Studio .NET Control to generate, create bar code image in .NET applications.
A spe cts of Graphical DSLs
Encode UPC-A Supplement 2 In Java
Using Barcode drawer for Java Control to generate, create UCC - 12 image in Java applications.
Class 1 Class 2
Recognizing Bar Code In .NET Framework
Using Barcode scanner for .NET framework Control to read, scan read, scan image in VS .NET applications.
Class 3
UPC A Decoder In Visual Studio .NET
Using Barcode reader for .NET framework Control to read, scan read, scan image in Visual Studio .NET applications.
Class 4
Bar Code Printer In Java
Using Barcode drawer for Java Control to generate, create barcode image in Java applications.
Figure 1-13: Invalid class diagram
Drawing Bar Code In .NET Framework
Using Barcode generator for ASP.NET Control to generate, create barcode image in ASP.NET applications.
able to regenerate these artifacts ef ciently whenever you change a diagram, causing them to be checked out of source control if necessary 8 explains the DSL Tools generation framework, which enables the language author to de ne how to map models into useful artifacts
Printing Code 128 Code Set A In .NET
Using Barcode generator for ASP.NET Control to generate, create Code 128C image in ASP.NET applications.
Serialization Having created some models, you ll want to save them, check them into source control, and reload them later The information to save includes details about the shapes and connectors on the design surface, where they are positioned, and what color they are, as well as details of the domain concepts represented by those shapes It s often useful to be able to customize the XML format for saving models in order to help with integrating these models with other tools This flexibility increases interoperability between tools and also makes it possible to use standard XML tools to manage and make changes to the saved models Using an XML format that is easy to read also helps with source control conflicts It is relatively straightforward to identify differences in versions of an artifact using textual differencing tools and to merge changes to artifacts successfully at the level of the XML les 6 explains how to de ne and customize the serialization format for a graphical DSL