ingegneria del software b

29
Software Engineering UML Prof. Agostino Poggi

Upload: others

Post on 23-Apr-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ingegneria del Software B

Software Engineering

UML

Prof. Agostino Poggi

Page 2: Ingegneria del Software B

University of Parma - 2Software Engineering – UMLProf. Agostino Poggi

UML

♦ Is the acronym of Unified Modeling Language (UML)

♦Has been defined in January 1997 and is in a continuous evolution

♦ Its last version (2.5) has been release in March 2015

♦ Is the standard language and notation system used to specify, construct, visualize and document models of software systems

♦ Is not a development methodology

Mc128k
Mc128k
Plugin eclipse "Papyrus"
Page 3: Ingegneria del Software B

University of Parma - 3Software Engineering – UMLProf. Agostino Poggi

Success Reasons (1/2)

♦Provides multiple diagrams for capturing different architectural views

♦ Is a standard language for visualizing, specifying, constructing, and documenting software systems

♦Provides tool support and interoperability improves in time, as UML, OCL, and XMI are still relatively young standards

Page 4: Ingegneria del Software B

University of Parma - 4Software Engineering – UMLProf. Agostino Poggi

Success Reasons (2/2)

0 20 40 60 80

Fewer Defects

Faster Development

Easier to maintain

Better

Requirements …

Improve Project

Communications

25

39

40

51

69

Source: BZ Research, August 2004

Page 5: Ingegneria del Software B

University of Parma - 5Software Engineering – UMLProf. Agostino Poggi

Contributors

Page 6: Ingegneria del Software B

University of Parma - 6Software Engineering – UMLProf. Agostino Poggi

UML Notation Features

♦Simple because it requires only a limited set of concepts and symbols

♦Expressive because it is applicable to a wide spectrum of systems and life cycle methods

♦Useful because it focuses only upon those necessary elements to software engineering

♦Consistent because the same concept and symbolshould be applied in the same fashion throughout

♦Extensible because users and tool builders should have some freedom to extend the notation

Page 7: Ingegneria del Software B

University of Parma - 7Software Engineering – UMLProf. Agostino Poggi

UML Specifications

♦ Infrastructure, the foundational language constructs

♦Superstructure, the user level constructs

♦Object Constraint Language (OCL), the formal language used to describe expressions on UML models

♦Diagram interchange, the means enabling a smooth and seamless exchange of documents compliant to the UML standard

Page 8: Ingegneria del Software B

University of Parma - 8Software Engineering – UMLProf. Agostino Poggi

UML Architecture

Page 9: Ingegneria del Software B

University of Parma - 9Software Engineering – UMLProf. Agostino Poggi

UML Diagram

Each diagram has a

frame, a content area

and a heading

The frame is a rectangle and is

used to denote a border

The heading is a string contained in a name

tag which is a rectangle with cut off corners

in the upper left hand corner of the frame

Mc128k
Ogni diagramma è inserito in un rettangolo (foglio di carta...)
Page 10: Ingegneria del Software B

University of Parma - 10Software Engineering – UMLProf. Agostino Poggi

Use Case View

♦Captures the requirements of a system

♦Describes use cases that provide value for the users

♦Essential use cases are used as proof of concept for implementation architecture

♦Use cases may be visualized in UML use case diagrams

♦Each use case may have multiple possible scenarios

♦Use case scenarios could be described

Using textual descriptions

Graphically, using UML behavioral diagrams

Page 11: Ingegneria del Software B

University of Parma - 11Software Engineering – UMLProf. Agostino Poggi

Structural View

♦Represents structural elements for implementing solution for defined requirements

♦Defines object-oriented analysis and design elements

♦Defines domain and solution vocabulary

♦Defines system decomposition into layers and subsystems

♦Defines interfaces of the system and its components

Page 12: Ingegneria del Software B

University of Parma - 12Software Engineering – UMLProf. Agostino Poggi

Behavioral View

♦Represents dynamic interaction between system components for implementing requirements

♦Shows distribution of responsibilities and allows to identify interaction and coupling bottlenecks

