Creating UML Diagrams using PlantText
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/
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 DatabaseUser -> 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
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 laptopif (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.