BrainDump
  Home arrow BrainDump arrow Page 4 - Build a Domain Specific Language with DSL ...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Moblin 
JMSL Numerical Library 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
BRAINDUMP

Build a Domain Specific Language with DSL Tools
By: MSDN Virtual Labs
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 8
    2006-01-19

    Table of Contents:
  • Build a Domain Specific Language with DSL Tools
  • Design a service-oriented system
  • Build a Domain Model for Business Entities
  • Build a Domain Model for Business Entities
  • Map the Notation to the Domain Model
  • Generate the Code for the Designer and Build the solution

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Build a Domain Specific Language with DSL Tools - Build a Domain Model for Business Entities


    (Page 4 of 6 )

    The notation which will be used in the designer for our domain specific language is described in a XML file. As with the domain model the black solution contains a default description, and for this lab we will load a prepared file to save time.

    1. To have a look at the default XML file that was generated from the blank language template, click on the "BizEntity.dsldd" tab on the main window of Visual Studio. You'll notice that it refers to the classes from the original domain model, such as "ConceptA".
                        
    2. Close this file by clicking on File | Close 
    3. In the Solution Explorer, right-click on the Designer project, and choose Add->Existing Item from the context menu.
    4. Set the Files of Type: filter to All Files
    5. In the File Name: box, type c:\dsl\BizEntity.dsldd. Click the Add button.
    6. Confirm you want to replace the existing file.
    7. Double-click on the BizEntity.dsldd file you just added, to open it in the XML editor. The file will be located in the Designer project in the Solution Explorer.
    8. The first function of the dsldd file is to define the notation for our designer. This notation can include shapes which appear in the toolbox and can be dragged onto the design surface, connector lines which connect shapes, and more. To make this a little more concrete, let’s look at an example from our “BizEntity” domain. In the XML editor, browse down until you see a section marked with the <shapes>
      tag (line 185, about three quarters of the way through the file).

    9. We won’t go into too much of the detail of this format in the lab, but notice that we define two shapes, a “BusinessRulesShape”, and an “EntityShape”. Note that the second shape is defined using the <compartmentShape> tag, because we want it to have a sub-compartment for displaying the attributes defined on the entity.

      More BrainDump Articles
      More By MSDN Virtual Labs


         · We hope you've enjoyed this article from MSDN Labs! Be sure to check back next week...
         · I would like to see more of this as this article does not seem to deal with...
         · How/Where can we login into the Virtual Lab, and can you give the URL where we can...
         · How/Where can we login into the Virtual Lab, can you please give the url to build...
       

    BRAINDUMP ARTICLES

    - XAML Brushes and Silverlight
    - Silverlight and XAML Basics
    - Immortal XP
    - XAML Basics
    - Microsoft Surface
    - Making Your First Active X Control in Visual...
    - Codes and Packages in Microsoft Project 2007
    - Windows 7: Rumors and Demos
    - XP SP3 Why Me?
    - Breaking Up Your Work in Microsoft Project
    - Breaking Work into Task-Sized Chunks
    - Putting Microsoft`s Worldwide Telescope Unde...
    - Handling Multiple Contracts with Indigo
    - Cleaning Out Your Data in XP
    - Multiple Service Contracts and Indigo





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway