Java Reference
In-Depth Information
After defining the DSL's abstract syntax in terms of Ecore, we can leverage a
variety of the Modeling project's capabilities that are designed to work with
Ecore models. Nearly everything involved in developing a DSL Toolkit revolves
around EMF's capabilities, including diagram definitions, transformation defini-
tions, code-generation templates, model serialization and persistence, and more.
In addition, many of these capabilities are developed using EMF models. For
example, Graphical Modeling Framework (GMF) uses a collection of EMF mod-
els (DSLs themselves) in generating domain-specific modeling surfaces. QVT's
abstract and concrete syntax are defined with EMF models, and so on. Before
going deeper into the individual projects you'll leverage within the context of this
topic, let's take a step back and look at domain-specific languages and the Eclipse
Modeling Project as a whole.
1.2 Domain-Specific Languages
A DSL is a language designed to be useful for a specific set of tasks. Much has
been written on the general topic of DSLs, with the domain-specific aspect being
the most controversial and reminiscent of discussions regarding “meta-ness.”
Just as metamodel is a relative term to describe a model that is used as the basis
for another model, the term domain-specific is used in a relative sense. Domain
specificity is determined by the designer of the language—in our case, the
Toolsmith.
For example, you might consider the UML to be a general-purpose language
that consists of several domain-specific languages for state machines, structural
definition, use cases, and so on. Others might consider all of UML to be a
domain-specific language covering the domain of software development.
However you look at it, UML is a modeling language that, in the sphere of
MDSD, is used to generate source code in the form of a general-purpose pro-
gramming language. General-to-general mappings typically don't work well, so
additional specificity is typically applied at one end or both ends. A common
approach is to make the modeling language more specific and target a stable
framework, as in the case of using a UML Profile for developing Java EE appli-
cations. An alternative is to start small, creating your own domain-specific lan-
guage that includes just what you need.
 
Search WWH ::




Custom Search