Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2008
Visual Studio
Visual Studio SDK
 Overview of Domain-Specific Languag...

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2008/.NET Framework 3.5

Other versions are also available for the following:
Domain-Specific Language Tools
Overview of Domain-Specific Language Tools

Updated: July 2008

Domain-Specific Language Tools (DSL Tools), which are hosted in Visual Studio, let you design a domain-specific language and then generate everything that users must have to create models that are based on the language.

The following tools are included in DSL Tools:

  • A project wizard that uses different solution templates to help you start developing your domain-specific language.

  • A graphical designer for creating and editing your domain-specific language definition.

  • A validation engine that makes sure that the domain-specific language definition is well-formed, and displays errors and warnings if there are problems.

  • A code generator that takes a domain-specific language definition as input and produces source code as output.

The Domain-Specific Designer Wizard provides the following solution templates:

  • Task Flow

  • Class Diagrams

  • Minimal Language

  • Component Models

For more information, see Choosing a Domain-Specific Language Solution Template.

The wizard creates a Visual Studio solution that has the following projects:

  • Dsl

    The Dsl project defines the domain-specific language and its editing and processing tools.

  • DslPackage

    The DslPackage project determines how the language tools integrate with Visual Studio.

You can use the DSL Tools graphical interface to add elements and relationships to your domain-specific language. After you have added the elements, you can define their appearance by mapping them to shapes, customizing colors, and adding decorators. You can also add the elements to the toolbox.

Dsl provides one level of validation to make sure that the domain model meets the basic requirements for code generation. Typically, when you create your own domain-specific language, you would add your own validation to express your business logic rules. For more information about custom validation, see Adding Validation to Domain-Specific Language Solutions.

We recommend that you validate your domain-specific language often when you are designing it. If your domain-specific language has validation errors, you cannot generate source code. The process of generating source code from the templates is called transformation. Whenever you modify the language definition, also make sure to modify the templates. For more information, see Walkthrough: Creating a Domain-Specific Language Solution.

You can provide additional code to refine the behavior of the model and to define constraints over your language. If required, you can make significant changes by modifying the text templates.

DSL Tools generates a package that is hosted in Visual Studio. The package displays a toolbox, a DSL explorer, and other UI elements that let users create models by using your domain-specific language.

When you build and run the DSL Tools solution in Visual Studio, a second instance of Visual Studio shows you how your domain-specific language looks to the user of the language. After you verify that everything works correctly, you can create a deployment package to distribute your domain-specific language. For more information, see Deploying Domain-Specific Language Solutions.

Date

History

Reason

July 2008

Rewrote and refactored project.

Content bug fix.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker