Domain-Specific Modeling
Encyclopedia
Domain-specific modeling (DSM) is a software engineering
methodology for designing and developing systems, such as computer software
. It involves systematic use of a domain-specific language (DSL) to represent the various facets of a system. DSM languages tend to support higher-level abstractions
than general-purpose modeling
languages, so they require less effort and fewer low-level details to specify a given system.
: automating
the creation of executable source code
directly from the DSM models. Being free from the manual creation and maintenance of source code means DSM can significantly improve developer productivity. The reliability of automatic generation compared to manual coding will also reduce the number of defects in the resulting programs thus improving quality.
DSM differs from earlier code generation attempts in the CASE
tools of the 1980s or UML
tools of the 1990s. In both of these, the code generators and modeling languages were built by tool vendors. While it is possible for a tool vendor to create a DSM language and generators, it is more normal for DSM to occur within one organization. One or a few expert developers creates the modeling language and generators, and the rest of the developers use them.
Having the modeling language and generator built by the organization that will use them allows a tight fit with their exact domain and needs. It also reduces the time needed for developers to learn the modeling language, since it can use familiar terms and concepts. Finally, since only one organization's requirements need be taken into account, it is easier for the modeling language to evolve in response to changes in the domain.
DSM languages can usually cover a range of abstraction levels for a particular domain. For example, a DSM language for mobile phones could allow users to specify high-level abstractions for the user interface
, as well as lower-level abstractions for storing data such as phone numbers or settings. Likewise, a DSM language for financial services could permit users to specify high-level abstractions for clients, as well as lower-level abstractions for implementing stock and bond trading algorithms.
, hence the language for defining a modeling language is a meta-metamodel. Meta-metamodels can be divided into two groups: those that are derived from or customizations of existing languages, and those that have been developed specifically as meta-metamodels.
Derived meta-metamodels include Entity Relationship Diagrams
, Formal languages, EBNF, Ontology languages
, XML Schema
, and MOF
. The strengths of these languages tend to be in the familiarity and standardization of the original language.
The ethos of domain-specific modeling favors the creation of a new language for a specific task, and so there are unsurprisingly new languages designed as meta-metamodels. The most widely-used family of such languages is that of OPRR, GOPRR, and GOPPRR, which focus on supporting things found in modeling languages with the minimum effort.
languages already have tool support available in the form of CASE
tools. DSM languages tend to have too small a market size to support the construction of a bespoke CASE tool from scratch. Instead, most tool support for DSM languages is built based on existing DSM frameworks or through DSM environments.
A DSM environment may be thought of as a metamodeling tool, i.e., a modeling tool used to define a modeling tool or CASE tool. The resulting tool may either work within the DSM environment, or less commonly be produced as a separate stand-alone program. In the more common case, the DSM environment supports an additional layer of abstraction
when compared to a traditional CASE tool.
Using a DSM environment can significantly lower the cost of obtaining tool support for a DSM language, since a well-designed DSM environment will automate the creation of program parts that are costly to build from scratch, such as domain-specific editors, browsers and components. The domain expert only needs to specify the domain specific constructs and rules, and the DSM environment provides a modeling tool tailored for the target domain.
Most existing DSM takes place with DSM environments, either commercial such as MetaEdit+
or Actifsource
, open source such as GEMS
, or academic such as GME
. The increasing popularity of DSM has led to DSM frameworks being added to existing IDEs, e.g. Eclipse Modeling Project (EMP) with EMF
and GMF
, or in Microsoft's DSL Tools for Software Factories
.
(UML) is a general-purpose modeling
language for software-intensive systems that is designed to support mostly object oriented programming
. Consequently, in contrast to DSM languages, UML is used for a wide variety of purposes across a broad range of domains. The primitives offered by UML are those of object oriented programming, while domain-specific languages offer primitives whose semantics
are familiar to all practitioners in that domain. For example, in the domain of automotive engineering
, there will be software models to represent the properties of an anti-lock braking system
, or a steering wheel
, etc.
UML includes a profile mechanism that allows it to be constrained and customized for specific domains and platforms. UML profiles use stereotypes, stereotype attributes (known as tagged values before UML 2.0), and constraints to restrict and extend the scope of UML to a particular domain. Perhaps the best known example of customizing UML for a specific domain is SysML, a domain specific language for systems engineering
.
Software engineering
Software Engineering is the application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, and the study of these approaches; that is, the application of engineering to software...
methodology for designing and developing systems, such as computer software
Computer software
Computer software, or just software, is a collection of computer programs and related data that provide the instructions for telling a computer what to do and how to do it....
. It involves systematic use of a domain-specific language (DSL) to represent the various facets of a system. DSM languages tend to support higher-level abstractions
Abstraction (computer science)
In computer science, abstraction is the process by which data and programs are defined with a representation similar to its pictorial meaning as rooted in the more complex realm of human life and language with their higher need of summarization and categorization , while hiding away the...
than general-purpose modeling
General-purpose modeling
General-purpose modeling is the systematic use of a general-purpose modeling language to represent the various facets of an object or a system...
languages, so they require less effort and fewer low-level details to specify a given system.
Overview
Domain-specific modeling (DSM) often also includes the idea of code generationAutomatic programming
In computer science, the term automatic programming identifies a type of computer programming in which some mechanism generates a computer program to allow human programmers to write the code at a higher abstraction level....
: automating
Automation
Automation is the use of control systems and information technologies to reduce the need for human work in the production of goods and services. In the scope of industrialization, automation is a step beyond mechanization...
the creation of executable source code
Source code
In computer science, source code is text written using the format and syntax of the programming language that it is being written in. Such a language is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source...
directly from the DSM models. Being free from the manual creation and maintenance of source code means DSM can significantly improve developer productivity. The reliability of automatic generation compared to manual coding will also reduce the number of defects in the resulting programs thus improving quality.
DSM differs from earlier code generation attempts in the CASE
Computer-aided software engineering
Computer-aided software engineering is the scientific application of a set of tools and methods to a software system which is meant to result in high-quality, defect-free, and maintainable software products...
tools of the 1980s or UML
Unified Modeling Language
Unified Modeling Language is a standardized general-purpose modeling language in the field of object-oriented software engineering. The standard is managed, and was created, by the Object Management Group...
tools of the 1990s. In both of these, the code generators and modeling languages were built by tool vendors. While it is possible for a tool vendor to create a DSM language and generators, it is more normal for DSM to occur within one organization. One or a few expert developers creates the modeling language and generators, and the rest of the developers use them.
Having the modeling language and generator built by the organization that will use them allows a tight fit with their exact domain and needs. It also reduces the time needed for developers to learn the modeling language, since it can use familiar terms and concepts. Finally, since only one organization's requirements need be taken into account, it is easier for the modeling language to evolve in response to changes in the domain.
DSM languages can usually cover a range of abstraction levels for a particular domain. For example, a DSM language for mobile phones could allow users to specify high-level abstractions for the user interface
User interface
The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...
, as well as lower-level abstractions for storing data such as phone numbers or settings. Likewise, a DSM language for financial services could permit users to specify high-level abstractions for clients, as well as lower-level abstractions for implementing stock and bond trading algorithms.
Defining DSM languages
To define a language, one needs a language to write the definition in. The language of a model is often called a metamodelMetamodeling
Metamodeling, or meta-modeling in software engineering and systems engineering among other disciplines, is the analysis, construction and development of the frames, rules, constraints, models and theories applicable and useful for modeling a predefined class of problems...
, hence the language for defining a modeling language is a meta-metamodel. Meta-metamodels can be divided into two groups: those that are derived from or customizations of existing languages, and those that have been developed specifically as meta-metamodels.
Derived meta-metamodels include Entity Relationship Diagrams
Entity-relationship model
In software engineering, an entity-relationship model is an abstract and conceptual representation of data. Entity-relationship modeling is a database modeling method, used to produce a type of conceptual schema or semantic data model of a system, often a relational database, and its requirements...
, Formal languages, EBNF, Ontology languages
Ontology language (computer science)
In computer science and artificial intelligence, ontology languages are formal languages used to construct ontologies. They allow the encoding of knowledge about specific domains and often include reasoning rules that support the processing of that knowledge...
, XML Schema
XML Schema
XML Schema, published as a W3C recommendation in May 2001, is one of several XML schema languages. It was the first separate schema language for XML to achieve Recommendation status by the W3C...
, and MOF
Meta-Object Facility
The Meta-Object Facility is an Object Management Group standard for model-driven engineering. The official reference page may be found at OMG's website.- Overview :...
. The strengths of these languages tend to be in the familiarity and standardization of the original language.
The ethos of domain-specific modeling favors the creation of a new language for a specific task, and so there are unsurprisingly new languages designed as meta-metamodels. The most widely-used family of such languages is that of OPRR, GOPRR, and GOPPRR, which focus on supporting things found in modeling languages with the minimum effort.
Tool support for DSM languages
Many General-Purpose ModelingGeneral-purpose modeling
General-purpose modeling is the systematic use of a general-purpose modeling language to represent the various facets of an object or a system...
languages already have tool support available in the form of CASE
Computer-aided software engineering
Computer-aided software engineering is the scientific application of a set of tools and methods to a software system which is meant to result in high-quality, defect-free, and maintainable software products...
tools. DSM languages tend to have too small a market size to support the construction of a bespoke CASE tool from scratch. Instead, most tool support for DSM languages is built based on existing DSM frameworks or through DSM environments.
A DSM environment may be thought of as a metamodeling tool, i.e., a modeling tool used to define a modeling tool or CASE tool. The resulting tool may either work within the DSM environment, or less commonly be produced as a separate stand-alone program. In the more common case, the DSM environment supports an additional layer of abstraction
Abstraction (computer science)
In computer science, abstraction is the process by which data and programs are defined with a representation similar to its pictorial meaning as rooted in the more complex realm of human life and language with their higher need of summarization and categorization , while hiding away the...
when compared to a traditional CASE tool.
Using a DSM environment can significantly lower the cost of obtaining tool support for a DSM language, since a well-designed DSM environment will automate the creation of program parts that are costly to build from scratch, such as domain-specific editors, browsers and components. The domain expert only needs to specify the domain specific constructs and rules, and the DSM environment provides a modeling tool tailored for the target domain.
Most existing DSM takes place with DSM environments, either commercial such as MetaEdit+
MetaEdit+
- Research History :The research behind the genesis of MetaEdit+ was carried out at the , as part of the MetaPHOR project. A metamodeling and modeling tool, MetaEdit, had been created by the earlier SYTI project in the late 1980s and early 1990s, in co-operation with a company, MetaCase.Both...
or Actifsource
Actifsource
Actifsource is a domain specific modeling workbench. It is realized as plug-in for the software development environment Eclipse. Actifsource supports the creation of multiple domain models which can be linked together. It comes with a UML-like graphical editor to create domain specific languages...
, open source such as GEMS
Generic Eclipse Modeling System
Generic Eclipse Modeling System is a configurable toolkit for creating domain-specific modeling and program synthesis environments for Eclipse...
, or academic such as GME
Generic Modeling Environment
Generic Modeling Environment is a model-integrated program synthesis tool for creating domain-specific models of large-scale systems. GME allows users to define new modeling languages using UML-based metamodels...
. The increasing popularity of DSM has led to DSM frameworks being added to existing IDEs, e.g. Eclipse Modeling Project (EMP) with EMF
Eclipse Modeling Framework
Eclipse Modeling Framework is an Eclipse-based modeling framework and code generation facility for building tools and other applications based on a structured data model...
and GMF
Graphical Modeling Framework
The Graphical Modeling Framework is a framework within the Eclipse platform. It provides a generative component and runtime infrastructure for developing graphical editors based on the Eclipse Modeling Framework and Graphical Editing Framework...
, or in Microsoft's DSL Tools for Software Factories
Software factory
In software engineering and enterprise software architecture, a software factory is an organizational structure that specializes in producing computer software applications or software components according to specific, externally-defined end-user requirements through an assembly process...
.
DSM and UML
The Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language is a standardized general-purpose modeling language in the field of object-oriented software engineering. The standard is managed, and was created, by the Object Management Group...
(UML) is a general-purpose modeling
General-purpose modeling
General-purpose modeling is the systematic use of a general-purpose modeling language to represent the various facets of an object or a system...
language for software-intensive systems that is designed to support mostly object oriented programming
Object-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...
. Consequently, in contrast to DSM languages, UML is used for a wide variety of purposes across a broad range of domains. The primitives offered by UML are those of object oriented programming, while domain-specific languages offer primitives whose semantics
Semantics
Semantics is the study of meaning. It focuses on the relation between signifiers, such as words, phrases, signs and symbols, and what they stand for, their denotata....
are familiar to all practitioners in that domain. For example, in the domain of automotive engineering
Automotive engineering
Modern automotive engineering, along with aerospace engineering and marine engineering, is a branch of vehicle engineering, incorporating elements of mechanical, electrical, electronic, software and safety engineering as applied to the design, manufacture and operation of motorcycles, automobiles,...
, there will be software models to represent the properties of an anti-lock braking system
Anti-lock braking system
An anti-lock braking system is a safety system that allows the wheels on a motor vehicle to continue interacting tractively with the road surface as directed by driver steering inputs while braking, preventing the wheels from locking up and therefore avoiding skidding.An ABS generally offers...
, or a steering wheel
Steering wheel
A steering wheel is a type of steering control in vehicles and vessels ....
, etc.
UML includes a profile mechanism that allows it to be constrained and customized for specific domains and platforms. UML profiles use stereotypes, stereotype attributes (known as tagged values before UML 2.0), and constraints to restrict and extend the scope of UML to a particular domain. Perhaps the best known example of customizing UML for a specific domain is SysML, a domain specific language for systems engineering
Systems engineering
Systems engineering is an interdisciplinary field of engineering that focuses on how complex engineering projects should be designed and managed over the life cycle of the project. Issues such as logistics, the coordination of different teams, and automatic control of machinery become more...
.
See also
- Computer-aided software engineeringComputer-aided software engineeringComputer-aided software engineering is the scientific application of a set of tools and methods to a software system which is meant to result in high-quality, defect-free, and maintainable software products...
- Domain-driven designDomain-driven designDomain-driven design is an approach to developing software for complex needs by deeply connecting the implementation to an evolving model of the core business concepts...
- Domain-specific language
- General-purpose modelingGeneral-purpose modelingGeneral-purpose modeling is the systematic use of a general-purpose modeling language to represent the various facets of an object or a system...
- Domain-specific multimodelingDomain-specific multimodelingDomain-specific multimodelingis a software development paradigm where each view is made explicit as a separate domain-specific language .Successful development of a modern enterprise system requires the convergence of multiple views...
- Model-driven engineeringModel-driven engineeringModel-driven engineering is a software development methodology which focuses on creating and exploiting domain models , rather than on the computing concepts...
- Model-driven architectureModel-driven architectureModel-driven architecture is a software design approach for the development of software systems. It provides a set of guidelines for the structuring of specifications, which are expressed as models. Model-driven architecture is a kind of domain engineering, and supports model-driven engineering of...
- Software factories
- Discipline-Specific Modeling
Further reading
- Article "IT Architect magazine's article on DSM."
- Article "Application Development Advisor magazine's article on DSM"
- Article "ADT at Gartner ITxpo: Gates sees more modeling, less coding" by Rich Seeley
- Article Domain-Specific Modeling for Full Code Generation from Methods & Tools
- Article Actifsource Code Generator for Eclipse
- Article Using Acceleo with GMF : Generating presentations from a MindMap DSM modeler
- Article Creating a Domain-Specific Modeling Language for an Existing Framework
- Article Domain-specific Modeling: Making Code Generation Complete
- Article Domain Specific Modeling in IoC frameworks