plantuml

10
PlantUML 2014-7, Leo Liang

Upload: aleung

Post on 19-May-2015

662 views

Category:

Software


4 download

DESCRIPTION

Brief introduction to PlantUML.

TRANSCRIPT

Page 1: PlantUML

PlantUML

2014-7, Leo Liang

Page 2: PlantUML

actor useruser -> access ++ : getInfo() access -> access : authentication() access -> backend ++ : getInfo() backend -> dataStore : query() returnreturn

WriteDraw

Page 3: PlantUML

› Writing is sometimes easy than drawing– Keyboard typing is faster than mouse dragging– Copy and paste– Auto layout on generation

› Text is manageable than binary– Keep UML source inside code (javadoc) or document (slides etc.)

› Convenient for update afterward

– Track change by version control system› Merge is possible

– Integrate with other system, e.g. IDE, content management system.

Why Text Based?

Page 4: PlantUML

› Support all common UML diagrams– Sequence diagram Most Useful

– Class/object diagram Limitation in big diagram

– Use case diagram– Activity diagram / flow chart– Component diagram– State diagram

Yet Powerful

Page 5: PlantUML

Sequence

actor userboundary accessparticipant backenddatabase dataStore

user -> access ++ : getInfo() access -> access : authentication() note right: HTTP Basic or Digest access -> backend ++ : getInfo() loop for info categories backend -> dataStore : query() end returnreturn

Page 6: PlantUML

Class

hide empty fieldshide empty methods

class InvocationHistoryAspect <<aspect>>

class InvocationHistoryRecorder { + start(methodName): InvocationContext}

class InvocationContext { + finished(): void}

interface SamplingPolicyclass TimeBasedSampling implements SamplingPolicyclass NumberBasedSampling implements SamplingPolicy

InvocationHistoryRecorder .> InvocationContextInvocationContext ..> InvocationHistoryInvocationHistoryAspect --> InvocationHistoryRecorderInvocationHistoryInterceptor --> InvocationHistoryRecorderInvocationHistoryRecorder --> SamplingPolicy

Page 7: PlantUML

Activity

start

if (graphviz installed?) then (yes) :process all diagrams;else (no) :process only sequence and activity diagrams;endif

stop

Page 8: PlantUML

Component

node "Exposure" { PxMessaging -- [Messaging] PxLocation -- [Location] [Property Access CF][Messaging] -> [Property Access CF][Location] -> [Property Access CF]} node "Biz Admin" { GProvI -- [Provisioning]}

database "MySql" { folder "SIG-DB" { [Common Entities] }}

[Provisioning] --> [Common Entities][Property Access CF] --> [Common Entities]

Page 9: PlantUML

State

[*] --> NotShooting

state NotShooting { [*] --> Idle Idle --> Configuring : EvConfig Configuring --> Idle : EvConfig}

state Configuring { [*] --> NewValueSelection NewValueSelection --> NewValuePreview : EvNewValue NewValuePreview --> NewValueSelection : EvRejected NewValuePreview --> NewValueSelection : EvSaved state NewValuePreview { State1 -> State2 }}

Page 10: PlantUML

› Project home: document, download– http://www.plantuml.com/

› Online editor– http://www.plantuml.com/plantuml/form– http://www.planttext.com/planttext

› Integration– Eclipse: http://www.plantuml.com/eclipse.html– Jekyll: https://github.com/yjpark/jekyll-plantuml – More… http://www.plantuml.com/running.html

Resources