32
UML Diagrams for Web Developers David Kelleher Twitter: @david_kelleher Slideshare: www.slideshare.net/DaveKelleher/

Uml Diagrams for Web Developers

Embed Size (px)

Citation preview

Page 1: Uml Diagrams for Web Developers

UML Diagrams for Web DevelopersDavid Kelleher Twitter: @david_kelleherSlideshare: www.slideshare.net/DaveKelleher/

Page 2: Uml Diagrams for Web Developers

The Unified Modeling Language (UML),based on object-oriented concepts, is typically used for informal modeling of software systems.

Page 3: Uml Diagrams for Web Developers

UML Pros and Cons

Pros Cons

Effective at informally describing OO designs

Both complicated and limited

No other widely known alternatives exist for OO

Round trip to code was never practical

Page 4: Uml Diagrams for Web Developers

How to use UML

Validate your solutionBrainstorm with developersShare ideas with stakeholders

Limit size of diagramsUse only when necessary

Page 5: Uml Diagrams for Web Developers

Familiar elements

Boxes, arrows, and linesFlowchartsEntity diagramsSwimlanes

Page 6: Uml Diagrams for Web Developers

Boxes, Arrows, and Lines

A B

C D

relationship

flow

Page 7: Uml Diagrams for Web Developers

Boxes, Arrows, and Lines

A

CB

composition

Page 8: Uml Diagrams for Web Developers

FlowchartStart

Cook Tasty Crepe

Eat Tasty Crepe

End

Page 9: Uml Diagrams for Web Developers

SwimlaneSales Warehouse Billing

Get Order Check Stock

In Stock? Check Card

Valid?

Process CardDeliver

Cancel Order

Yes

Yes

NoNo

Page 10: Uml Diagrams for Web Developers

Relational Database Diagram

Car

idmanufacturermodelcolor…

Model

idname

1

Page 11: Uml Diagrams for Web Developers

Web System Composition

System – web applicationContainer – middle tier

serverService – API, microserviceClass – code implementation

Tip: Be cautious about mixing high and low level diagrams

Page 12: Uml Diagrams for Web Developers

UML Diagrams

Use CaseDeploymentSequenceActivityClassState

Page 13: Uml Diagrams for Web Developers

Use Case DiagramRepresents the interactions

between “actors” and parts of the system.

http://www.csci.csusb.edu/dick/cs557/r2.html

Association

Page 14: Uml Diagrams for Web Developers

Use Case Diagram

http://www.visual-paradigm.com/features/uml-and-sysml-modeling/

Page 15: Uml Diagrams for Web Developers

Deployment DiagramRepresents nodes (physical and

virtual devices), services and components, and connections of a system (i.e. 3-tier, microservice)

http://www.cs.bu.edu/fac/kfoury/CVS-Working-Files/CS511-Spring07/Handouts/HD27.how-to-draw-UML-diagrams.html

Page 16: Uml Diagrams for Web Developers

Deployment Diagram

https://pl.cs.jhu.edu/oose/projects/examples/10-group1/Iteration2.html

Page 17: Uml Diagrams for Web Developers

Sequence DiagramRepresents a process flow

(execution of actions with messages) using swimlanes

http://www.uml-diagrams.org/sequence-diagrams.html

message

returnmessage

Page 18: Uml Diagrams for Web Developers

SequenceDiagram

http://www.ibm.com/developerworks/jp/web/library/wa-aj-multitier2/

Page 19: Uml Diagrams for Web Developers

Activity DiagramRepresents a process flow as

a flowchart with concurrency

http://slideplayer.com/slide/4588309/

Page 20: Uml Diagrams for Web Developers

ActivityDiagram

https://www.lucidchart.com/pages/uml/activity-diagram

Page 21: Uml Diagrams for Web Developers

Class DiagramRepresents the classes in a

service or component, including properties, methods, and relationships among the classes

Page 22: Uml Diagrams for Web Developers

Class Diagram

https://www.gliffy.com/examples/uml/

Page 23: Uml Diagrams for Web Developers

Generalization: “is a”

Inheritance Relationship: A car battery “is a” product.

Page 24: Uml Diagrams for Web Developers

Realization: “implements”

Polymorphism: The Image class can be realized by any classthat implements the same interface, i.e. JPG and GIF classes.

Page 25: Uml Diagrams for Web Developers

Aggregation: “has a”

Whole-part relationship: a degree “has a” course.

Note: an instance of the part could be shared with multipleInstances of the whole

A course instance could be a part of many degree instances.If the degree program is deleted, the course would still exist.

Page 26: Uml Diagrams for Web Developers

Composition: “contains”

Whole-part relationship: a car “contains” an engine.

Note: an instance of the part cannot be shared with multipleInstances of the whole

An engine can be inside only one car at a time.

Page 27: Uml Diagrams for Web Developers

Association

A class instance has another kind of relationship withanother class instance.

The nature of the relationship can be labeled on the diagram.

A person “subscribes” to a magazine.

Page 28: Uml Diagrams for Web Developers

State DiagramRepresents the

change in state of a system, such as the different values that can be stored in a class property.

https://en.wikipedia.org/wiki/State_diagram

Page 29: Uml Diagrams for Web Developers

State Diagram

http://help.axcms.net/en_help_concepts_workflow.AxCMS

Page 30: Uml Diagrams for Web Developers

Diagramming is Design

Contrast – black on whiteRepetition – be consistentAlignment – snap to gridProximity – group related

items

Page 31: Uml Diagrams for Web Developers

Tools

Paper sketches

Drawing software like Visio, Illustrator

Online services like draw.io

Page 32: Uml Diagrams for Web Developers

UML Diagrams for Web DevelopersDavid Kelleher Twitter: @david_kelleherSlideshare: www.slideshare.net/DaveKelleher/