Java Reference
In-Depth Information
might not be deployed to the Practitioner. For example, Figure 2-2 shows model-
to-text templates used to generate model code and others invoked by the
Practitioner on model instances. A Practitioner might want to alter the output
from an M2M or M2T, so the latter are typically deployed to allow for cus-
tomization. Technically, all DSL artifacts can be deployed for extension and
regeneration.
mindmap.ecore
MT
mindmap.gmfmap
Class.javajet*
MM
MM
MT
xhtml.ecore
mindmap2xhtml.qvto
mindmap2requirements.qvto
map2csv.xpt
Figure 2-2
Abstract DSL artifacts—Toolsmith
When I discuss the Practitioner's use of these artifacts, I alter the notation
slightly to indicate instances of each. Specifically, I fill in areas of each notation
element to distinguish an instance from its abstraction, which is “hollow” in
comparison. In the case of Figure 2-3, the Practitioner works with an instance of
the mindmap model through its diagram and can export the model using model
transformations. The first is an M2T template that results in a Comma-Separated
Values (CSV) file. The second produces an HTML report using an Extensible
HTML (XHTML) model. An M2M transformation results in a Requirements
model that can be transformed to HTML using an M2T transformation.
To get an overall picture of what I described previously in the process of
developing a DSL Toolkit, Figure 2-4 represents a general flow. Of course, some
elements are purely optional, and the process is intended to be iterative. Again,
a DSL Toolkit in the context of this topic includes the tooling required for devel-
oping of all aspects of a domain-specific language, including model transforma-
tions and code generation. The important point to keep in mind is that models,
transformations, and templates are iteratively developed with the goal of pro-
viding as much generation as practical. We probably won't see fully generated
applications in the near future, although many aspects of the tooling that you'll
produce in the context of this topic are just that. As the tooling and techniques
improve, complete product lines likely will be mostly generated over time.
 
Search WWH ::




Custom Search