Save time and energy with UML diagram generator tools online !

Introduction

During a software architecture report redaction, i was confronted to a major problem : I would generated some UML diagrams as « Use Case », « Class Diagram » and « Activity Diagram » but i didn’t have tools as Microsoft Office Visio or equivalent installed on my laptop. So i searched web tools to generate these diagrams easily.

What i found ?

First website i found was Web Sequence Diagram: [www.websequencediagrams.com][1]
Second website i found was yUML: [yuml.me][2]
Third website i found was KangaModeling: [kangamodeling.org][3]

Why these tools are powerful ?

1. Scriptable

These tools allow to describe what we want with a script language.

**Example with Web Sequence Diagram Tool  **: ** **

PLAIN
# Show Action with RoR
Browser->URL Routing : GET
URL Routing->Controller : show Action
Controller -> Model : find ( params[id] )
Model -> Controller : trigger
Controller -> Controller : Lookup Show View
Controller -> View : Render ( Show View, trigger )

View -> Model : getData()
Model -> Trigger (Physical Element) : request() : SNMP / SOAP / XMLRPC / …
Trigger (Physical Element) -> Model : response : XML / JSON / …
Model -> View : data

View->Browser : HTML
Click to expand and view more

Activity diagram image generated :

show Action RoR

**Example with Web Sequence Diagram Tool  **: ****

PLAIN
[User]-(Show a monitor)
[User]-(Show monitor’s parameters)
[Administrator] - (Manage a monitor)
[Administrator] - (Manage users)
(Manage a monitor)>(Delete a monitor)
(Manage a monitor)>(Update a monitor)
(Manage a monitor)>(Add a monitor)
(Manage users)<(LDAP Active Directory)
Click to expand and view more

Use case diagram image generated :

Use case generated with yUML

2. Integration with other services

Both tools integrate an API.

They allow to integrate images in your website with just a GET or POST request.

Example with yUML :

PLAIN
https://yuml.me/diagram/class/[Customer]->[Billing Address]
Click to expand and view more

Will generate :

Yuml

 3. Universal

Implementation with other language is very easy.

Example with Python implementation :

PYTHON
import urllib
import re

def getSequenceDiagram( text, outputFile, style = default ):
    request = {}
    request[message] = text
    request[style] = style
    request[apiVersion] = 1

    url = urllib.urlencode(request)

    f = urllib.urlopen(https://www.websequencediagrams.com/, url)
    line = f.readline()
    f.close()

    expr = re.compile((\?(img|pdf|png|svg)=[a-zA-Z0-9]+))
    m = expr.search(line)

    if m == None:
        print Invalid response from server.
        return False

    urllib.urlretrieve(https://www.websequencediagrams.com/ + m.group(),
            outputFile )
    return True

style = qsd
text = alice->bob: authentication request\nbob>alice: response
pngFile = out.png

getSequenceDiagram( text, pngFile, style )
Click to expand and view more

4. Others skills

  • Diagram generation by command line;
  • Output formats as png, jpg, pdf, json;
  • A lot of fork projects in different languages.

To resume, these tools will permit you to save time and energy. Exit graphic tools which are too much heavy, slow and onerous.

More…

Quentin Rousseau

Quentin Rousseau

CTO & Co-founder at Rootly (YC S21)

San Francisco, CA

Former Instacart SRE. Rock climber & wine enthusiast.

Start searching

Enter keywords to search articles

↑↓
ESC
⌘K Shortcut