Software Engineering Radio runs a DSM episode
Software Engineering Radio, the podcast for professional developers, runs an episode on Domain-Specific Modeling. The episode focuses on technical topics and using DSL, models and code generators in practice. The practice part is addressed by discussing our experiences backed by some public industry examples.
I had the pleasure being interviewed by Markus Völter as his comments and arguments made the interview lively interactive - rather than having a monologue or the question and answer chain. As an example, one particular topic in the first half was the discussion on the need of model-to-model transformations. With a small example Markus asked how to model with state machines that from each state an emergency transition should be possible without using M2M. If the case of emergency would be the same for all the states and the state machines there naturally would be no need to model emergency handling at all. If there is variation among these two: systems with emergency and systems with no emergency, a single Boolean property for the whole system would be enough and the MetaEdit+ generator would be:
If :Emergency Stop; then subreport ‘_EmergencyStop’ run endif;
This line appears only once in the generator and it ensures that all systems created have either no emergency handling or have it for all the states. The above choice of emergency transitions needs to be specified also with M2M. The above generator line, illustrates that the language recognizes emergencies policies (we can ask form the model if Emergency Stop is used) and developers we can therefore see completeness and correctness already while creating and editing the specification. Variation in related to Emergency handling could be also specified also per each state machine or each state, if needed.
To look the scalability of this idea, my earlier blog entry copied the case from Martin Fowler, where he introduced the need for different kind of reset events which is a bit more complex than the above Boolean case. From the example you can see that there is no need to specify any transition lines to the reset event object (top right in the diagram) and the code gets still generated.

