Model-Driven Engineering


Model-Driven Engineering (MDE) or Model-Driven Software Engineering (MDSE) is an iterative and incremental software development process. Its primary aim is to define models, methods and tools which are suitable for the correct and efficient representation of software products.


MDE includes the entire life-cycle of a system, according to various dimensions such as system requirements which are divided into functional and non-functional requirements, functionalities, data to be modeled, processing to be performed on the data, dependencies between various objects, architecture, and infrastructure of the entire system. Over the last decade, MDSE has proven to be a successful and a widely used approach for developing software systems where models are the key.




What is a model ?

A model is an abstraction of something, particularly a requirement, for the purpose of understanding it and comprehending it, before actually building it to interface with our proposed system. 

Models provide the ability to analyze properties of the system. They are usually expressed in a modeling language with well-defined syntax and semantics.

Domain - Model focuses on important aspects of the domain. For example, Class diagram of the domain of the system to be built.

Documentation - Abstraction of models helps to understand the system in a faster and much better way. For example, Class diagram containing the key entities in a system is explained and elaborated in a document.

Testing - Model helps to focus on risk management and bugs according to the priority using automation.

Model describes how to get from requirements to running code satisfying requirements and user expectations.


Models are used for many processes in development phase of SDLC - 

  1. System Requirements (e.g. Use case model)

  2. Software Architecture (e.g. Component model)

  3. Behavioral description (e.g. State Diagram)






Model Transformations in Model-Driven Engineering(MDE)



In each of the above phase, we reuse parts of models as input for other models, like - 


  1. Test scenarios for manual as well as automated testing can be partially derived from Use Case Diagrams

  2. Design Class Diagram can also reuse parts of Domain Class Diagram


Model-Driven Engineering implies on automatically generating parts of models, structure or code from other available relevant models. Models can be expressed in UML, or a domain-specific language (DSL). The syntax as well as the semantics of models used in a MDSE approach need to be clearly defined. The software development process changes when a MDSE approach is implemented.


Features Of Model-Driven Engineering

Abstraction from specific realization technologies 

  • Improved portability of software to new/changing technologies.

  • Model once, build everywhere. 

  • Interoperability between different technologies can be automated.

Automated code generation from abstract models 

  • Generation of Java-APIs, XML Schemas, etc. from UML.

  • Requires expressive and precise models.

  • Increased productivity and efficiency (models stay up-to-date).

  • Separate development of application and infrastructure. 

  • Separation of application-code and infrastructure-code (e.g. Application Framework) increases reusability. 

  • Provides flexible development cycles as well as various development roles.


Different Approaches to MDSE  

Model-Driven Architecture (MDA)  


  • Platform Independent Model (PIM) helps to capture domain related specifications. 

  • Platform Specific Model (PSM) on the other hand, captures specifications with platform details. Model transformations transform PIMs into PSMs. 

  • Domain-specific languages (DSL) are used for expressing PIM and PSM. And for defining DSLs, UML profiles are used.


 Advantages: 

  1. Separation of PIM and PSM provides better reusability.

  2. Improved interoperability due to standards (e.g. UML).


 Disadvantages:

  1. Code generation is only partial. So, it requires manual completion of code. 

  2. Semi-automatic generation of one model from another model can lead to maintenance problems if a model is changed in the future. 


Model-Driven Software Development (MDSD) 


  • Generate generic code for the platform instead of writing it separately.  

  • Generate schematic code using transformations based on an application model designed for the system.  

  • Write individual code that is application specific.


Advantages:  

  1. Increased development speed and software quality

  2. Better maintainability, reusability, portability and interoperability.

  3. Increased manageability of complexity. 


Disadvantages:  

  1. MDSD has to be tailored to the domain. That means, no off-the-shelf solution will be available.

  2. No platform-independence of models.


Domain Specific Modeling (DSM)


  • Raise the level of abstraction by specifying a solution in a domain specific language, from which final products can be generated.

  • Model will be expressed in the concepts of the domain . 

  • Code is fully generated.





Comparison of DSM to MDSD and MDA  

  1. DSM emphasizes and thrives on the domain-specific modeling language. 

  2. DSM does not favor using UML or UML extensions as a DSM (in comparison to MDSD). 

  3. DSM proposes to generate the solution from the model, without the need of an intermediate model, which is similar to MDSD. 

  4. Generators along with the DSM itself are developed by domain experts.


Benefits of Model-Driven Engineering

Fewer Bugs - Any bugs can be removed right at the start of the end-to-end process instead of on completion, preventing unnecessary time loss and out-of-control expenses.

Error-free code through automation - In MDE, the stage of the process in which the design i.e., the shared model is translated into code is largely automated. This makes the design and development process significantly more efficient and cost-effective.

Create Improved Prototypes - Model Driven Engineering makes prototyping more accessible and economical, since the method makes it possible to create virtual prototypes. Virtual prototype can be used to test the software results in a more solid and better-performing physical prototype for achieving efficiency. 

Easier Customization - Model Driven Engineering  adds value to customizable processes, which allows users to quickly and easily adapt the software to constantly changing needs and situations. This is hugely profitable for companies that use workflows, such as hospitals. 


Prepared By

Atharv Natu

Uttkarsh Patel

Saniya Inamadar

Khushi Nikumbh


Blog Link - 

https://model-driven-engineering-seda-8.blogspot.com/


Comments