Save Time and Energy With UML Diagram Generator Tools Online !

| Comments

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  :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# 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

Activity diagram image generated :

show Action RoR

Example with Web Sequence Diagram Tool  : ****

1
2
3
4
5
6
7
8
[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)

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 :

1
http://yuml.me/diagram/class/[Customer]->[Billing Address]

Will generate :

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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(http://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(http://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 )

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…