Model-driven Development
What Is Model-driven Development?
Model-driven development (MDD) is a software engineering approach in which formal models are the primary development artifacts, and source code is derived from those models through automated or semi-automated transformations rather than written by hand. The approach separates the description of what a system should do from the specifics of how any particular programming platform implements it. By anchoring the development process to models rather than to implementation code, teams gain the ability to retarget a design to a new platform by replacing the transformation rules rather than rewriting the system, and to propagate design changes consistently across all derived artifacts. MDD is the development methodology aspect of the broader model driven engineering (MDE) discipline, which encompasses the underlying theories, languages, and tooling.
The methodology was formalized through the Object Management Group's Model Driven Architecture specification in 2001, and it built on earlier work in object-oriented analysis and design and in automatic programming research. It relies on standard notations, including the Unified Modeling Language (UML) and domain-specific languages, together with transformation engines and code generators to move models through successive stages of refinement.
Platform-Independent and Platform-Specific Models
MDD distinguishes two key model layers. A platform-independent model (PIM) captures the essential logic and structure of a system without reference to any particular runtime environment, programming language, or middleware. A platform-specific model (PSM) binds that logic to a concrete technology, such as a Java Enterprise Edition stack, a real-time operating system, or an FPGA hardware description. The OMG's Model Driven Architecture standard defines the framework for this separation and specifies how transformation rules map PIM elements to their PSM equivalents. A single PIM can feed multiple PSMs, making it possible to deploy the same application logic to a web service, a mobile client, and an embedded controller by maintaining separate transformation rules for each target.
Model-to-Model and Model-to-Code Transformations
The automation in MDD depends on transformation engines that operate on models in a systematic way. Model-to-model transformations refine or translate a model from one level of abstraction or one notation to another; for example, mapping a UML class diagram to a relational database schema model. Model-to-text transformations traverse a model's structure and emit source code, configuration scripts, or test harnesses according to templates. The ACM work on model transformation development processes examines how transformation chains can be built and validated to ensure that generated code correctly reflects the intent of the original model. Bidirectional transformations, which keep a model and its generated artifact synchronized when either is changed, are an active research area and are supported in some commercial tools for round-trip engineering.
Executable Models and Round-Trip Engineering
Executable models take MDD to its logical extension by making models precise enough to simulate and test without an intermediate code generation step. In this approach, behavior specifications written in action languages attached to UML state machines or activity diagrams are interpreted directly by a model execution engine. Round-trip engineering refers to the practice of propagating changes made in generated code back to the originating model, maintaining consistency when developers must work at the code level for performance tuning or platform-specific reasons. An overview of model-driven software development situates executable modeling within the larger family of MDD tools and discusses the trade-offs between full automation and developer control.
Applications
Model-driven development has applications in a range of software-intensive engineering fields, including:
- Automotive software developed under the AUTOSAR standard using MATLAB/Simulink model-based design
- Telecommunications service creation environments where protocol stacks are generated from UML state machine models
- Enterprise application integration through model-driven data mapping between heterogeneous information systems
- Avionics software developed under DO-178C, where model-level traceability supports certification evidence
- Industrial control systems where programmable logic controller code is generated from graphical function block diagrams