56
Telecom and Informatics 1 INF5120 and INF9120 Modelbased System developmentLecture 15: 06.05.2019 Arne-Jørgen Berre [email protected] and [email protected]

INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Telecom and Informatics 1

INF5120 and INF9120

”Modelbased System development”

Lecture 15: 06.05.2019Arne-Jørgen Berre

[email protected] and [email protected]

Page 2: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Telecom and Informatics

Course parts – 2019

2

Part I-a -(Introduction to Modeling): 14/1 - Start 1-14/1: Introduction to INF5120 Part I-b -(Introduction to Modeling and Metamodeling and) 2-21/1: Modeling structure and behaviour (UML and UML 2.0 and metamodeling) 3-28/1: MDE with Eclipse EMF, Xtext and SIRIUS 4-4/2: Business Modeling – BMC, LSC, VDML/VDMBee, (w/meta model) - (Business Model Canvas, Value Proposition, Lean

Canvas - VDMBee, VDML Part II - (Business Architecture/Business Modeling Modeling + Server side – Node-RED + THingML + Sensors/IoT/Cloud - and the

Smart Home project): ) 5-11/2: BPMN 6-18/2: ArchiMate 3.0 Modeling, TOGAF 9.0 7-25/2: Node-RED Cognitive Services/AI – Watson services example (for Oblig 2) (IBM Cloud) 8-4/3: Smart Home - Design Thinking + Chatbots 9-11/3: Service Modeling with UML 2.X Collaboration Models and Composite Models and SoaML + CJML 10- 18/3: UML 2.x Sequence Diagrams, UML 2.x State Machines. ArchiMate ArchIsurance, ArhiMetal examples, 11- 25/3 CJML – Customer Journey Modeling Language (Guest lecture, Dr. Ragnhild Halvorsrud and UML OCL) Group presentations – Oblig 1 ideas .. Part IIi - (Modeling –Apps + EA/ArchiMate) 1/4 - Oblig 1: Specification Models Smart Home – Business Architecture – Business Canvases, ++, ArchiMate + IBM Cloud basis 12- 1/4 DSLs: SysML (Graphical) and ThingML (Lexical), - Oblig 2, 3 - discussion/ Oblig 1 Group presentation (2nd group)Part IV - (MDE – Creating Your own Domain Specific Language – Eclipse, Xtext/SIRIUS): 13-8/4: Model driven engineering – DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER – 15/4 and 22/4 14-29/4: Lecture - DSLs and Transformations 15-6/5 Lecture – Model Driven Engineering – Examples of IFML Graphical DSL and WebRatio toolset 6/5 - Oblig 2 – delivery: Groups- Metamodeling (Editor – SIRIUS, Xtext, Model Transformation)

16-13/5 Lecture - Summary of the course – Oblig 1 and Oblig 2 Summaries/presentations – Oblig 3 presentations 13/5 – Oblig 3- : Smart Home – Design/Realisation with Node-RED, IBM Watson/IoT services + ArchiMate/UML++ Application,

Technology, Physical models – Smart Home demonstrations - 10% 17-20/5: Previous exams – Preparations for the Exam by old exams 3/6: Exam (4 hours), Monday June 3rd, (0900-1300) - 70%

Page 3: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Telecom and Informatics 3

This lecture, May 6th, 2019

IFML and WebRatio

IFML Example

IFML Metamodel

IFML Tooling – WebRatio

IFML – Student guide – modules – Extra slide set

Page 4: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

http://www.ifml.org/

http://www.ifml.org/

Page 5: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML Objectives

Binding to

Persistence Layer

Navigation Path

Binding to

Business Logic

Content

Event

Page 6: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML Objectives: Content

Content

Page 7: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML Objectives: Navigation Path

Page 8: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML Objectives: Navigation Path

Page 9: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML Objectives: Events

Mouse Over

Page 10: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML Objectives: Events

Page 11: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML Objectives: Binding to business logic

Page 12: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML Objectives: Binding to business logic

Page 13: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML Objectives: Binding to persistence

Content

Book

Title: stringCover: fileList Price: currencyPrice: currencySave: currencyRating: integer………

Page 14: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML Overview

