software engineering 2 (02162) · introduction ekkart kindler motivation the role of models in...

46
Software Engineering 2 A practical course in software engineering Ekkart Kindler

Upload: others

Post on 18-Jun-2020

11 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Software Engineering 2 A practical course in software engineering

Ekkart Kindler

Page 2: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

I. Introduction

Page 3: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler Introduction

Motivation

The role of models in software engineering

Software engineering & management

Organisation of this course

Project & tutorials

The task

Technology tutorials

Forming the groups

Overview of Cloud and IBM Bluemix

3 SE 2 (02162 e016), L 01

Page 4: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

4 SE 2 (02162 e016), L 01

Weekly Schedule (roughly)

Mon Tue Wed Thu Fri

8-10 lecture

10-12 project

13-15 tutorial

15-17 project

lecture tutorial project

Page 5: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

5 SE 2 (02162 e016), L 01

1. Motivation

Objectives of this course:

Skills in software engineering!

What is “software engineering”?

What is “software”?

software = program

software engineering = programming

Page 6: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

6 SE 2 (02162 e016), L 01

Program vs. Software

Software >> Program

Software Engineering >>> Programming

is much more

than

is much much

more than

Page 7: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

7 SE 2 (02162 e016), L 01

Programming vs. SE

Program

Programmer

Programming

Software

Software Engineer

Software Engineering

Page 8: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

8 SE 2 (02162 e016), L 01

Software Engineering is

… much more than programming!

… listening and understanding!

… analytic and conceptual work!

… communication!

… a social process!

… acquiring and using new technologies!

… a discipline with proven concepts, methods, notations, and tools!

… and ever new technologies emerging!

Page 9: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

9 SE 2 (02162 e016), L 01

Experience

Software Engineering requires much experience!

This experience

can not be taught theoretically!

will be provided in this course!

project

tutorial (new technologies)

and (only) backed by the lectures

Page 10: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

10 SE 2 (02162 e016), L 01

Analogy revisited

The experience of a big project cannot be

replaced by the experience of many small ones.

Effort per participant

• 10 ECTS = ca. 270h work

• ca. 20h/week

Page 11: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

11 SE 2 (02162 e016), L 01

Objective

Practice the concepts, methods, notations and

tools for software engineering

improve programming skills

understanding of the software engineering process

experiences with problems and concepts for

solving them

writing and creating documents and models

use of methods and tools

practice communication and presentation skills

capability of teamwork and leadership

acquire new technologies

Page 12: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler Excursion: CDIO

Conceive

Design

Implement

Operate

12 SE 2 (02162 e016), L 01

Page 13: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler Co-evolution

13 SE 2 (02162 e016), L 01

HOW WHAT

“What” should

the software

do?

“How” is it

realized?

Page 14: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

14 SE 2 (02162 e016), L 01

Questions

Why do so many software projects fail?

Why is software development so hard

(or at least harder as we believe)?

BTW: What is software?

Page 15: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

15 SE 2 (02162 e016), L 01

Software

Die Menge aller Programme, Prozeduren und

Objekte, zusammen mit den zugehörigen

Daten und der Dokumentation, die für eine

lauffähige Anwendung nötig oder

wünschenswert sind.

[frei nach Informatik DUDEN und Hesse]

Page 16: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

16 SE 2 (02162 e016), L 01

Software

The sum of all programs, procedures and

objects along with the associated data and

documentation, which are necessary (or at

least desirable) for running an application on a

computer system.

Page 17: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

17 SE 2 (02162 e016), L 01

Software …

is becoming more and more complex!

Exponential growth of software (in „lines of

code“ LOC) within the same product line:

Apollo (NASA‘s Apollo programme)

Cars (automotive software)

Page 18: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

18 SE 2 (02162 e016), L 01

Software …

cannot be „programmed“ by a single person

anymore; a single person cannot fully

comprehend all details of software any more.

Efforts of 10 to 100 person years (PYs) are

quite standard in software development.

Page 19: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

19 SE 2 (02162 e016), L 01

Software …

is intangible.

You cannot touch, see or feel

software. Humans lack a

“natural feeling” of software

and its complexity.

Page 20: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

20 SE 2 (02162 e016), L 01

Software …

does not wear out,

but becomes of age anyway

(in relation to the environment it is running in

and the expectations of the end user)!

Software needs „maintenance“! But, this does

not mean the same as in traditional

engineering (e.g. in mechanical engineering,

where systems physically wear out).

Page 21: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

21 SE 2 (02162 e016), L 01

Software …

„lives“ longer than its creators expect it to live.

Page 22: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

22 SE 2 (02162 e016), L 01

Software …

is everywhere and many lifes depend on it.

Page 23: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

23 SE 2 (02162 e016), L 01

Software Engineering is

… much more than programming!

… listening and understanding!

… analytic and conceptual work!

… communication!

… a social process!

… acquiring new technologies!

Page 24: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

24 SE 2 (02162 e016), L 01

Problems

imprecise requirements

mistakable and unclear requirements

inconsistent requirements

changing requirements

changing environments (software / hardware)

different versions and configurations

changing tools, notations, languages, methods, concepts, technologies

collective knowledge only

communication

Page 25: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

25 SE 2 (02162 e016), L 01

Software engineering

is the sum of all means, facilities, procedures,

processes, notations, methods, concepts for

developing, operating and maintaining a

software system.

Page 26: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

26 SE 2 (02162 e016), L 01

Software engineering

Branches: Development:

actual development of the software product

Management: Manage (control and improve) the development process

Quality management: Planning and implementing measures that guarantee that the software meets the required quality

Software maintenance: Remove faults occurring in operation, adapt software to changing requirements and environments

Page 27: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

27 SE 2 (02162 e016), L 01

Process models

