Creating UML Diagrams using PlantText

Ritesh Shergill
2 min readOct 15, 2022

--

Since time immemorial UML has existed to document various flows within your applications.

As technology has evolved, so too have the tools required to document what’s going to happen within your application.

Documenting flows can be a royal pain in the ass😡😡😡, so most companies brush it under the carpet because it’s time consuming and most of the documentation becomes irrelevant anyway once App development is underway — that’s because requirements keep changing and design time assumptions keep failing. So the design is always in a constant state of flux.

Thus, 🤢documentation🤢 is a pain and oft avoided.

But what if documentation was easier — you could do it just by typing words and arrows? Wouldn’t that make things a hell of a lot easier? Instead of spending hours drawing diagrams meticulously on a tool, you can just type out a few sentences and voila — you have a sequence diagram.😁😁😁

Thus I introduce a developer’s best friend for documentation — https://www.planttext.com/

Sequence Diagram

This is a simple sequence diagram created in planttext using the following DSL:

@startumltitle "Login sequence - Sequence Diagram"actor User
boundary "Web GUI" as GUI
database Database
User -> GUI : login(userId, password)
GUI -> UserService: checkUserLogin(userId, password)
UserService -> Database: findUser(userID)
alt user exists
UserService -> UserService: matchPassword()
alt password matches
UserService -> GUI: valid user
else invalid credentials
UserService -> GUI: invalid username password
end
else user does not exists
UserService -> GUI: Please register
end
@enduml
Activity Diagram

and this is a simple activity diagram created using the following DSL:

@startumltitle Shopping Cart - Activity Diagramstart:Search Laptop; 
note right: search for a specific laptop
if (Laptop found?) then (yes)
:Add to cart;
else (no)
:Change search criteria;
endif
:Continue Shopping;stop@enduml

Similarly, you can create

👉 Class Diagrams

👉 Component Diagrams

👉 Gantt Charts

👉 Mindmaps

and many more types of UML diagrams. And there already good examples to choose from and replicate, making the learning curve almost flat.

It takes minutes to create visual flows using PlantText.

So I suggest, stop making it sound like work and have fun creating design diagrams.

Use PlantText and let it flow!

--

--

Ritesh Shergill

Senior Data and Systems Architect | AI ML and Software Architecture Consultations | Career Guidance | Ex VP at JP Morgan Chase | Startup Mentor | Author