Page 15: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML Essentials

Page 16: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML by example

Basic navigation flow between ViewComponents

Page 17: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML by example

Page 18: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML by example

Nesting of ViewContainers

Tagged ViewContainers (XOR, L, D, Modal, Modeless)

Page 19: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML by example

Actions

Page 20: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

ViewComponentParts:

• Data binding

• Parameters

Types of ViewComponents (<<List>>)

IFML – adding details to ViewComponents

Page 21: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Joint use of IFML and other modeling languages:

• DataBinding to classes and attributes of UML Class Diagrams

• Upcoming: also with other content models, such as: Entity-Relationship, Ontologies, …

Data binding

Page 22: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Joint use of IFML and other modeling languages

Connection of Actions to back-end business logic as

• UML methods of classes

• whole UML dynamic diagrams– activity diagram, sequence diagram, state chart diagram, …

Dynamic Behaviour

Page 23: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Selection event

Submit event

.. And as many others as you want!

IFML – subtyping components and events

Page 24: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML by example

ActivationExpression, SubmitEvent, Event generation

Page 25: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML concrete syntax by example

intra-component events and flows

Page 26: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Multiple views for the same application

Mobile and multi-device applications

Visualization and input of data, and production of events

Components independent of concrete widgets and presentation

Interaction flow, initiated by the user or by external events

User context: the user status in the current instant of the interaction (position, history, machine, platform,…)

Modularization of the model (design-time containers for reuse purpose)

User input validation, according to OCL or other existing constraint languages

Covered aspects

Page 27: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML example – online payment

Page 28: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Multiple aspects modeling – 1 (business and requirements)

UML Use Case BPMN process

UML Sequence

IFML

UML Statechart

Handle Rental

Sales Clerk Handle Renter

<<Include>> <<Extend>>

Handover Car

<<UML Actor>>

Sales Clerk

<<UML

Model>>

IT

systemnew rental

change

days

accept

payment

Page 29: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Integration with UML Use Cases

Each use case can be described by

A business process

A plain UI description in IFML

Some UML dynamic diagrams (e.g., activity, sequence, …)

Handle Rental

Sales Clerk Handle Renter

<<Include>> <<Extend>>

Handover Car

Page 30: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Integration with BPMN

The UI of each activitycan be described by

An IFML module

Some UML dynamic diagrams (e.g., activity, sequence, …)

Page 31: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML concrete syntax by example

IFML Modules - definition

Page 32: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Example of UML - IFML mapping

IFML Model

<< Use Case>>

Handle Rental

xU

ML

Use C

ase

Dia

gra

m

<<xUML Actor>>

Sales Clerk << Use Case>>

Handle Renter

<<Include>> <<Extend>>

<< Use Case>>

Handover Car

<<UML Actor>>

Sales Clerk

Handle

Rental

xUML Sequence Diagrams

<<UML Model>>

IT system

new rental

change dates

accept payment

IFML models can bereworked or refinedafter being generated

Page 33: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Multiple aspects modeling – 2 (implementation and architecture)

UML Sequence

UML Deployment

IFML

UI Mockup models

Page 34: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Description of deployment architecture

UI is just one facet of system design

Often need to position it in a broader architectural vision

UML deployment diagram

Integration with UML

Page 35: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

35

UML

Sequence

Diagrams

Tiers and calls

Explicit description of interactions between tiers

Page 36: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

•Manual specification of BPMN process model

•Automatic transformation of BPMN to WebML

•Possible manual refinement of WebML models

•Automatic running code generation on J2EE platform

•Virtuous development cycle

Model-driven Development Process

Page 37: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

The generated model artifacts

Page 38: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML is defined through a metamodel

How does it work? IFML metamodel (1)

Page 39: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

IFML metamodel (2): Content Binding

• Data binding to Classes and Attributes

• Dynamic Behavior to Methods and Diagrams

Page 40: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

An official metamodel of the language which describes the semantics of and relations between the modeling constructs

A graphical concrete syntax for the interaction flow notation which provides an intuitive representation of the user interface composition, interaction and control logic for the front-end designer

A UML Profile consistent to the metamodel

An interchange format between tools using XMI

All this, specified through standard notations themselves

