SlideShare a Scribd company logo
Index
Purpose of UML
• UML = Unified Modeling Language (http://www.uml.org)
• UML provides a standard way for representing software systems. It brings
a common point of reference for establishing a discussion among the
different stakeholders of a software project.
• UML is used to support a software development process, e.g., the Rational
Unified Process (RUP).
• UML has been associated with the analysis of requirements. In agile
methodologies it serves as a tool for speeding up the discussion. Creating
and maintaining UML diagrams is not the purpose. “Their emphasis is on
selective communication rather than complete specification.” Martin Fowler
(http://martinfowler.com/bliki/UmlAsSketch.html). [1] Chapter 2.
UML diagrams overview
• Structural modeling diagrams: define the static architecture of a model.
• Class diagram
• Object diagram
• Package diagram
• Component diagram
• Composite diagram
• Deployment diagram
• Behavioral modeling diagrams: define the interaction among the elements within a model.
• Use case diagram
• Activity diagram
• Sequence diagram
• Communication diagram
• State machine diagram
• Timing diagram
• Interaction overview diagram
UML diagrams overview
UML diagram taxonomy. Source [1]
Structural modeling diagrams
Class diagram: identifies the types of objects and their relationship within the model.
Object diagram: models a snapshot of the system at certain point during the execution. Its aim
is to show the interaction of the instances at run time.
Package diagram: organizes the model in high level containers and defines the interaction
between them. Each container or package can contain other packages, but at the very last, a
package is modeled as an independent class diagram.
Component diagram: model a high level interaction between complex structures that are
composed by a group of classes. The interaction takes place by mean of well defined interfaces.
Composite diagram: provides another layer of abstraction to model the inner structure of an
element.
Deployment diagram: shows the architecture of the system by relating software with the
underlying hardware where it will run.
Behavioral modeling diagrams
Use case diagram: models the interaction between the user and the system. This diagram is
the entry point to define the functionality of the software that needs to be build.
Activity diagram: is used to model processes and workflows.
Sequence diagram: shows the exchange of messages along the time among objects of the
model.
Communication diagram: similar to sequence diagrams without using a timeline. This diagram
models the interaction of objects remarking the order in which the message exchange happens.
State machine diagram: models the execution of a system by representing the different states
and the path to reach them.
Timing diagram: mixes sequence and state diagrams. They are used when we need to
associate time restrictions to the different state. This diagram is quite used in electronic
engineering.
Interaction overview diagram: mixes activity and sequence diagrams. It is basically an activity
diagram where each activity is detailed as a sequence diagram.
Use cases
• A use case models the interaction between the user and the system. It is the entry point to
define the functionality of the software that needs to be build.
• “With use cases, concentrate your energy on their text rather than on the diagram. Despite the
fact that the UML has nothing to say about the use case text, it is the text that contains all the
value in the technique.” [1]
A text use case usually includes:
• Name and Description
• Requirements
• Constraints (pre, post, invariant conditions)
• Scenarios
• Scenario Diagrams
• Additional information.
Use cases
Actor: an agent that interacts with the system. It can be a person or another system.
Use case: represents a piece of behavior of the system from an external point of view.
Relationships
• <<include>>: to represent a use case that is always executed as part of a bigger use case.
• <<extend>>: to represent the variation of a use case under exceptional circumstances.
UML in practice
• The main idea is to use UML as a vehicle to implement good code.
• Going from an initial idea to working software involves a refinement process to understand the
details of the potential solution.
• Our suggested process starts by defining the functionality of the system to build relying on use
case diagrams. This will give us a good overview from the user perspective.
• Each use case will be refined by using different sequence diagrams. This will make us see
scenarios that we did not contemplate.
• The sequence diagram will give us a first hint of the needed entities that interact within certain
scenario. These entities can be modelled using an OO approach within a class diagram.
• Finally, the class diagram can be translated to the selected programming language.
• The process repeats until we reach a level that satisfies our expected solution.
UML in practice
Let’s see how to put this in practice with the following problem:
Implement the software control of an ATM machine for withdrawing cash.
As already said, we will work in the following order:
1. Use case diagram
2. Sequence diagram
3. Class diagram
4. Code
In the following we show one iteration of our process (code not included)
UML in practice
ATM - Use case diagram
UML in practice
ATM - Sequence diagram:
Withdraw use case
Successful scenario
UML in practice
ATM - Class diagram
Wrapping up
• UML is a mean not a purpose. Use it for speeding up your development.
• You might start coding directly because you know the solution quite clear, but maybe your team
does not.
• UML can serve as documentation. Keep your diagrams for future discussions or even for
refreshing your memory.
• Remember our refining process and take into account that you can jump between diagrams /
code in any way that best suits you. The following is just a suggestion:
References
Books
1. UML distilled: a brief guide to the standard object modeling language (3rd edition). Martin
Fowler.
2. Writing effective Use Cases. Alistair Cockburn.
CASE Tools
1. Visual Paradigm
2. Enterprise Architect
3. ArgoUML
Other references
1. UML 2.0 online tutorial by the University of Girona
2. http://www.uml-diagrams.org/

More Related Content

What's hot

Uml
UmlUml
Uml
anwitat
 
UML tutorial
UML tutorialUML tutorial
UML tutorial
Eliza Wright
 
UML Diagrams
UML  DiagramsUML  Diagrams
UML Diagrams
Rahul Pola
 
UML and Case study
UML and Case study UML and Case study
UML and Case study
Mihika-QA
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction Diagram
Niloy Rocker
 
Interaction overview and Profile UML Diagrams
Interaction overview and Profile UML DiagramsInteraction overview and Profile UML Diagrams
Interaction overview and Profile UML Diagrams
Husnain Safdar
 
Chapter9
Chapter9Chapter9
Chapter9
Dang Tuan
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
LOKENDRA PRAJAPATI
 
Function oriented design
Function oriented designFunction oriented design
Function oriented design
Vidhun T
 
M03 2 Behavioral Diagrams
M03 2 Behavioral DiagramsM03 2 Behavioral Diagrams
M03 2 Behavioral Diagrams
Dang Tuan
 
Unified modeling language
Unified modeling languageUnified modeling language
Unified modeling language
Murugeswari Ravi
 
Capturing System Behaviour
Capturing System BehaviourCapturing System Behaviour
Capturing System Behaviour
university of education,Lahore
 
Uml examples
Uml examplesUml examples
Uml examples
Ashenafi Workie
 
Week 5
Week 5Week 5
Unified Modeling Language (UML)
Unified Modeling Language (UML)Unified Modeling Language (UML)
Unified Modeling Language (UML)
Ajeng Savitri
 
software design principles
software design principlessoftware design principles
software design principles
Cristal Ngo
 
Lecture-03 Introduction to UML
Lecture-03 Introduction to UMLLecture-03 Introduction to UML
Lecture-03 Introduction to UML
artgreen
 
Se 381 - lec 22 - 24 - 12 may15 - modularity - i - coupling
Se 381 - lec 22 - 24  - 12 may15 - modularity - i - couplingSe 381 - lec 22 - 24  - 12 may15 - modularity - i - coupling
Se 381 - lec 22 - 24 - 12 may15 - modularity - i - coupling
babak danyal
 
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesionSe 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
babak danyal
 
Cohesion and coupling
Cohesion and couplingCohesion and coupling
Cohesion and coupling
Aprajita (Abbey) Singh
 

What's hot (20)

Uml
UmlUml
Uml
 
UML tutorial
UML tutorialUML tutorial
UML tutorial
 
UML Diagrams
UML  DiagramsUML  Diagrams
UML Diagrams
 
UML and Case study
UML and Case study UML and Case study
UML and Case study
 
Slide 4 Interaction Diagram
Slide 4 Interaction DiagramSlide 4 Interaction Diagram
Slide 4 Interaction Diagram
 
Interaction overview and Profile UML Diagrams
Interaction overview and Profile UML DiagramsInteraction overview and Profile UML Diagrams
Interaction overview and Profile UML Diagrams
 
Chapter9
Chapter9Chapter9
Chapter9
 
Activity diagram
Activity diagramActivity diagram
Activity diagram
 
Function oriented design
Function oriented designFunction oriented design
Function oriented design
 
M03 2 Behavioral Diagrams
M03 2 Behavioral DiagramsM03 2 Behavioral Diagrams
M03 2 Behavioral Diagrams
 
Unified modeling language
Unified modeling languageUnified modeling language
Unified modeling language
 
Capturing System Behaviour
Capturing System BehaviourCapturing System Behaviour
Capturing System Behaviour
 
Uml examples
Uml examplesUml examples
Uml examples
 
Week 5
Week 5Week 5
Week 5
 
Unified Modeling Language (UML)
Unified Modeling Language (UML)Unified Modeling Language (UML)
Unified Modeling Language (UML)
 
software design principles
software design principlessoftware design principles
software design principles
 
Lecture-03 Introduction to UML
Lecture-03 Introduction to UMLLecture-03 Introduction to UML
Lecture-03 Introduction to UML
 
Se 381 - lec 22 - 24 - 12 may15 - modularity - i - coupling
Se 381 - lec 22 - 24  - 12 may15 - modularity - i - couplingSe 381 - lec 22 - 24  - 12 may15 - modularity - i - coupling
Se 381 - lec 22 - 24 - 12 may15 - modularity - i - coupling
 
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesionSe 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
 
Cohesion and coupling
Cohesion and couplingCohesion and coupling
Cohesion and coupling
 

Viewers also liked

JES Social Media Portfolio
JES Social Media PortfolioJES Social Media Portfolio
JES Social Media Portfolio
Jessica Sheahan
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
Anna Sergienko
 
NCET Tech
NCET Tech NCET Tech
NCET Tech
Archersan
 
What is CPS?
What is CPS?What is CPS?
What is CPS?
sarah319
 
NCET UAS Luncheon - Nevada Dynamic - June 2015
NCET UAS Luncheon - Nevada Dynamic - June 2015NCET UAS Luncheon - Nevada Dynamic - June 2015
NCET UAS Luncheon - Nevada Dynamic - June 2015
Archersan
 
Soalan penilaian
Soalan penilaian Soalan penilaian
Soalan penilaian pkgrp
 
NCET Tech Bite - March 2015 - QuickBooks - Marie Gibson
NCET Tech Bite - March 2015 - QuickBooks - Marie GibsonNCET Tech Bite - March 2015 - QuickBooks - Marie Gibson
NCET Tech Bite - March 2015 - QuickBooks - Marie Gibson
Archersan
 
screen-less displays
screen-less displays screen-less displays
screen-less displays
Bhumika Varshney
 
mI rEvISta
mI rEvIStamI rEvISta
mI rEvISta
obed15
 
INFORM-Measuring and Monitoring Aircraft Turn Operations v3
INFORM-Measuring and Monitoring Aircraft Turn Operations v3INFORM-Measuring and Monitoring Aircraft Turn Operations v3
INFORM-Measuring and Monitoring Aircraft Turn Operations v3
David Foster
 
Ankin mot so chu y khi giai toan
Ankin mot so chu y khi giai toanAnkin mot so chu y khi giai toan
Ankin mot so chu y khi giai toan
haiph121
 

Viewers also liked (11)

JES Social Media Portfolio
JES Social Media PortfolioJES Social Media Portfolio
JES Social Media Portfolio
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
NCET Tech
NCET Tech NCET Tech
NCET Tech
 
What is CPS?
What is CPS?What is CPS?
What is CPS?
 
NCET UAS Luncheon - Nevada Dynamic - June 2015
NCET UAS Luncheon - Nevada Dynamic - June 2015NCET UAS Luncheon - Nevada Dynamic - June 2015
NCET UAS Luncheon - Nevada Dynamic - June 2015
 
Soalan penilaian
Soalan penilaian Soalan penilaian
Soalan penilaian
 
NCET Tech Bite - March 2015 - QuickBooks - Marie Gibson
NCET Tech Bite - March 2015 - QuickBooks - Marie GibsonNCET Tech Bite - March 2015 - QuickBooks - Marie Gibson
NCET Tech Bite - March 2015 - QuickBooks - Marie Gibson
 
screen-less displays
screen-less displays screen-less displays
screen-less displays
 
mI rEvISta
mI rEvIStamI rEvISta
mI rEvISta
 
INFORM-Measuring and Monitoring Aircraft Turn Operations v3
INFORM-Measuring and Monitoring Aircraft Turn Operations v3INFORM-Measuring and Monitoring Aircraft Turn Operations v3
INFORM-Measuring and Monitoring Aircraft Turn Operations v3
 
Ankin mot so chu y khi giai toan
Ankin mot so chu y khi giai toanAnkin mot so chu y khi giai toan
Ankin mot so chu y khi giai toan
 

Similar to Modeling software with UML

Design UML diagrams
Design UML diagramsDesign UML diagrams
Design UML diagrams
Neeraj Kaushik
 
Design UML diagrams
Design UML diagramsDesign UML diagrams
Design UML diagrams
Neeraj Kaushik
 
8.Unified Process Modelling.ppt of software engg
8.Unified Process Modelling.ppt  of software engg8.Unified Process Modelling.ppt  of software engg
8.Unified Process Modelling.ppt of software engg
SukhmanSingh91
 
Software Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdfSoftware Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdf
MeagGhn
 
Unit-II(STATIC UML DIAGRAMS).ppt
Unit-II(STATIC UML DIAGRAMS).pptUnit-II(STATIC UML DIAGRAMS).ppt
Unit-II(STATIC UML DIAGRAMS).ppt
ganeshkarthy
 
Case Study Uml
Case Study UmlCase Study Uml
Case Study Uml
ganesh12july
 
SE UML.ppt
SE UML.pptSE UML.ppt
SE UML.ppt
AliZaib71
 
Uml(unified modeling language) Homework Help
Uml(unified modeling language) Homework HelpUml(unified modeling language) Homework Help
Uml(unified modeling language) Homework Help
Steve Nash
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
barney92
 
Uml
UmlUml
Uml
anwitat
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
anasz3z3
 
Lect-4: UML diagrams - Unified Modeling Language - SPM
Lect-4: UML diagrams - Unified Modeling Language - SPMLect-4: UML diagrams - Unified Modeling Language - SPM
Lect-4: UML diagrams - Unified Modeling Language - SPM
Mubashir Ali
 
Cs8592 ooad unit 1
Cs8592 ooad unit 1Cs8592 ooad unit 1
Cs8592 ooad unit 1
VADUGANATHAND1
 
Cs8592 ooad unit 1
Cs8592 ooad unit 1Cs8592 ooad unit 1
Cs8592 ooad unit 1
MAYILVELKUMARPONNUSA
 
UML Diagrams.ppt
UML Diagrams.pptUML Diagrams.ppt
UML Diagrams.ppt
MuhammadjonRahmatull
 
Chap5 oodm-uml-part11
Chap5 oodm-uml-part11Chap5 oodm-uml-part11
Chap5 oodm-uml-part11
SJC
 
Chap5 oodm-uml-part1
Chap5 oodm-uml-part1Chap5 oodm-uml-part1
Chap5 oodm-uml-part1
SJC
 
Uml overview modified
Uml overview modifiedUml overview modified
Uml overview modified
senthilkumar_ak
 
Uml Diagrams
Uml DiagramsUml Diagrams
analysis and design with uml
analysis and design with umlanalysis and design with uml
analysis and design with uml
sabin kafle
 

Similar to Modeling software with UML (20)

Design UML diagrams
Design UML diagramsDesign UML diagrams
Design UML diagrams
 
Design UML diagrams
Design UML diagramsDesign UML diagrams
Design UML diagrams
 
8.Unified Process Modelling.ppt of software engg
8.Unified Process Modelling.ppt  of software engg8.Unified Process Modelling.ppt  of software engg
8.Unified Process Modelling.ppt of software engg
 
Software Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdfSoftware Engineering Tools and Practices.pdf
Software Engineering Tools and Practices.pdf
 
Unit-II(STATIC UML DIAGRAMS).ppt
Unit-II(STATIC UML DIAGRAMS).pptUnit-II(STATIC UML DIAGRAMS).ppt
Unit-II(STATIC UML DIAGRAMS).ppt
 
Case Study Uml
Case Study UmlCase Study Uml
Case Study Uml
 
SE UML.ppt
SE UML.pptSE UML.ppt
SE UML.ppt
 
Uml(unified modeling language) Homework Help
Uml(unified modeling language) Homework HelpUml(unified modeling language) Homework Help
Uml(unified modeling language) Homework Help
 
Uml diagrams
Uml diagramsUml diagrams
Uml diagrams
 
Uml
UmlUml
Uml
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
Lect-4: UML diagrams - Unified Modeling Language - SPM
Lect-4: UML diagrams - Unified Modeling Language - SPMLect-4: UML diagrams - Unified Modeling Language - SPM
Lect-4: UML diagrams - Unified Modeling Language - SPM
 
Cs8592 ooad unit 1
Cs8592 ooad unit 1Cs8592 ooad unit 1
Cs8592 ooad unit 1
 
Cs8592 ooad unit 1
Cs8592 ooad unit 1Cs8592 ooad unit 1
Cs8592 ooad unit 1
 
UML Diagrams.ppt
UML Diagrams.pptUML Diagrams.ppt
UML Diagrams.ppt
 
Chap5 oodm-uml-part11
Chap5 oodm-uml-part11Chap5 oodm-uml-part11
Chap5 oodm-uml-part11
 
Chap5 oodm-uml-part1
Chap5 oodm-uml-part1Chap5 oodm-uml-part1
Chap5 oodm-uml-part1
 
Uml overview modified
Uml overview modifiedUml overview modified
Uml overview modified
 
Uml Diagrams
Uml DiagramsUml Diagrams
Uml Diagrams
 
analysis and design with uml
analysis and design with umlanalysis and design with uml
analysis and design with uml
 

Recently uploaded

原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
Hornet Dynamics
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
ICS
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
aymanquadri279
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 

Recently uploaded (20)

原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
E-commerce Application Development Company.pdf
E-commerce Application Development Company.pdfE-commerce Application Development Company.pdf
E-commerce Application Development Company.pdf
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
Webinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for EmbeddedWebinar On-Demand: Using Flutter for Embedded
Webinar On-Demand: Using Flutter for Embedded
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 

Modeling software with UML

  • 1.
  • 3. Purpose of UML • UML = Unified Modeling Language (http://www.uml.org) • UML provides a standard way for representing software systems. It brings a common point of reference for establishing a discussion among the different stakeholders of a software project. • UML is used to support a software development process, e.g., the Rational Unified Process (RUP). • UML has been associated with the analysis of requirements. In agile methodologies it serves as a tool for speeding up the discussion. Creating and maintaining UML diagrams is not the purpose. “Their emphasis is on selective communication rather than complete specification.” Martin Fowler (http://martinfowler.com/bliki/UmlAsSketch.html). [1] Chapter 2.
  • 4. UML diagrams overview • Structural modeling diagrams: define the static architecture of a model. • Class diagram • Object diagram • Package diagram • Component diagram • Composite diagram • Deployment diagram • Behavioral modeling diagrams: define the interaction among the elements within a model. • Use case diagram • Activity diagram • Sequence diagram • Communication diagram • State machine diagram • Timing diagram • Interaction overview diagram
  • 5. UML diagrams overview UML diagram taxonomy. Source [1]
  • 6. Structural modeling diagrams Class diagram: identifies the types of objects and their relationship within the model. Object diagram: models a snapshot of the system at certain point during the execution. Its aim is to show the interaction of the instances at run time. Package diagram: organizes the model in high level containers and defines the interaction between them. Each container or package can contain other packages, but at the very last, a package is modeled as an independent class diagram. Component diagram: model a high level interaction between complex structures that are composed by a group of classes. The interaction takes place by mean of well defined interfaces. Composite diagram: provides another layer of abstraction to model the inner structure of an element. Deployment diagram: shows the architecture of the system by relating software with the underlying hardware where it will run.
  • 7. Behavioral modeling diagrams Use case diagram: models the interaction between the user and the system. This diagram is the entry point to define the functionality of the software that needs to be build. Activity diagram: is used to model processes and workflows. Sequence diagram: shows the exchange of messages along the time among objects of the model. Communication diagram: similar to sequence diagrams without using a timeline. This diagram models the interaction of objects remarking the order in which the message exchange happens. State machine diagram: models the execution of a system by representing the different states and the path to reach them. Timing diagram: mixes sequence and state diagrams. They are used when we need to associate time restrictions to the different state. This diagram is quite used in electronic engineering. Interaction overview diagram: mixes activity and sequence diagrams. It is basically an activity diagram where each activity is detailed as a sequence diagram.
  • 8. Use cases • A use case models the interaction between the user and the system. It is the entry point to define the functionality of the software that needs to be build. • “With use cases, concentrate your energy on their text rather than on the diagram. Despite the fact that the UML has nothing to say about the use case text, it is the text that contains all the value in the technique.” [1] A text use case usually includes: • Name and Description • Requirements • Constraints (pre, post, invariant conditions) • Scenarios • Scenario Diagrams • Additional information.
  • 9. Use cases Actor: an agent that interacts with the system. It can be a person or another system. Use case: represents a piece of behavior of the system from an external point of view. Relationships • <<include>>: to represent a use case that is always executed as part of a bigger use case. • <<extend>>: to represent the variation of a use case under exceptional circumstances.
  • 10. UML in practice • The main idea is to use UML as a vehicle to implement good code. • Going from an initial idea to working software involves a refinement process to understand the details of the potential solution. • Our suggested process starts by defining the functionality of the system to build relying on use case diagrams. This will give us a good overview from the user perspective. • Each use case will be refined by using different sequence diagrams. This will make us see scenarios that we did not contemplate. • The sequence diagram will give us a first hint of the needed entities that interact within certain scenario. These entities can be modelled using an OO approach within a class diagram. • Finally, the class diagram can be translated to the selected programming language. • The process repeats until we reach a level that satisfies our expected solution.
  • 11. UML in practice Let’s see how to put this in practice with the following problem: Implement the software control of an ATM machine for withdrawing cash. As already said, we will work in the following order: 1. Use case diagram 2. Sequence diagram 3. Class diagram 4. Code In the following we show one iteration of our process (code not included)
  • 12. UML in practice ATM - Use case diagram
  • 13. UML in practice ATM - Sequence diagram: Withdraw use case Successful scenario
  • 14. UML in practice ATM - Class diagram
  • 15. Wrapping up • UML is a mean not a purpose. Use it for speeding up your development. • You might start coding directly because you know the solution quite clear, but maybe your team does not. • UML can serve as documentation. Keep your diagrams for future discussions or even for refreshing your memory. • Remember our refining process and take into account that you can jump between diagrams / code in any way that best suits you. The following is just a suggestion:
  • 16. References Books 1. UML distilled: a brief guide to the standard object modeling language (3rd edition). Martin Fowler. 2. Writing effective Use Cases. Alistair Cockburn. CASE Tools 1. Visual Paradigm 2. Enterprise Architect 3. ArgoUML Other references 1. UML 2.0 online tutorial by the University of Girona 2. http://www.uml-diagrams.org/