Process models (life cycle models) are the

„distilled“ experience of successful software

projects.

They define a functional procedure along with

appropriate documents.

What should be done

when,

by whom and

how!

document, notation

phase

role

method

Page 28: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

28 SE 2 (02162 e016), L 01

Process models

Problem: Often process models are used very

mechanical and in a „meaningless“ way.

documents just for the sake of the process

(UML) diagrams just for the sake of UML

comments just for the sake of comments

Page 29: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

29 SE 2 (02162 e016), L 01

Rule of thumb

When producing and compiling a document, ask yourself: What should the document be good for?

Who should be addressed?

Which information is expected?

What is the common „pragmatics“?

In short: What is reasonable?

Page 30: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

30 SE 2 (02162 e016), L 01

2. Models in SE

… and a glimpse of how software can

be developed by using models –

without doing any programming at all.

Page 31: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

31 SE 2 (02162 e016), L 01

Modelling

Page 32: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

32 SE 2 (02162 e016), L 01

A Model (Petri net)

semaphor

request1

critical1

idle1

request2

critical2

idle2

Page 33: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler Stages

Examples

Taxonomy (done on blackboard)

Glossary

Model (see next slide)

33 SE 2 (02162 e016), L 01

Page 34: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

34 SE 2 (02162 e016), L 01

1 target

Model for Petri nets Meta model for Petri nets

Models and Meta Models

Petri net model

Place Transition

1 source

Arc

*

PetriNet context Arc inv: ( self.source.oclIsKindOf(Place) and self.target.oclIsKindOf(Transition) ) or ( self.source.oclIsKindOf(Transition) and self.target.oclIsKindOf(Place) )

Token *

Node

Object

Page 35: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

35 SE 2 (02162 e016), L 01

1 target

Don’t think models as Java

Petri net model

Place Transition

1 source

Arc

*

PetriNet context Arc inv: ( self.source.oclIsKindOf(Place) and self.target.oclIsKindOf(Transition) ) or ( self.source.oclIsKindOf(Transition) and self.target.oclIsKindOf(Place) )

Token *

Node

Object

Page 36: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

36 SE 2 (02162 e016), L 01

Syntax (abstract and concrete)

:Place

:Transition

:Arc

:Transition

:Place

:Arc

:Arc

source

target source

target

target source

:Arc source target

:Petrinet

:Token

graphical / concrete syntax

abstract syntax (as an UML object diagram)

Page 37: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

37 SE 2 (02162 e016), L 01

Overview

:Place

:Transition

:Arc

:Transition

:Place

:Arc

:Arc

source

target source

target

target source

:Arc source target

:Petrinet

:Token

Place Transition

1 source

1 target

Arc

*

PetriNet

Token *

Node

Object

model

meta model

is an instance of

build-time

runtime

Page 38: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

38 SE 2 (02162 e016), L 01

Benefits of Modelling

Better understanding

Mapping of instances to XML syntax (XMI)

Automatic code generation

API for creating, deleting and modifying model

Methods for loading and saving models (in XMI)

Standard mechanisms for keeping track of changes

(observers)

Simple editor (tree editors)

Page 39: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

39 SE 2 (02162 e016), L 01

The term “meta”

model makes

more sense now!

Class Diagrams are Models too

1 source

1 target

Association Class

ClassDiagram

Meta model for UML (class diagrams)

UML model

Place Transition

1 source

1 target

Arc

*

PetriNet

Token *

Node

Object

* *

Page 40: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

40 SE 2 (02162 e016), L 01

Different Meta-levels: MOF

:Place

:Transition

:Arc

:Transition

:Place

:Arc

:Arc

source

target source

target

target source

:Arc source target

:Petrinet

:Token

Place Transition

1 source

1 target

Arc

*

PetriNet

Token *

Node

Object

1 source

1 target

Association Class

ClassDiagram

* *

:Class :Class

:Association

:Association

Page 41: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

41 SE 2 (02162 e016), L 01

Answers:

Program an editor

Standard technology for mapping abstract to

concrete syntax: EMF / GMF / EMFT

Page 42: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

42 SE 2 (02162 e016), L 01

EMF/GMF Technology

:Place

:Transition

:Arc

:Transition

:Place

:Arc

:Arc

source

target source

target

target source

:Arc source target

:Petrinet

:Token

Place Transition

1 source

1 target

Arc

*

PetriNet

Token *

Node

Object

model

meta model

is instance of

concrete syntax abstract syntax

Place

Transition

Arc

Token

generate an editor

Page 43: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

43 SE 2 (02162 e016), L 01

Benefits of Modelling (cntd.)

Better Understanding

Mapping of instances to XML syntax (XMI)

Automatic Code Generation

API for creating, deleting and modifying model

Methods for loading and saving models (in XMI)

Standard mechanisms for keeping track of changes

(observers)

Editors and GUIs

Page 44: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler

44 SE 2 (02162 e016), L 01

Theses

We will always have programming and programmers!

We should always teach programming!

But, software engineers should be trained in their engineering and modelling skills!

And this is where they should be at their best!

Most of the rest can be automated!

Eventually, programming will be for software engineers as assembler is today for programmers.

Page 45: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler Other UML diagrams

In this course, we will use many other kind of UML

diagrams, for different purposes

Use cases

State machines

Activity diagrams

Sequence diagrams

Component diagrams

...

45 SE 2 (02162 e016), L 01

Page 46: Software Engineering 2 (02162) · Introduction Ekkart Kindler Motivation The role of models in software engineering Software engineering & management Organisation of this course Project

Ekkart Kindler Exercise

Discuss a UML class diagram for geomerties of our

project (which will be discussed later)

46 SE 2 (02162 e016), L 01

l1

l2

l3

p1

p2 p3

p4