♦A means for discussing non-functional requirements

I.e., performance, maintenance, …

Page 13: Ingegneria del Software B

University of Parma - 13Software Engineering – UMLProf. Agostino Poggi

Implementation View

♦ Describes implementation artifacts of logical subsystems defined in structural view

♦ May include intermediate artifacts used in system construction (code files, libraries, data files, …)

♦ Defines dependencies between implementation components and their connections by required and provided interfaces

Page 14: Ingegneria del Software B

University of Parma - 14Software Engineering – UMLProf. Agostino Poggi

Environment View

♦Represents system hardware topology

♦Defines how software components are deployed on hardware nodes

♦Useful for analyzing non-functional requirements: reliability, scalability, security, …

♦Provides information for system installation and configuration

Page 15: Ingegneria del Software B

University of Parma - 15Software Engineering – UMLProf. Agostino Poggi

Structural ViewClass

Object

Composite structural

Package

Implementation View Composite structural

Component

UML Diagram Types

Behavioral ViewSequence

Communication

State

Activity

Timing

Interaction overview

Environment ViewDeployment

Use Case ViewUse Case

Page 16: Ingegneria del Software B

University of Parma - 16Software Engineering – UMLProf. Agostino Poggi

Use Case

Mc128k
Quello dentro il rettangolo è ciò che la software house fornisce, le entità esterne sono preesistenti
Mc128k
Attore, non necessariamente una persona, ma una entità
Mc128k
Senza punta = relazione di eredità
Mc128k
Incluso in make purchase, ma può essere anche utilizzato indipendentemente
Page 17: Ingegneria del Software B

University of Parma - 17Software Engineering – UMLProf. Agostino Poggi

Class Diagram

Page 18: Ingegneria del Software B

University of Parma - 18Software Engineering – UMLProf. Agostino Poggi

Object Diagram

Page 19: Ingegneria del Software B

University of Parma - 19Software Engineering – UMLProf. Agostino Poggi

Composite Structure Diagram

Mc128k
ella
Page 20: Ingegneria del Software B

University of Parma - 20Software Engineering – UMLProf. Agostino Poggi

Package Diagram

Mc128k
package = divisione funzionale, gerarchia di nomi per evitare conflitti
Mc128k
Non molto utilizzato
Page 21: Ingegneria del Software B

University of Parma - 21Software Engineering – UMLProf. Agostino Poggi

Activity Diagram

Mc128k
Definire processo di business che si vuole implementare. Circa un diagramma di flusso
Mc128k
Partenza
Mc128k
Punto finale
Mc128k
Fork ( parallelo) / join
Mc128k
Punti di decisione
Page 22: Ingegneria del Software B

University of Parma - 22Software Engineering – UMLProf. Agostino Poggi

State Diagram

Page 23: Ingegneria del Software B

University of Parma - 23Software Engineering – UMLProf. Agostino Poggi

Sequence Diagram

Page 24: Ingegneria del Software B

University of Parma - 24Software Engineering – UMLProf. Agostino Poggi

Communication Diagram

Mc128k
Meno utilizzato rispetto a sequence diagram
Page 25: Ingegneria del Software B

University of Parma - 25Software Engineering – UMLProf. Agostino Poggi

Timing Diagram

Mc128k
Per sistemi real time
Page 26: Ingegneria del Software B

University of Parma - 26Software Engineering – UMLProf. Agostino Poggi

Interaction Overview

Mc128k
Non si hanno solo attività ma anche altri diagrammi o riferimenti ad essi
Page 27: Ingegneria del Software B

University of Parma - 27Software Engineering – UMLProf. Agostino Poggi

Component Diagram

Mc128k
Interfaccia / serviziPer esempio studente usufruisce di dbaccess
Page 28: Ingegneria del Software B

University of Parma - 28Software Engineering – UMLProf. Agostino Poggi

Deployment Diagram

Page 29: Ingegneria del Software B

University of Parma - 29Software Engineering – UMLProf. Agostino Poggi

Use of UML DiagramsUse Statistics

Source: Seth Rosen, June 2010