DSLFactory.Utilities is a library providing a set of utilities to be used with Domain Specific Languages created with the Microsoft DSL Tools Among other features you will find new common contextual commands, help for supporting reverse engineering from class view, incremental code generation, and more generally model-code synchronization.
- The libray is for developers or architects wanting to improve the customization of the DSLs they created with the Microsoft DSL Tools. They will, thus, be able to create bidirectional DSLs in the same spirit as Visual Studio ClassDiagram.
- The WCF Designer DSL is for anybody wanting to manipulate WCF concepts from models.
Watch the library at work: the WCF Designer
We provide a sample of how to use the library: the WCF Designer
. It enables bidirectional editing of Windows Communication Foundation concepts (model and C# code are synchronized)
Download WCF Designer (may 31st 2007)
- Watch the video "How to create a simple service
" - Watch the video Reverse engineering a WCF service
The supported concepts are Service Contracts
, Data Contracts
, Message Contracts
, and Service Hosting
.You can either edit the diagram ahead or the code below : both are kept synchronized.
For us, the purpose of the DSL is to be the playground for experimentations, and the sample we will use in several publications to come that will explain how to use the library and how it works.
But this is also a gift we make to our friend community : http://netfxfactory.org
for their great event : the .NET 3.0 Enterprise Realization Day
The library offers, for the moment:
- Standard contextual commands such as Copy, Paste (borrowed from the DSL Tools authors excellent book), LayoutDiagram
- Drag and drop from Class View (D & D from Solution View and Data Table to come)
- Helper functions for using DTE such as:
- KnownCodeTypes which enable efficient access to all the types known by the project hosting the DSL
- IncrementalGenerator which helps creating incremental code generator (absolutely necessary when you want to have bidirectional DSLs)
- StoreCorrespondance which makes it easy to retreive the Projecttem, Project, or KnownCodeTypes associated with a DSL (accessed from the Store property of any ModelElement)
- VariableLabel which solves once for all the problem of the representation of variables (for exemple in compartment) in the form "name : type", with type checking, and type fully qualified name infering from short name (with type chooser in case there are several possibilities)
- MethodLabel which solves once for all the problem of the representation of methods : conversions are possible between Label, prototype, signature, name, parameters name and types. The label is a condensed representation whereas the fully qualified name of the return type and the parameter types are known.
An article is being writen explaining more about this library
The ultimate purpose of this project is to further automate the production of such bidirectional DSLs by creating a DSL which will capture the mapping between the DomainModel and code. The calls to the DslFactory.Utilities library will then be generated from this mapping model.
The dslfactory community (http://www.dslfactory.org
) is a (French) community about DSLs, GAT, and more generally the Visual Studio extensibility. We have already provided introductory sessions
to the DSL Tools, for example at the Microsoft France TechDays 2007, and a big DSL Tools Lab
We now are committed to explain how to create bidirectional DSLs, and automate this very complex process as much as possible.