Drawing diagrams with PlantUML

Pros and Cons

With the basics covered, there are some general pros and cons to using PlantUML for creating diagrams.

PlantUML uses plain text, and very simple text at that. On one hand, this makes it extremely quick to write, without wasting time by clicking on countless options or dragging around lines and boxes.

On the other hand, this efficiency results in some loss of control. A PlantUML diagram is "inferred by a deterministic algorithm in the rendering process" [1]. Therefore, describing diagrams with text instead of just drawing them on your computer is like writing Markdown instead of using a word processor. While you can focus on your diagram's structure, the algorithms baked into PlantUML do the actual drawing. If the developers of the next PlantUML version decide to change those algorithms (or some of the graphic libraries), all your diagrams could assume a new look and feel when you upgrade, whether you like it or not.

While this may be a showstopper for some users, don't let it scare you, because there is nothing as reusable as a PlantUML diagram, and it has so many uses [8]. You can automatically create or process UML code with any major programming language. Above all, you can write, copy, and paste UML code in LibreOffice, Microsoft Office, WordPress, Etherpad, MediaWiki, and many other editors or content management systems. With the right plugins, all those programs will read that code and convert it into embedded diagrams without a hitch. What's not to like?

Infos

  1. PlantUML: http://www.plantuml.com
  2. PlantUML web server: http://www.plantuml.com/plantuml
  3. PlantUML command-line options: https://plantuml.com/command-line
  4. PlantBuddy diagram: https://github.com/anoff/plantbuddy
  5. PlantUML Reference Guide: http://plantuml.com/guide
  6. Open Iconic: https://useiconic.com/open
  7. Custom sprites: https://plantuml.com/sprite
  8. Using PlantUML: https://plantuml.com/running

The Author

Marco Fioretti (http://stop.zona-m.net) is a freelance author, trainer, and researcher based in Rome, Italy, who has been working with Free/Open Source software since 1995, and on open digital standards since 2005. Marco also is a board member of the Free Knowledge Institute (http://freeknowledge.eu).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News