2.2. UML PlantUML
planUML
- Markdown extension
2.2.1. Class Diagram
@startuml
class Account {
- username
- password
+ login()
+ logout()
}
class User {
- firstname
- lastname
- email
+ change_firstname()
+ change_lastname()
+ change_email()
}
class Admin {
- is_active
- is_staff
- is_admin
+ add_user()
+ edit_user()
+ delete_user()
}
Account <|-- User
Account <|-- Admin
note as COMMENT
class User inherits from Account
class Admin inherits from Account
endnote
@enduml
2.2.2. Sequence Diagram
@startuml
autonumber
actor User
participant Server
database Database
activate User
User -> Server: HTTP Request
activate Server
Server -> Database: SQL Query
activate Database
Database --> Server: Result
deactivate Database
Server --> User: HTTP Response
deactivate Server
deactivate User
@enduml
@startuml
participant Participant as Foo
actor Actor as Foo1
boundary Boundary as Foo2
control Control as Foo3
entity Entity as Foo4
database Database as Foo5
collections Collections as Foo6
queue Queue as Foo7
Foo -> Foo1 : To actor
Foo -> Foo2 : To boundary
Foo -> Foo3 : To control
Foo -> Foo4 : To entity
Foo -> Foo5 : To database
Foo -> Foo6 : To collections
Foo -> Foo7: To queue
@enduml
2.2.3. Gantt
@startgantt
Project starts 2000-01-01
2000-01-26 to 2000-01-28 are colored in salmon
saturday are closed
sunday are closed
-- Version v1.0 --
[Prototype] starts 2000-01-05
[Prototype] lasts 18 days
[Prototype] is colored in Lavender
[Testing] starts 2000-01-31
[Testing] lasts 10 days
[Testing] is colored in LightBlue
-- Version v2.0 --
[MVP] starts 2000-01-15
[MVP] lasts 10 days
then [Test] lasts 5 days
@endgantt
@startgantt
<style>
ganttDiagram {
timeline {
LineColor transparent
FontColor transparent
}
}
</style>
hide footbox
[Test prototype] requires 7 days
[Prototype completed] happens at [Test prototype]'s end
[Setup assembly line] requires 9 days
[Setup assembly line] starts at [Test prototype]'s end
then [Setup] requires 5 days
[T2] requires 2 days and starts at [Test prototype]'s end
then [T3] requires 3 days
-- end task --
then [T4] requires 2 days
@endgantt
@startgantt
[foo] requires 21 days
[foo] is 40% completed
[bar] requires 30 days and is 10% complete
@endgantt
@startgantt
<style>
ganttDiagram {
task {
BackGroundColor GreenYellow
LineColor Green
unstarted {
BackGroundColor Fuchsia
LineColor FireBrick
}
}
}
</style>
[Prototype design] requires 7 days
[Test prototype 0] requires 4 days
[Test prototype 10] requires 4 days
[Test prototype 20] requires 4 days
[Test prototype 30] requires 4 days
[Test prototype 40] requires 4 days
[Test prototype 50] requires 4 days
[Test prototype 60] requires 4 days
[Test prototype 70] requires 4 days
[Test prototype 80] requires 4 days
[Test prototype 90] requires 4 days
[Test prototype 100] requires 4 days
[Test prototype 0] starts at [Prototype design]'s end
[Test prototype 10] starts at [Prototype design]'s end
[Test prototype 20] starts at [Prototype design]'s end
[Test prototype 30] starts at [Prototype design]'s end
[Test prototype 40] starts at [Prototype design]'s end
[Test prototype 50] starts at [Prototype design]'s end
[Test prototype 60] starts at [Prototype design]'s end
[Test prototype 70] starts at [Prototype design]'s end
[Test prototype 80] starts at [Prototype design]'s end
[Test prototype 90] starts at [Prototype design]'s end
[Test prototype 100] starts at [Prototype design]'s end
[Test prototype 0] is 0% complete
[Test prototype 10] is 10% complete
[Test prototype 20] is 20% complete
[Test prototype 30] is 30% complete
[Test prototype 40] is 40% complete
[Test prototype 50] is 50% complete
[Test prototype 60] is 60% complete
[Test prototype 70] is 70% complete
[Test prototype 80] is 80% complete
[Test prototype 90] is 90% complete
[Test prototype 100] is 100% complete
@endgantt
2.2.4. Theming
```plantuml
!theme plain
```