BrainDump
  Home arrow BrainDump arrow Page 5 - 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 
Mobile Linux 
App Generation ROI 
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 - Map the Notation to the Domain Model


    (Page 5 of 6 )

      1. The second function of the dsldd file is to map the designer notation onto the domain. In general, this involves mapping shapes to classes and connector lines to relationships, so that as a user creates shapes and connectors in the designer, they are also creating the corresponding classes and relationships in the domain. Again, let’s look at the “BizEntity” example. Navigate to the <shapeMaps> tag in the XML editor, line 74, about one-third of the way through the file.

      1. Notice the <class> element defined as a child the <shapeMap> element. This specifies the class in the domain model which the shape maps to. In this case it is the “Entity” class. 
      2. Skip the <compartmentMaps> and <iconMaps> sections for the moment.
      3. Notice the <melCollectionExpression> element defined beneath the <iconMaps> element. This specifies a role in the domain model that an entity must play in order to have a shape created for it. Another way to think of this is that it is specifying the location in the domain model we can find the “Entity” classes we want to map to. In our case, we specify the “ER/Entities” role, which indicates that we want to create an “EntityShape” for all “Entity” instances in the model which are connected to the root element of our domain, which is named “ER”.
      4. Notice the <shape> element defined beneath the <class> element. This specifies the shape in this mapping, in this case the “EntityShape”.
      5. Finally, the <textMaps>, <comparmentMaps>, and <iconMaps> sections map parts of the domain model to text, compartments, and icons which appear on a shape. Notice the use of <expression> elements within these sections to define the mappings.

    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

    - Internet Explorer 8 Review
    - Nilpo`s Top Windows Add-Ons
    - Beginning Silverlight 2.0 Development using ...
    - Fixing Vista`s Troubles
    - Preparing Windows Images for Mass Deployment
    - The Trouble With Vista
    - Slipstreamed and Unattended Windows Installa...
    - Microsoft Office SharePoint Server
    - Microsoft Office SharePoint Designer
    - Microsoft Windows SharePoint Services 3.0
    - Microsoft Live Mesh Overview
    - XAML Brushes and Silverlight
    - Silverlight and XAML Basics
    - Immortal XP
    - XAML Basics





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