top of page
Writer's pictureNick Montelibano

Diagrams.net & PlantUML - Two Tools to Cover All Diagram Needs

The more time spent in software, the more I realize how conveying design & architecture is just as important to the implementation. Without good visual documentation, products become un-usable and un-maintainable.

In terms of diagram tools, I've spent the entirety of my professional career designing all my diagrams in Visio. Whether it be system architecture, UML class diagrams, sequence diagrams, or just whiteboarding with colleagues. And I've gotta admit - nothing has a good of a balance of ease of use and major flexibility! I was always able to express what I was trying to get across in Visio, but it came with its own issues. Primarily,

  1. Whenever I wanted to share the source of the drawings with someone, I'd need to make sure they had Visio. And with the price of Office 365 at the time, it wasn't always a guarantee.

  2. As projects got huge, having to maintain and update huge diagrams got tedious

  3. Although flexible, it's clear it wasn't meant for software-specific diagrams

As I've began my independent adventure, I decided to not purchase Office 365 and try out new tools for my diagraming needs. Recommended to me by fellow developers were diagrams.net (previously draw.io and PlantUML. After spending some time in each tool, I wanted to share how I've used each tool. Here we go!

When it comes to free solutions to make diagrams, diagrams.net (which I'm still getting a hard time calling, as it's always been "draw.io" to me) comes up as the most accessible. After using it for some time, I can affirm that it really is! No software needed besides a modern web browser, no having to sign up for a 'premium' plan to do anything special, and a drag-and-drop UI that should be familiar to anyone that's used any diagram tool. You can save/send the source files for anyone to open, and it has great support for storing diagrams in Google Drive.


What diagrams.net excels at is whiteboarding a diagram rapidly. How often are you trying to explain something to a team, realize you can't get anywhere without some visuals, and decide to rev up some tool to get something drawn. In my opinion, diagrams.net excels at this. It's amazing how fast you can get going by dragging and dropping boxes, typing notes, connecting elements. They provide a plethora of basic shapes, and the ability to customize basically everything, down to a laundry list of "advanced" properties for every element.


Diagrams.net does however fall short in a few ways. First, there really isn't a good way to maintain history of the file. Unlike plant.uml, which you can track in source control due to it's human-readable markup language source, diagrams.net diagrams are xml. Although it can be source controlled, the markup cannot be easily modified without opening in the web app. Also like Visio, diagrams.net starts to fall apart when diagrams get large. When you want to make a small adjustment to a massive diagram, have fun moving layers around and trying to get the perfect anchor for your arrows. It's definitely doable, but just takes longer the bigger the diagrams become.

Diagrams.net tldr: free Visio alternative to quickly sketch ideas.


PlantUML proposes quite an enticing offering: how'd you like to develop diagrams the same way you describe web pages? Tired of having to drag and drop boxes, anchor arrows manually, finick with spacing to try to align things perfectly? PlantUML is here to save the day by providing a language to describe exactly how you want to visualize your diagrams, and a rendering engine to convert your descriptions into works of art (or just pictures, depending on how good you think your diagrams are). This approach of using markup language to render diagrams enables two things:

  1. Because the diagrams are re-rendered every time the markup changes, making changes to huge diagrams is just as easy as changing a single line of code and watching the renderer magically align everything to fit (usually) perfectly

  2. Because it's written for software (it's got UML in the name), all the bells and whistles are already there for designing anything you'd want to ever design in an architecture drawing

Because of these two things, PlantUML is absolutely perfect for when an architecture is mature enough to begin treating the design as a 'living document'. By that, I mean when you expect documents to start evolving. I.E., when you start to want to version each iteration of your architecture documents. As was mentioned, the fact that it's in markup makes source controlling the files a breeze.


Currently, PlantUML provides support to design the following diagrams:

  • UML Diagrams

    • Sequence diagram

    • Usecase diagram

    • Class diagram

    • Object diagram

    • Activity diagram (here is the legacy syntax)

    • Component diagram

    • Deployment diagram

    • State diagram

    • Timing diagram

  • Non-UML Diagrams

    • JSON data

    • YAML data

    • Network diagram (nwdiag)

    • Wireframe graphical interface or UI mockups (salt)

    • Archimate diagram

    • Specification and Description Language (SDL)

    • Ditaa diagram

    • Gantt diagram

    • MindMap diagram

    • Work Breakdown Structure diagram (WBS)

    • Mathematic with AsciiMath or JLaTeXMath notation

    • Entity Relationship diagram (IE/ER)

This means the scope of the tool is limited to these diagrams, but I'd be surprised if you can think of any other diagrams you'd need that can't fall under the scope of any of these. But this does lead me to the first issue I've experienced with PlantUML: you have to leave a lot of interpretation up to the renderer. If you don't like how it decided to put text exactly the way it did over the arrow, you're very limited to how you can try to tell it to adjust exactly where that text is. Luckily, in my experience, it generally does a very good job at putting text where it's most readable.



PlantUML tldr: When you want to get serious for diagramming and make clean, scalable diagrams from text only, PlantUML is the only way to go.

131 views0 comments

Recent Posts

See All

Comentários


bottom of page