Model integration has been a much sought after feature in DSL Tools since their initial release. So far, the only way to achieve this was through massive customization of the models to integrate. A way to integrate models quickly and easily was promised for VS2010 release, and here it is: the ModelBus.
I have downloaded the sample, checked the documentation, and have a few thoughts to share on this feature:
- Enabling the ModelBus for an existing model requires a few steps, but seems pretty straightforward.
- Its very easy to reference shapes in different models using the default editor.
- On the other hand, the default editor has a few limitations:
- You have to specify the target model for every reference being created. Most of the times, a model is linked to another model, and could only be required to select the referenced element.
- Likewise, for a specific element only a subset of types in the target model could be available for selection.
- The editor uses Domain Model/Reference concepts that are specific of DSL Tools, but not related to the specific Domain Models being linked.
This feature looks very promising, enabling quick and easy model integration out of the box, with a few simple configuration steps. This includes a default reference editor, fixing references and validation. The default editor obviously is not suitable for every specific modeling scenario, but that’s what DSL Tools extensibility is for. Using the ModelBus concepts, and with a bit of effort, it should be possible to reference models and elements with a customized UI.
A more in-depth look at ModelBus will certainly be the topic for other posts. For now, go get the bits from theĀ Visual Studio Visualization and Modeling SDK page and try it. The link and files to download are below, in the Resources section.
Resources:
StateMachineOverModelBus – Documentation
StateMachineOverModelBus – Code Sample
http://code.msdn.microsoft.com/vsvmsdk/Release/ProjectReleases.aspx?ReleaseId=3850