PlantUML as go-to UML CASE tool

Author
Damian
Terlecki
5 minutes read
Misc

Throughout my working career as a software developer, including time spent at university, I had a chance to use various tools that aided software engineering. I think everyone can agree, that the most prominent ones in the domain of modelling are connected with UML (Unified Modeling Language) and BPMN (Business Process Model and Notation) tools. As developers, most often we use the former ones, while BPMN is more used by business people.

The list of the most popular, professional UML tools will certainly include applications like Visual Paradigm, Enterprise Architect, Lucidchart or something from IBM house — Rational Software Architect. The aforementioned provide support for most use cases including very complex projects and integrations with external products. But have you considered whether you really need such complex and sometimes clunky solutions for your project?

Sometimes you just need to create one diagram or a few small and independent ones. Maybe you're pressed on time and don't have anything set up yet? Back in the uni days, Draw.io was very popular among my colleagues. You know — this site — you open it in the browser, drag and drop and voilà! Painless modeling for your small project. But is it? I've never really been fond of drag&drop or WYSIWYG type of editors — at least not until I had the chance to use LaTeX or Markdown. At that point I realized that I can get the work done much faster using tools that utilize some kind declarative language that is closer to coding.

Fortunate I was, at the point of writing my first thesis, that I found out about PlantUML. A tool that allows to rapidly create consistent UML charts with just a few lines written in simple and intuitive language.

Bob->Alice : hello

PlantUML alice->bob image

Easy, wasn't it? It doesn't end here. You can just copy this line and paste it into an online application to get the chart in the most common formats. The elements are placed and adjusted automagically. Finally a tool which allows you to have so much fun during UML modeling, to the point where you want more. Oh, but let's not walk around with heads in the clouds. I've already created hundreds of charts using PlantUML so I can tell you more about the strengths and weaknesses of this tool.

Pros:

  • open source;
  • fast and easy UML charting after some initial learning;
  • no time lost on elements placement and size adjustments;
  • text format makes it easy to import and share diagrams (hello VCS);
  • online editors do not require any installation or setup;
  • the most common formats are supported, including lossless ones;
  • can be used as a library in Java code;
  • multiple integrations and plugins.

Cons:

  • complex cases require further reading of docs (e.g. sequence lifelines);
  • not every diagram might look like you require it (I had some problems with activity diagram for uni);
  • positioning is possible but limited for diagrams consisting of more elements;
  • it's more of a tool than an application (is it a con, though?).
Pedometer
Pedometer activity diagram

By the way, it takes one moment to translate the diagram thanks to aliases and text format. So that's pretty much my pick for small to medium projects and isolated diagrams. How about you? Do you have a favourite UML tool?