BrainDump
  Home arrow BrainDump arrow Page 3 - 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 - Build a Domain Model for Business Entities


    (Page 3 of 6 )


    The domain model that the DSL tools wizard has put into your solution is a nearly empty one and looks like this:



    The shapes in the domain model describe classes, and the lines between them describe relationships.

    In order to allow you to finish the lab in the allotted time, we are going to load in a prepared domain model for the business entity designer.

    1. Close the domain model by clicking on File | Close
    2. In the Solution Explorer, right-click on the DomainModel project, and choose Add->Existing Item.
    3. Set the Files of Type: filter to All Files.
    4. In the File Name: box, type c:\dsl\BizEntity.dmd. Click the Add button.

    5. Confirm you want to replace the existing file.
    6. In the Solution Explorer, double-click on the BizEntity.dmd file you just added, which will be located in the DomainModel project. The domain model will look like this:



      This diagram defines the structure of the domain model, which is made up of classes (grounded rectangles) and relationships between classes (lines). To get a better idea of what this notation means, let's take a closer look at the Entity class:

    7. Open up the Entity shape by clicking on the little "+" sign. Note: three "Entity" shapes appear in the diagram because the Entity class is referenced  by other classes; the shape you should click on is in the lower portion of the diagram, indicated by the red arrow in the image above.

    8. Here we see that classes may contain value properties. The "Entity" class has two value properties, "Kind" and Description". You can click on the value properties to see details about them in the Properties window in the lower right corner of Visual Studio.
    9. An entity may reference another entity. This is indicated by the dotted line labeled “ReferencedEntity”. You can select the relationship in the diagram by clicking on the dotted line to see its details in the Properties window again. Notice that the name of this relationship is “Association”; the names of its two roles (ends) are ReferencedEntity and ReferringEntities. The roles are represented in the diagram by the small triangular and rectangular shapes appearing on the line. You can also click on these to view properties about them.
    10. An Entity contains Attributes. This containment is indicated by the solid line between the “Entity” class and the “Attribute” class, labeled “Attributes”. You can open up the Attribute shape and have a look at its value properties.

    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 6 hosted by Hostway
    Stay green...Green IT