|
Size: 766
Comment:
|
Size: 1953
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 3: | Line 3: |
| https://en.wikipedia.org/wiki/PlantUML | * https://en.wikipedia.org/wiki/PlantUML * http://www.plantuml.com/plantuml |
| Line 10: | Line 11: |
| Graphviz for windows https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.msi | |
| Line 12: | Line 16: |
| {{{#!highlight plantuml | {{attachment:classDiag.png}} {{{ |
| Line 40: | Line 45: |
== Sequence diagram example == {{attachment:seqDiag.png}} {{{ @startuml autonumber actor Xyz1 boundary Xyz2 control Xyz3 entity Xyz4 database Xyz5 /' comment -> synch call --> response ->> asynch call '/ Xyz1 -> Xyz2 : To boundary Xyz1 -> Xyz3 : To control Xyz1 -> Xyz4 : To entity Xyz1 -> Xyz5 : To database Xyz5 --> Xyz1 : To Foo1 @enduml }}} == Use case diagram example == {{attachment:useCaseDiag.png}} {{{ @startuml 'left to right direction 'skinparam packageStyle rect actor user actor admin rectangle System { user -- (search stuff) (search stuff) .> (show search fields) : include (help) .> (search stuff) : extends (search stuff) -- admin } @enduml }}} == Activity example == {{attachment:activityDiag.png}} {{{ @startuml (*) --> "First Activity" "First Activity" --> [label] "Second Activity" "Second Activity" --> "Third Activity" if "Activities are complete?" then --> [true] (*) else --> [false] "Second Activity" endif @enduml }}} |
PlantUML
wget http://vorboss.dl.sourceforge.net/project/plantuml/plantuml.jar
- java -Djava.awt.headless=true -jar ~/Downloads/plantuml.jar sequence1.txt
- requires graphviz (dot)
- java -Djava.awt.headless=true -jar ~/Downloads/plantuml.jar class1.txt
Graphviz for windows https://graphviz.gitlab.io/_pages/Download/windows/graphviz-2.38.msi
Class diagram
@startuml
class Car
interface ICar{
addWheel(Wheel w)
}
note "This is a floating note" as CarNote
CarNote .. Car
Driver - Car : drives >
Car *- Wheel : have 4 >
Car -- Person : < owns
/'
<|-- extends
-- association
..> depends
<|.. implements / realizes
'/
Car ..|> ICar
Car : engine : String
Car : startEngine()
@enduml
Sequence diagram example
@startuml autonumber actor Xyz1 boundary Xyz2 control Xyz3 entity Xyz4 database Xyz5 /' comment -> synch call --> response ->> asynch call '/ Xyz1 -> Xyz2 : To boundary Xyz1 -> Xyz3 : To control Xyz1 -> Xyz4 : To entity Xyz1 -> Xyz5 : To database Xyz5 --> Xyz1 : To Foo1 @enduml
Use case diagram example
@startuml
'left to right direction
'skinparam packageStyle rect
actor user
actor admin
rectangle System {
user -- (search stuff)
(search stuff) .> (show search fields) : include
(help) .> (search stuff) : extends
(search stuff) -- admin
}
@enduml
Activity example
@startuml
(*) --> "First Activity"
"First Activity" --> [label] "Second Activity"
"Second Activity" --> "Third Activity"
if "Activities are complete?" then
--> [true] (*)
else
--> [false] "Second Activity"
endif
@enduml