software engineering 2 (02162) · se2 (02162 e19), l01 31. agile practices. ekkart kindler we will...

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

Upload: others

Post on 24-May-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Software Engineering 2A practical course in software engineering

Ekkart Kindler

Page 2: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

I. Introduction

Page 3: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerIntroduction

Motivation: Software engineering & management Agile development The role of models in software engineering

Organisation of this course

Project (and tutorials) The task Organisation Forming the groups

3SE2 (02162 e19), L01

Page 4: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart Kindler

4SE2 (02162 e19), L01

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) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart Kindler1. Motivation

Objectives of this course:Skills in software engineering!

What is “software engineering”? What is “software”?

software = program software engineering = programming

5SE2 (02162 e19), L01

Page 6: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerProgram vs. Software

Software >> Program

Software Engineering >>> Programming

6SE2 (02162 e19), L01

is much more than

is much much more than

Page 7: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerProgramming vs. SE

7SE2 (02162 e19), L01

Program

Programmer

Programming

Software

Software Engineer

Software Engineering

Page 8: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart Kindler

8SE2 (02162 e19), L01

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!and needs discipline

Page 9: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerExperience

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

9SE2 (02162 e19), L01

Page 10: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerAnalogy revisited

10SE2 (02162 e19), L01

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) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerObjective

Practice the concepts, methods, notations and tools for software engineering improve programming skills understanding of the software engineering process agile practices 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 …

11SE2 (02162 e19), L01

Page 12: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerExcursion: CDIO

ConceiveDesignImplementOperate

12SE2 (02162 e19), L01

Page 13: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerCo-evolution

HOWWHAT

13SE2 (02162 e19), L01

“What” should the software do?

“How” is it realized?

Page 14: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerCo-evolution

HOWWHAT

14SE2 (02162 e19), L01

Page 15: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerQuestions

Why do so many software projects fail?

Why is software development so hard(or at least harder as we believe)?

BTW: What is software?

15SE2 (02162 e19), L01

Page 16: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerSoftware

The sum of all programs, procedures and objectsalong with the associated data and documentation, which are necessary (or at least desirable) for running an application on a computer system.

[free translation of the German Informatik DUDEN and Hesse‘s definition]

16SE2 (02162 e19), L01

Page 17: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerSoftware …

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) …

17SE2 (02162 e19), L01

Page 18: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerSoftware …

cannot be „programmed“ by a single person anymore; a single person cannot fully comprehend all the details of software any more.

Efforts of 10 to 100 person years (PYs) are quite standard in software development.

18SE2 (02162 e19), L01

Page 19: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerSoftware …

is intangible.

You cannot touch, see or feelsoftware. Humans lack a“natural feeling” of softwareand its complexity.

19SE2 (02162 e19), L01

Page 20: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerSoftware …

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).

20SE2 (02162 e19), L01

Page 21: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerSoftware …

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

21SE2 (02162 e19), L01

Page 22: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerSoftware …

is everywhere and many lifes depend on it.

22SE2 (02162 e19), L01

Page 23: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerSoftware Engineering is

… much more than programming!

… listening and understanding!… analytic and conceptual work!… communication!… a social process!… acquiring new technologies!

23SE2 (02162 e19), L01

Page 24: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerProblems 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 …

24SE2 (02162 e19), L01

Page 25: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerSoftware engineering

is the sum of all means, facilities, procedures, processes, notations, methods, concepts for developing, operating and maintaining a software system.

25SE2 (02162 e19), L01

Page 26: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerSoftware 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

26SE2 (02162 e19), L01

Page 27: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerProcess 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!

27SE2 (02162 e19), L01

document, notationphaserolemethod

Page 28: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerProcess 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

28SE2 (02162 e19), L01

Page 29: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerRule 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?

29SE2 (02162 e19), L01

Here, document can also be code including comments.

Page 30: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart Kindler2. Agile Development

Since we use agile development from day 1,we discuss the motivation of agile development and the used practices already today.

We will provide some details, the theoretical underpinning and justification later (next week and again towards the end of this course)

30SE2 (02162 e19), L01

Page 31: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerAgile manifesto

„We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value: Individuals and interactions over processes and

tools Working software over comprehensive

documentation Customer collaboration over contract negotiation Responding to change over following a planThat is, while there is value in the items on the right, we value the items on the left more.“Kent Beck et al. 2001

31SE2 (02162 e19), L01

Page 32: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerAgile Practices

We will talk about the values, principles, and core concepts and activities of agile development later in this course (week 2/3)

For now, we discuss the core agile practices used in this course

32SE2 (02162 e19), L01

Page 33: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerAgile Practices

On-site customer (Ekkart,Tobias and sometimes Davide from Smart Cities Accelerator and Lars and Thomas from DTU Library)

Small/short releases 2-3 week (see schedule) Planning game (based on User Stories for next

release)

