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  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
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


      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

    - Introduction to Office Live Workspace
    - Using MS Excel for One-way Analysis of Varia...
    - Comparing Data Sets Using Statistical Analys...
    - Import Blogger Posts into WordPress Using Wi...
    - Download WordPress from an FTP Server and Ru...
    - Install and Run WordPress in XAMPP Local Host
    - What Windows 7 Brings to the Table
    - Virtualization and Sandbox Detection
    - Advanced Firebug Techniques in Windows XP Ho...
    - Editing CSS with Firebug in Windows XP Home
    - Using Firebug in Windows XP Home
    - Migrating to Exchange Server 2007
    - Using System Restore on a Non-Bootable PC
    - Finding Logged on Users and More Scripting S...
    - Developing Macro Commands in MS Excel





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 4 Hosted by Hostway
    Stay green...Green IT