Practical results of having a standard

Page 41: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Static aspects

Also: interchange with profile-based diagrams. The UML Profile for IFML

«page»AlbumSearch

«page»Albums

«page»Album

Album Search Album Index Album Detail

Dynamic aspects

«index»MBox List

«index»Message

Index

SelectMailMessages(mBox)

Page 42: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

BPMN and/or UML editor

Tight and seamless integration between different modeling tools

• Thanks to XMI interchange format, UML profiles, vendor-specific notationimplementations

• Thanks to model to model transformations

IFML modeling and industrial-strenght

UI generation

Model integration and interchange

UML tool implementing IFML profile

Other Domain-specific modeling tool

XMI model exchange

Model to

model

transformation

Page 43: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Drawing vs. modeling

Tool support for MDE/MDD

Page 44: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

An Eclipse-based development environment allowing:

Modeling: ER + IFML + BPMN

100% code generation of standard JEE applications

• Clear separation between design time and run time

• No proprietary runtime

Quick and agile development cycles

Extending the generation rules

• Defining new presentation styles

• Defining new components

Versioning, teamwork, full lifecycle mgt

Truly multi-role model-driven development

What is WebRatio

Requirement Analysis

Solution Modeling

Prototype Generation

Results Verification

Page 45: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

WebRatio is

now at 7th release

on the market since 2001

WebRatio customers

130+ companies and 500+ commercial users

mainly Italy, USA, Europe and Latin America

WebRatio adoption

15,000+ users of the free edition

Used in hundreds of universities all over the world

WebRatio partners

40+ software houses and system integrators

300+ universities worldwide, 13.000+ students

Some numbers

Page 46: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

You capture business requirements in abstract, technology independent models

BPMN + IFML

WebRatio – Step 1

BusinessUser

WebRatioModeller

Page 47: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

You get a tailored, yet standard, Java Web applicationwith no proprietary runtime

Code generation

WebRatio – Step 3

WebRatioModeller

BusinessUser

Page 48: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Get the application

WebApp

DBMS

Browser

SOACustom

InformationSystem

Standard execution environment

Standard JavaApplication

Server

Page 49: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Involve business users in the development process and converge quickly to the target

Agile, quick prototyping

Requirement Analysis

SolutionModelling

ApplicationGeneration

ResultsValidation

Page 50: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Our innovation environment

Page 51: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Evolution of tool (and language)

Page 52: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

The final picture

Page 53: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Agility + MDD

DevelopmentPrototype

Test User

Zero-cost, 1-click, prototype generation

FinalApplication

Development / Testing environment

Final execution environmentDifferent deployment configurations

Iterative, agile development ?

Model

GenerationRules

GenerationEngine

FinalApp User

Page 54: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Model

GenerationRules

GenerationEngine

Do not change the generated application code

Touch the generation rules instead

The MDE Virtuous Cycle

GeneratedApplication

?

Page 55: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Examples of application areas

Corporate Operations

Human Capital Management

Product Life Cycle Management

CustomerRelationshipManagement

Enterprise Resource Planning

Supply Chain Management

Knowledge Support

Sales and LeadManagement

Marketing Resources Mgt

Web CustomerServices

B2C/B2BE-Commerce

Learning Management

Document Management

Project Management

Customer Information Mgt

Partner Relationship Mgt

Recruitment

Training

Workforce Management

Supplier Relationship Mgt

Business Intelligence

Web Content Management

Knowledge Management

Risk and Compliance

Enterprise Governance

Order Mgt

Payment Services Orchestration

Web Front-End of accounting sys.

Front-Office Process Mgt

Financial Services

Page 56: INF5120 and INF9120 Modelbased System development · 13-8/4: Model driven engineering –DSLs - IBM SPSS Graphic Modeler and IoT Analytics EASTER –15/4 and 22/4 14-29/4: Lecture

Book references

Second edition

“Model Driven Software Engineering in Practice”. Brambilla, Cabot, Wimmer, Morgan&Claypool, 2017

"IFML",

Brambilla, Fraternali,

Elsevier, 2015

First edition

“Model Driven Software Engineering in Practice”. Brambilla, Cabot, Wimmer, Morgan&Claypool, 2012