cs 4500 software development - vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous...

16
CS Software Development [Overview of UML and Pair Programming] Ferdinand Vesely September , F. Vesely CS September , /

Upload: others

Post on 03-Mar-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous and active observation of driver’s work ˇ watches for defects ˇ alternatives

CS 4500Software Development

[Overview of UML and Pair Programming]

Ferdinand Vesely

September 13, 2019

F. Vesely CS 4500 September 13, 2019 1 / 16

Page 2: CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous and active observation of driver’s work ˇ watches for defects ˇ alternatives

Recall

1. Analyze the problem/requirements/scope2. Gather use cases3. Identify components and interactions4. Plan and build a minimal prototype5. Iteratively re�ne the prototype / add use cases

F. Vesely CS 4500 September 13, 2019 2 / 16

Page 3: CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous and active observation of driver’s work ˇ watches for defects ˇ alternatives

Communication

• Emphasized in this course• Shared understanding• Common language to communicate ideas

F. Vesely CS 4500 September 13, 2019 3 / 16

Page 4: CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous and active observation of driver’s work ˇ watches for defects ˇ alternatives

Visual• Faster to process• E�cient• Helps focus process

F. Vesely CS 4500 September 13, 2019 4 / 16

Page 5: CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous and active observation of driver’s work ˇ watches for defects ˇ alternatives

Uni�ed Modelling Language

• standardized (OMG, ISO), general-purpose visualmodelling language• developed in late 1990s• overseen by the Object Management Group• huge – spec is over 700 pages• associated with object-oriented methods• latest standard 2.5.1 from 2017

F. Vesely CS 4500 September 13, 2019 5 / 16

Page 6: CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous and active observation of driver’s work ˇ watches for defects ˇ alternatives

UML Diagrams

13 diagram types across 3 categories1. Structural

Ï models structure of systems

2. BehavioralÏ express behavior of systems

3. InteractionÏ express data and control �ow

F. Vesely CS 4500 September 13, 2019 6 / 16

Page 7: CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous and active observation of driver’s work ˇ watches for defects ˇ alternatives

Use Case Diagrams

Actor

Use Case

Actor – person or other system

F. Vesely CS 4500 September 13, 2019 7 / 16

Page 8: CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous and active observation of driver’s work ˇ watches for defects ˇ alternatives

Use Case Diagrams

Inventory Manager

Check status of goods

Re-order Customer

Pay for purchase

F. Vesely CS 4500 September 13, 2019 8 / 16

Page 9: CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous and active observation of driver’s work ˇ watches for defects ˇ alternatives

Sequence Diagrams• models �ow of data or control between components, subsystems,actors

present card

Customer

confirmpayment

acknowledgetransfer

Card terminal Bank

check

acknowledgefunds

F. Vesely CS 4500 September 13, 2019 9 / 16

Page 10: CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous and active observation of driver’s work ˇ watches for defects ˇ alternatives

Component Diagrams

• models components and their interfaces

InventoryProductPrice

Cash Register

Storage

ProductState

F. Vesely CS 4500 September 13, 2019 10 / 16

Page 11: CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous and active observation of driver’s work ˇ watches for defects ˇ alternatives

Other Diagram Types

• Structural:Ï class diagram, package diagram, object diagram, composite structurediagram, deployment diagram

• Behavioral:Ï activity diagram, state machine diagram

• Interaction:Ï communication diagram, interaction overview, timing diagram

F. Vesely CS 4500 September 13, 2019 11 / 16

Page 12: CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous and active observation of driver’s work ˇ watches for defects ˇ alternatives

UML Summary

• Standard language – aids communication• If you are using diagrams as part of design, might as well takeinspiration or use standardized ones1.->Not required though

• Plenty of tutorials available• Interesting use: code generation from diagrams

F. Vesely CS 4500 September 13, 2019 12 / 16

Page 13: CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous and active observation of driver’s work ˇ watches for defects ˇ alternatives

Pair Programming (Recap)

• 2 programmers, one keyboard / pencil / mouse• jointly produce one artifact – code, design• working “as one”

F. Vesely CS 4500 September 13, 2019 13 / 16

Page 14: CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous and active observation of driver’s work ˇ watches for defects ˇ alternatives

Pair Programming

1. driver: controls the keyboardÏ writes code or draws up design

2. observer (or navigator)Ï continuous and active observation of driver’s workÏ watches for defectsÏ alternativesÏ looking up resourcesÏ considering the bigger picture

F. Vesely CS 4500 September 13, 2019 14 / 16

Page 15: CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous and active observation of driver’s work ˇ watches for defects ˇ alternatives

Pair Programming

• Partners deliberately switch roles periodically• Wholly share ownership of the work• In general, people have unequal skills• Goal: use each others strengths and learn from each other.

F. Vesely CS 4500 September 13, 2019 15 / 16

Page 16: CS 4500 Software Development - Vesely · 2020. 12. 8. · 2.observer (or navigator) ˇ continuous and active observation of driver’s work ˇ watches for defects ˇ alternatives

Pair Programming – Why?

• Two pairs of eyes better than one.Ï design and programming is a thinking activity

• Overall, a slight increase in cost/time is o�set by less buggy in code• At any moment, (at least) two people are well familiar with the codebase

Ï better than having a single start developer with exclusive knowledgeÏ avoids problems with sta� turnaround

F. Vesely CS 4500 September 13, 2019 16 / 16