software engineering 2 (02162) · se 2 (02162 e15), l03 7 specifying software goals: defining what...

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

Upload: others

Post on 10-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Software Engineering 2 A practical course in software engineering

Ekkart Kindler

Page 2: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

III. Specifying Software

Page 3: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

3 SE 2 (02162 e15), L03

III. Specifying Software

Goals:

Defining what the software should do (before it is

really there)

Customer and Developer agree on what should be

delivered

Effort (resources and time) can be planned based

on that (contract will be based on that).

C-requirements D-requirements

Page 4: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

4 SE 2 (02162 e15), L03

Specifying Software

Project Definition

Requirements Specification

rough

detailed

Systems specification

Complete Models

Implementation, Documentation

Handbook

what

how

Page 5: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

5 SE 2 (02162 e15), L03

Specifying Software

Project Definition

Requirements Specification

rough

detailed

Systems specification

Complete Models

Implementation, Documentation

Handbook

rough

detailed

Page 6: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

6 SE 2 (02162 e15), L03

Specifying Software

Project Definition

Requirements Specification

rough

detailed

Systems specification

Complete Models

Implementation, Documentation

Handbook

low cost

high cost

Page 7: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

7 SE 2 (02162 e15), L03

Specifying Software

Goals:

Defining what the software should do before it is

really there

Customer and developer agree on what should be

delivered

Effort (resources and time) can be planned based

on that (contract will be based on that).

Page 8: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

1. Project Definition

Page 9: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

9 SE 2 (02162 e15), L03

Specifying Software

Project Definition

Requirements Specification

rough

detailed

Systems specification

Complete Models

Implementation, Documentation

Handbook

Page 10: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

10 SE 2 (02162 e15), L03

Project Definition: Contents

Partners

Context

Objective

Scope (in particular, what is NOT to be done)

Functionality (from the end-user’s point of view)

Users

Use cases (as text, not necessarily as diagrams)

Main data (in our case ”modelling concepts”, ”extra 3D info”)

Platform (HW/SW)

Glossary of main terms

Readable without

any other

documents.

Page 11: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

11 SE 2 (02162 e15), L03

Project Definition: Contents

Partners

Context

Objective

Scope (in particular, what is NOT to be done)

Functionality (from the end-users point of view)

Users

Use cases (as text, not necessarily as diagrams)

Main data (in our case ”modelling concepts”, ”extra 3D info”)

Platform (HW/SW)

Glossary of main terms

Page 12: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

2. Requirements Specification

Page 13: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

13 SE 2 (02162 e15), L03

Specifying Software

Project Definition

Requirements Specification

rough

detailed

Systems specification

Complete Models

Implementation, Documentation

Handbook

Page 14: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

14 SE 2 (02162 e15), L03

What do we need?

What should be achieved by the product?

How is it used?

Which functions does it have?

Which data are there?

What interfaces should be there?

In which quality?

On which platform or technology?

Page 15: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

15 SE 2 (02162 e15), L03

Basic outline

Partners: Customer & Developer

1. Objectives

2. Product use

3. Product functions

4. Product characteristics (non-functional req.) Platform

Performance

Security

5. Glossary (could be included somewhere else)

Page 16: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

16 SE 2 (02162 e15), L03

Objective: purpose

Why is the software developed?

What should be achieved by using this

software?

(requires to set the context)

Page 17: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

17 SE 2 (02162 e15), L03

Objective: structure

Purpose of this document

Context & main (!) terms

Objectives of this product

Overview of this document

Page 18: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

18 SE 2 (02162 e15), L03

Product use: purpose

Basic understanding of how the product is

used!

Page 19: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

19 SE 2 (02162 e15), L03

Product use: structure

Main concepts

Types of users

Domain model

(no design/implementation details)

Main tasks

Platform & Interfaces

Page 20: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

20 SE 2 (02162 e15), L03

Excursion / Discussion

(OO) Analysis vs. (OO) Design

Page 21: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

21 SE 2 (02162 e15), L03

Product functions: purpose

Understanding of all functions of the product

(as seen by the end user)

Page 22: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

22 SE 2 (02162 e15), L03

Product functions: structure

Use cases + use case diagrams

Example dialogs (GUI)

Outline of steps for every use case

Exceptions

Variations

Page 23: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

23 SE 2 (02162 e15), L03

Product charact.: purpose

How will the software run?

In which environment?

Page 24: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

24 SE 2 (02162 e15), L03

Product charact.: structure

Usability

Platform

Standards

Performance

Maintenance / portability

Security

Page 25: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

25 SE 2 (02162 e15), L03

Other information

Used development methods / notations

Used tools

Used programming language

Page 26: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

26 SE 2 (02162 e15), L03

Glossary

List of all important concepts / terms of the

problem domain along with a brief

explanation

Page 27: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

27 SE 2 (02162 e15), L03

Specifying Software

Project Definition

Requirements Specification

rough

detailed

Systems specification

Complete Models

Implementation, Documentation

Handbook

Page 28: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

28 SE 2 (02162 e15), L03

Differences

Project definition / idea

Requirements specification

Rough

detailed

Systems specification

Text (possibly sketch of screen

shots); not complete

Use cases (named), glossary,

rough domain model

Use cases modelled and

explained, complete domain

model, GUI design (sketch),

acceptance tests

Architecture & design of

Software, detailed models,

software models

Page 29: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

3. Software Specification

Page 30: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

30 SE 2 (02162 e15), L03

Design Phase

