Model-Driven Approach Jarosław Kuchta Embedded Systems Software Engineering Model-Driven Approach GUT - INTEL 2015/16 Embedded Systems Software Engineering
Modeling in a classic lifecycle Planning Analysis Design Implementation Testing Maintenance GUT - INTEL 2015/16 Embedded Systems Software Engineering
Analysis – design – implementation (classic approach) SRS Requirements extraction Planning Analysis Static analysis Functional analysis Behavioral analysis Dynamic analysis System design System architecture design Application logic design User interface design Data structure design Detailed design Code structure creation Application logic implemen-tation User interface implemen-tation Data structure implemen-tation Implementation GUT - INTEL 2015/16 Embedded Systems Software Engineering
Analysis – design – implementation (differences) Goal Understanding of customer requirements Solution concept development Solution concept realization Question What is it? What is it for? How will we do it? How to do it? Sources Requirements specification, domain publications, similar projects documentation Requirements specification, analytic models, design patterns, similar projects documentation designs, requirements specification, framework documentation Means Talking with customer, problem domain modeling Requirements reading and analysis, designs development Designs reading and analysis, coding, debugging Effects Revised requirements specification, use case model, class model System architecture design, application logic design, user interface design, data structure design Deployed software, source code, code documentation GUT - INTEL 2015/16 Embedded Systems Software Engineering
Aspects of analysis and design Design aspects Analytic aspects System architecture Application login User interface Data structure Static System components Classes, properties Interface layout, forms, reports Database schema, tables Functional Functionalities, user permissions Component interfaces, interactions Menus, commands, navigation Queries, stored procedures Behavioral Events, states Events, actions, activities Event handling, error handling Data validation, data backup Dynamic Efficiency, availability Asynchronous computation Responsible interface, events timing Database synchronization, migration GUT - INTEL 2015/16 Embedded Systems Software Engineering
Aspects – models – diagrams Aspect – a set of system features considered when other features are omitted Model – a description of a real existing or designed system showing a selected aspect (sometimes more than one) Diagram – a graphical model presentation as a drawing with semantically important elements Diagram elements are mapped to model elements. Diagram IS NOT a model: Not always all model elements are included in the diagram. Some other model presentation can be used (e.g. CRC cards). One model can be presented in many diagrams. Model elements are mapped to system elements. Model IS NOT a system: Model shows only selected aspect(s) of the system. Not all system elements are included in the model. If some model fully describes all the system elements than this model is equivalent to the system. GUT - INTEL 2015/16 Embedded Systems Software Engineering
Models and diagrams usage Aspect Usage in analysis Usage in design Use case model Use case diagram, class diagram Functional Modeling users capabilities provided by the system Modeling system usage scenarios from the users perspective Class/object model Class diagram, object diagram Static “Business” concepts modeling Modeling code structure in classes Interaction model Interaction diagram, activity diagram, collaboration diagram Modeling system-external interaction Modeling internal system components interaction State model State transition model Behavioral Modeling system reactions on external events and exception situations Modeling system components reactions on communication events and system errors Timing model Sequence diagram, timing diagram Dynamic Modeling usage scenarios Modeling timing relationships and time of processes executions System architecture model Component diagram, deployment diagram not used Modeling hardware and software system architecture Code structure model Package diagram, object diagram Modeling code structure in run-time components Data structure model Entity-relationship diagram, class diagram Modeling database schema Navigation model Windows navigation diagram, storyboard Modeling UI components structure and possible passing GUT - INTEL 2015/16 Embedded Systems Software Engineering
Embedded Systems Software Engineering MDA pros and cons Pros Cons Early customer requirements understanding (before any coding) Early discovering of potential technical problems Capability of optimal solution choice Capability of managing of complex system structure Code modification saving Easier product maintainability Hard to use when a problem domain is fuzzy A customer gets a running application lately Risk of modeling unfeasible (unprofitable) solution High cost of modeling Late investment return GUT - INTEL 2015/16 Embedded Systems Software Engineering
Including prototyping and modeling in SCRUM Idea Prototype Models Product Backlog Sprint Backlog SPRINT Running software Revision GUT - INTEL 2015/16 Embedded Systems Software Engineering
Usage of modeling tools in IDE Lack of full UML2 implementation pros: ease of code generation ease of reverse engineering cons: IDE dependent solutions model/design lack of portability GUT - INTEL 2015/16 Embedded Systems Software Engineering
Modeling tools and environments (1) Name Platform / OS Languages generated Languages reverse engineered ArgoUML Cross-platform (Java) C++, C#, Java, PHP4, PHP5, Ruby Java (other languages with plugins) Astah Windows, OS X, Linux Java, C++, C# BOUML Cross-platform C++, Java, PHP, IDL, Python C++, Java, PHP Eclipse UML2 Tools Java (or Eclipse project supported?) Enterprise Architect Windows (Supports Linux and OS X installation) ActionScript, C, C#, C++, Delphi, Java, PHP, Python, Visual Basic, Visual Basic .NET, DDL, EJB, XML Schema, Ada, VHDL, Verilog, WSDL, BPEL, Corba IDL ActionScript, C, C#, C++, Delphi, Java, PHP, Python, Visual Basic, Visual Basic .NET, DDL, XML Schema, WSDL MagicDraw Java, C++, C#, CIL, CORBA IDL, DDL, EJB, XML Schema, WSDL Modelio Windows, Linux, OS X Java, C++, C#, XSD, WSDL, SQL NClass Windows, OS X, Linux, Unix C#, Java NetBeans Java objectiF Windows Java, C#, Visual Basic, C++ Java, C#, Visual Basic Open ModelSphere Java, SQL Papyrus Windows, Linux (Java) Ada 2005, C/C++, Java addins Unknown PowerDesigner Java, C#, VB .NET Prosa UML Modeller C++ Java, C#, SQL DDL and SQL queries C++ Java and C# class headers are synchronized between diagrams and code in real-time GUT - INTEL 2015/16 Embedded Systems Software Engineering
Modeling tools and environments (2) Name Platform / OS Languages generated Languages reverse engineered Rational Rhapsody Windows, Linux C++, C, Java, Ada, C#, Corba, Customizable for other languages C++, C, Java, Ada, C#, Customizable for other languages Rational Software Architect Java, C#, C++, EJB, WSDL, XSD, IDL, SQL Java, C++, .NET Rational System Architect Windows C++, Java, WSDL Real Time Developer Studio Windows, Linux, Solaris, OS X C, C++ Unknown Software Ideas Modeler Windows (.NET), Linux (Mono) ActionScript, C++, C#, Delphi, Java, JavaScript, PHP, Python, Ruby, SQL DDL, VB.NET, VB6, XSD C++, C#, VB.NET, Java, PHP, Ruby StarUML Windows, OS X, Linux Java,C#,C++ Java Profile,C++ Profile,C# Profile Code Generator and Reverse Engineer Umbrello UML Modeller Unix-like; Windows C++, Java, Perl, PHP, Python … 16 C++, IDL, Pascal/Delphi, Ada, Python, Java; import XMI, RoseMDL UModel Java, C#, Visual Basic Visual Paradigm for UML Cross-platform (Java) Java, C#, C++, PHP, Ada, Action Script (all only in commercial version) Java, C# (binary), C++, PHP (all only in commercial version) GUT - INTEL 2015/16 Embedded Systems Software Engineering
Embedded Systems Software Engineering Bibliography Roger S. Pressman: Software Engineering. A Practitioner's Approach (book, PDF) Dennis A., Wixom B.H., Tegarden D., Systems Analysis & Design. An Object-Oriented Approach with UML, (book) UML Tools Directory (http://www.umltools.net) GUT - INTEL 2015/16 Embedded Systems Software Engineering