33SE2 (02162 e19), L01

Page 34: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerAgile Practices

Coding standards Testing (automated unit test) Continuous integration (use of Git and Jenkins; in

this course, each group will obtain a VM with Jenkins installed)

34SE2 (02162 e19), L01

Page 35: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerAgile Practices

Pair programming (all code developed and checked in by two persons)

Simple design Refactoring

35SE2 (02162 e19), L01

Page 36: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerStatus reports

In some tutorial/project sessions on Friday (13-15)status report by each group (10 minutes each) can include brief code reviews and demos of running software (CI) and retrospective: what went well what did not go well what can we do about it what’s up next

36SE2 (02162 e19), L01

Page 37: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart Kindler3. Models in SE

… and a glimpse of how software can be developed by using models –without doing any programming at all.

37SE2 (02162 e19), L01

Page 38: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerModelling

38SE2 (02162 e19), L01

Page 39: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerA Model (Petri net)

39SE2 (02162 e19), L01

semaphor

request1

critical1

idle1

request2

critical2

idle2

Page 40: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerStages

Examples Taxonomy (done on blackboard) Glossary Model (see next slide)

40SE2 (02162 e19), L01

Page 41: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerModels and Meta Models

41SE2 (02162 e19), L01

1 target

Model for Petri netsMeta model for Petri nets

Petri net model

PlaceTransition

1 sourceArc

*

PetriNetcontext 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 42: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerDon’t think models as Java

42SE2 (02162 e19), L01

1 targetPetri net model

PlaceTransition

1 sourceArc

*

PetriNetcontext 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 43: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerSyntax (abstract and concrete)

43SE2 (02162 e19), L01

:Place

:Transition

:Arc

:Transition

:Place

:Arc

:Arc

source

target source

target

targetsource

:Arcsourcetarget

:Petrinet

:Token

graphical / concrete syntax

abstract syntax(as an UML object diagram)

Page 44: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerOverview

44SE2 (02162 e19), L01

:Place

:Transition

:Arc

:Transition

:Place

:Arc

:Arc

source

target source

target

targetsource

:Arcsourcetarget

:Petrinet

:Token

PlaceTransition

1 source

1 targetArc

*

PetriNet

Token*

Node

Object

model

meta model

is an instance of

build-time

runtime

Page 45: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerBenefits 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)

45SE2 (02162 e19), L01

Page 46: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerClass Diagrams are Models too

46SE2 (02162 e19), L01

The term “meta” model makes more sense now!

1 source

1 targetAssociationClass

ClassDiagram

Meta model for UML (class diagrams)

UML model

PlaceTransition

1 source

1 targetArc

*

PetriNet

Token*

Node

Object

**

Page 47: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerDifferent Meta-levels: MOF

47SE2 (02162 e19), L01

:Place

:Transition

:Arc

:Transition

:Place

:Arc

:Arc

source

target source

target

targetsource

:Arcsourcetarget

:Petrinet

:Token

PlaceTransition

1 source

1 targetArc

*

PetriNet

Token*

Node

Object

1 source

1 targetAssociationClass

ClassDiagram

**

:Class:Class

:Association

:Association

Page 48: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerAnswers:

Program an editor

Standard technology for mapping abstract to concrete syntax: EMF / GMF / EMFT

48SE2 (02162 e19), L01

Page 49: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerGeneration Technologies

49SE2 (02162 e19), L01

:Place

:Transition

:Arc

:Transition

:Place

:Arc

:Arc

source

target source

target

targetsource

:Arcsourcetarget

:Petrinet

:Token

PlaceTransition

1 source

1 targetArc

*

PetriNet

Token*

Node

Object

model

meta model

is instance of

concrete syntax abstract syntax

Place

Transition

Arc

Token

generate aneditor

Page 50: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerBenefits 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

50SE2 (02162 e19), L01

Page 51: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerDomain model

The model we have discussedbefore has not so much to dowith programming (even thoughcode could be generated from it)

It is about the making theconcepts of the domain precise:domain models

It is about the “what” , not about the “how”!

Of course, UML class diagrams can be used formodelling the ”how”: software models

51SE2 (02162 e19), L01

PlaceTransition

1 source

1 targetArc

*

PetriNet

Token*

Node

Object

Page 52: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerOther 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 ...

52SE2 (02162 e19), L01

Page 53: Software Engineering 2 (02162) · SE2 (02162 e19), L01 31. Agile Practices. Ekkart Kindler We will talk about the . values, principles, and core . concepts. and . activities. of agile

Ekkart KindlerModels and Agile

In agile development models are mostly used for informal discussions and communication!

Anyway, in order to practice the effective use of models, you will be required to use models and submit models in the documentation.

Documentation is required as part of some releases (and as part of the final submission).

53SE2 (02162 e19), L01