Planning

phase

Definition

phase

Design

phase

Implem.

phase

Acceptance

phase

Mainten.

phase

Page 31: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

31 SE 2 (02162 e15), L03

Specifying Software

Goals:

Defining what the software should do (before it is

really there)

Customer and developer agree on what should be

delivered

Effort (resources and time) can be planned based

on that (contract will be based on that).

C-requirements D-requirements

Page 32: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

32 SE 2 (02162 e15), L03

Specifying Software

Project Idea

Requirements Specification

rough

detailed

Systems specification

Complete Models

Implementation, Documentation

Handbook

rough

detailed

what

how

Page 33: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

33 SE 2 (02162 e15), L03

Now: Software Specification

Goals:

Defining how the software should be technically

realized

In such detail that the implementation is

“details only”

C-requirements

D-requirements

Page 34: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

34 SE 2 (02162 e15), L03

Main issues

Software architecture /

implementation architecture

auxiliary systems and infrastructure

persistent storage of data (DB)

GUI

and the relation between them

(and the domain model).

Page 35: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

35 SE 2 (02162 e15), L03

Architecture

Software architecture:

Main components and sub-components of the

system

Interfaces (provided and required) of the

components

Implementation architecture:

Software architecture +

Platform, technology, and language specific details

Page 36: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

36 SE 2 (02162 e15), L03

Architecture

Notations:

Component diagrams

Class diagrams (refined)

Design patterns & their terminology

Sequence diagrams + state machines

Behaviour at

interfaces

Behaviour at

interfaces

Behaviour of

important components

or classes

Page 37: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

37 SE 2 (02162 e15), L03

Reminder: Component Diagrams

Component (on different

levels of granularity)

Provided interface

Required interface

Sub-components

(could be classes)

Page 38: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

38 SE 2 (02162 e15), L03

Design principles

Clearly identified functionality

Simplicity of interfaces

Loose coupling between different components

Performance / efficiency

Page 39: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

39 SE 2 (02162 e15), L03

Model refinements

Naming conventions

Directions of associations

Relaxed cardinalities

Proper containments ( serialization)

Visibilities of attributes and references

“Characteristics” ( EMF / DB Schema generation)

Auxiliary attributes, classes, and associations

(in EMF often generated automatically)

DB Schema

Page 40: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

40 SE 2 (02162 e15), L03

Excursion / Discussion

(OO) Analysis vs. (OO) Design

Page 41: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

41 SE 2 (02162 e15), L03

GUI

Sketch GUI visually

Associate GUI elements with model elements

Discuss main use cases in terms of GUI

(hand book)

Page 42: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

42 SE 2 (02162 e15), L03

Req Spec vs. Swt Spec

1. Objectives

2. Product use

3. Product functions

4. Product characteristics (non-functional req.) Platform

Performance

Security

5. …

6. Glossary

Page 43: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

43 SE 2 (02162 e15), L03

Excursion / Discussion

(OO) Analysis vs. (OO) Design

Page 44: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

4. On Writing Well

Page 45: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

45 SE 2 (02162 e15), L03

Motivation

Writing good texts is hard work!

Most of it can learned and is more

on about the writer’s attitude than on

talent:

What is the purpose?

What do I want to achieve?

Who is the reader?

How do I achieve my goals?

Page 46: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

46 SE 2 (02162 e15), L03

Motivation

Problems

The readers can’t ask the writer

The writer must foresee possible questions and

misunderstandings

(and take care of them)

The writer should not assume too much

The writer should not make implicit

assumptions or conclusions

Page 47: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

47 SE 2 (02162 e15), L03

Comprehensibility

When is a text comprehensibility?

Are there criteria for comprehensibility?

Langer, Schulz von Thun, Tausch:

„Sich verständlich ausdrücken!“

Page 48: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

48 SE 2 (02162 e15), L03

Criteria

Simplicity ( -- - 0 + ++ ) simple words

simple sentences

short sentences

concrete (e.g. by example)

Structuring ( -- - 0 + ++ ) one idea after the other

form and content are coherent

conclusive

Page 49: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

49 SE 2 (02162 e15), L03

Criteria

Conciseness ( -- - 0 + ++)

shortness

focussed on essentials

no empty words and sentences

Inspiring Additions ( -- - 0 + ++)

motivating

interesting

diversified

Page 50: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler Important issues

Set the scene / context:

Don’t assume anything (except readers pragmatics)

for granted

Different levels of abstraction:

Typical student mistake: always on the lowest level!!

Guide the reader:

Why do you say what you are saying

Bring the point (argument) home – completely!

”Spiralform writing”: blackboard

Writing linearly about a complex network of

concepts

50 SE 2 (02162 e15), L03

Page 51: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

51 SE 2 (02162 e15), L03

More rules (of thumb)

Important stuff first / high-lighted

strong verbs (avoid adjectives / adverbs)

short sentences

use singular whenever possible

familiar terms and expressions

use “active” wherever possible

clear headlines

Page 52: Software Engineering 2 (02162) · SE 2 (02162 e15), L03 7 Specifying Software Goals: Defining what the software should do before it is really there Customer and developer agree on

Ekkart Kindler

52 SE 2 (02162 e15), L03

Comprehensibility

The above criteria hold for almost all texts

For scientific texts:

consistent terminology (same term for same concept throughout the text):

My favourite counter example „Deutscher Fußballreporter“: Ball, Rund, Kulle, Leder, Ding, …

Same structure for alike structured content