[Draft] ZenUML VS. PlantUML

Are you looking for an UML tool for your team? You might have used PlantUML which doesn’t solve your problem well, and wonder what ZenUML can give you. This post is going to give you some idea.

It’s assumed that you already have some knowledge of text to UML tools, if not, you can read why it’s trending here.

Diagram language

Both PlantUML and ZenUML use textual representation, known as Domain Specific Language(DSL) to render graphical UML diagrams.

The fact that UML models are stored as text simplifies their integration with a variety of tools (like version control systems) that software developers already use in their everyday work.

Let’s have a look at a simple example of the DSL in ZenUML:

Controller.getBookById(id) { BookService.getBy(id) }

Which is rendered as the following diagram:

 

The equivalent diagram in PlantUML looks like the following:

@startuml [-> Controller: getBookById(id) activate Controller Controller -> BookService: getById(id) activate BookService @enduml

 

You might find that the text representation in ZenUML is very similar to programming language like Java, which is very friendly for developers to use. More details about the syntax of the language can be found here: https://zenuml.atlassian.net/wiki/spaces/Doc/pages/518848513 .

Business model

PlantUML is a Java based open source tool. To use it you need to either download it as a standalone tool, or find a third party integration on a specific platform, e.g. Intellij IDEA, Confluence, etc. 

In contrast, ZenUML provide out-of-box products ranging from free tool to commercial product, such as online web app, Chrome extensionConfluence plugin and JetBrains plugin.

User experience

ZenUML is built with the core in web technology, it works purely at client side. As user types text in the editor, diagram is rendered in real time side by side, without the need of server interaction. This presents a smooth user experience on creating diagrams as rendering is very fast.

In comparison, PlantUML has a varying user experience depending on its third party integrations, and are usually not as fast as ZenUML.

Diagram styling

Typically, PlantUML produces diagram as picture(png, svg). ZenUML takes a different approach: It renders graphical diagram in the form of HTML DOM. The benefits are:

  1. You can apply any styles on it – different colors, borders, fonts and even handwritten styles.

2. You still can produce images from it. This is already supported in the Chrome Extension.

3. It is searchable. Participant names, messages are all text on the page. If you insert the diagram into another document, it is indexable.

Diagram types

Of course, PlantUML has been around for a long time, and ZenUML is new in this domain. Not surprisingly, you’ll find the support of more diagram types in PlantUML, and ZenUML has sequence diagram only at the moment.

But ZenUML is catching up on this area in its Confluence integration, by leveraging integration with Mermaid and mxGraph, which allows creation of more diagram types and generic graphs.


Closing thoughts

ZenUML is a faster diagraming tool with out-of-box products, and PlantUML is a more sophisticated open source tool with many third party integrations. Depending on your needs, you might find one or another suits better.