Condividi tramite


August 2010: MSDN Library Content Update: Modeling the Application

Modeling the Application

Visualization and Modeling SDK – Domain-Specific Languages

We're continuing the big overhaul of the VMSDK (was DSL Tools) topics to make them more accurate and more useful.

With the VMSDK, you can define domain-specific languages: graphical modeling tools that you can use in Visual Studio to generate code and other files, or as an interface to other tools. You build DSLs and other Visual Studio extensions into an integrated toolkit that is fine-tuned to the work of your team.

Please give us your feedback and improvements to these and other topics, in the Community Content section at the bottom of each topic. Don't forget that you can also ask questions or provide feedback in the VMSDK Forum. This is one of the best ways we have of knowing how we should improve our help files.

Highlights of what we've rewritten include: 

New Sample: Electronic Circuit Diagrams

The sample is available at the VMSDK site on Code Gallery.

Demonstrates:

  • Copy, cut and paste preserving layout
  • Embed diagram in a Windows Form in Visual Studio
  • Couple model to external form by using Events
  • Drop tool on element
  • Text wrapping
  • Dynamic node images
  • Shape alignment command
  • Composite elements
  • Validation
  • Menu commands and double-click

Getting Started with Domain-Specific Languages

Walk through creating a basic graphical DSL and use it to generate code or other files.

How to Define a Domain-Specific Language

All the steps in one place!

Customizing and Extending a DSL - and its sub topics - customizing presentation on the diagram, element creation, link creation, copy and paste, deletion, properties window, model explorer.

To tune the DSL for your application area, you can adjust what it looks like, how it responds to users' commands, and how it interacts with other tools.

Microsoft.VisualStudio.Modeling.Diagrams namespace

The header material now has class diagrams and summaries of the most important types, making it easier to find your way around.

Several of the key types now have extended and more useful descriptions.

Navigating and Updating a Model in Program Code

A DSL provides an API on its model. You use the API to integrate the DSL with other Visual Studio tools, and to implement menu commands and other customizations.

Validation

Write constraints to warn your user when the model is not correct.

Propagating Changes

Write rules to keep different parts of a model in synch; write events to synchronize external tools with the model.

Customizing File Storage and XML Serialization

Customize how your users' models are stored on files.

Integrating Models by using Visual Studio Modelbus

Explains how to make links between models, and how to navigate the links in program code.

You can also integrate with models created with the UML and Layer Diagram tools.

Generating Code from a DSL

It's very easy to generate text files such as program code, configuration files or reports from a DSL and from UML diagrams.

Sharing Classes between DSLs using a DSL Library

If you're building several integrated DSLs, you can share parts of their definitions in a common library file.

 We’ve also made many small corrections and improvements – many of them from your input in the Community Content section at the bottom of each topic. Please keep them coming!