PlantUML: Text-Based UML Drawing Tools

As a software architect, drawing UML diagram has become one of my activities. I used to use some of the popular drawing tools, like Ms Visio, Ms Visual Studio UML Designer, or IBM Enterprise Architect. However, I found that I had to spend too much time playing around with cosmetics, rather than the content itself.

Recently, one of my technical mentors advised me trying an open-source tools, named PlantUML. It’s a text-based drawing tools that enables drawing UML diagrams much more time-efficient. You can focus more on the content, rather than the beauty. If you happen to write a journal / paper, you must be familiar with LaTeX. Yes, this is a similar tools, but for drawing UML diagram.

PlantUML is not a WYSIWYG (What You See is What You Get) tools. That’s why, it’s bit challenging at the beginning to draw the UML. I needed to read some basic documentation of how to draw particular diagrams. However, after using it several times, I started to get used to it. It could save ~30% of my time to draw UML diagrams.

Why use PlantUML

Here are the three reasons I found why PlantUML can be useful:

Portable

The PlantUML file is a text file. It means that it can be highly portable across different machines and platforms. It’s like a code file, e.g., .cs, .java, .js, etc. You can easily copy the content to a different machin, then it will still generate a consistent output.

Version-control friendly

Because it is a text file – not a binary file, your version control tools will like it. You can do basic version control operations like diff, merge, even blame :D. It’s like your code file, nothing special

Fancy-enough graphics

Being a text-based file doesn’t mean that it cannot generate a beautiful graphic. PlantUML still can generate a reader-friendly diagram. Moreover, it has some basic enhancements, like coloring, font sizing, arrow positioning, etc.

Here is some example of UML diagrams generated from the PlantUML:

When not to use it

I believe that nothing can be a silver bullet. Neither can the PlantUML. Here are some reasons why you shouldn’t use PlantUML:

If you are a drag-n-drop guy

I know, if you are a (ex) windows user – like me, then leaving drag-n-drop habits will take time. PlantUML is designed not to be a drag-n-drop tools. So, if this makes you not productive, then you would better not dragging yourself into using PlantUML. :D

If your boss wants a flawless graphic

Some of us might appreciate the graphics much more than the content and the time. If your boss is one of them, then PlantUML is not a good choice for you. Eventhough it has costmetic enhancement features like colorization, it cannot give you an advanced control like component positioning, curved arrow, etc.

How to use PlantUML

There are several ways you can use PlantUML. You can use an online tools provided by its official site, or you can use it inside your favourite text editor / IDE.

Using Cloud Tools

The PlantUML website has an online text editor for drawing UML. Here are some steps:

  1. Go to http://www.plantuml.com/plantuml/
  2. Start writing code to draw the UML
  3. Click Submit
  4. You can see the UML generated on the screen

What is good about this is that you will get a long-and-ugly URL. This URL is unique and assigned to your drawing. You can save it in case you want to revise it in the near future.

Using Editor Plugins

PlantUML is also available in your favourite text editors. However, in this arcticle, I only pick my day-to-day text editor, Visual Studio Code. I think that this text editor has been the widely used text editor in the community.

How to install PlantUML on VSCode

Windows User

  1. Install Chocolatey by following this instruction. Please skip this step, if you already have it installed.
  2. Run cmd
  3. Type choco install plantuml
  4. Go to https://marketplace.visualstudio.com/items?itemName=jebbs.plantuml
  5. Install the VSCode extension

Mac User

  1. Install brew by following this instruction. Please skip this step, if you already have it installed.
  2. Run terminal
  3. Type brew install plantuml
  4. Go to https://marketplace.visualstudio.com/items?itemName=jebbs.plantuml
  5. Install the VSCode extension

How to use it

  1. On VSCode, create a new .wsd file
  2. Write the starting (@startuml) and the ending markups (@enduml)
  3. Write the PlantUML code
  4. Press alt+D (Windows) or opt+D (Mac) to generate the graphic

That’s it. Now you can maintain your UML diagrams in a repository inside your version control system.

Further reading

http://plantuml.com/

 

 

Tailoring ERP

Hufft.. Sudah lama saya tidak berbagi ilmu di bidang saya. Akhir-akhir ini memang kondisi hati masih belum stabil. Butuh banyak baca dan nulis artikel yang bertemakan motivasi. Yaps, Semester ini ada banyak serangan tugas merangkum paper. InsyaAllah, ke depan saya sempatkan untuk berbagi materi di sini.  

Ini adalah tugas rangkuman paper Topik Dalam Tata Kelola TI. Pengajarnya adalah Prof Riyanarto Sarno. Beliau adalah pakar di bidang Rekayasa Perangkat Lunak. Saya suka cara beliau menjelaskan. Beliau memulai dengan penjelasan secara garis besar dan manfaat umumnya. Kemudian dipersempit menuju topik bahasan tertentu.

Rangkuman ini menjelaskan Tailoring ERP, yakni cara sistem Enterprise Resource Planing dalam mengakomodasi berbagai kebutuhan perusahaan. Jika ditelisik lebih dalam, sistem ini bermanfaat untuk pengembangan UKM di Indonesia. Berikut rangkumannya.

Continue reading

Sistem Informasi Geografis

clip_image002Sistem Informasi Geografis (SIG) merupakan salah satu macam program computer yang memungkinkan pengguna untuk bekerja dengan menggunakan peta digital secara cepat dan fleksibel. [[1]] SIG biasanya digunakan untuk menampilkan informasi yang bersifat spasial, misalkan untuk menditeksi penyebaran penyakit demam berdarah, untuk mengetahui penyebaran penduduk, atau untuk melihat pemetaan cuaca. Dengan menggunakan SIG, informasi yang ditampilkan lebih jelas dan interaktif karena ditampilkan dengan menggunakan kakas bantu peta digital.

Continue reading

Transport Layer : Transport Service

Pendahuluan

clip_image002

Gambar 1. Lapisan Model OSI pada Jaringan Komputer

Lapisan transport dan lapisan network mengambil perananan penting dalam konsep lapisan OSI pada transmisi data. Lapisan ini merupakan intisari dari hirarki protokol jaringan. Network layer berperan untuk untuk menyediakan pengiriman paket secara end-to-end dengan menggunakan datagram dan lintasan virtual. Lapisan transport berperan untuk membangun lapisan network untuk dapat mentransfer data dari proses sumber ke proses tujuan. Pengiriman itu disesuaikan dengan level keandalan tertentu dan bersifat independen terhadap lapisan network yang sedang digunakan. Tanpa adanya lapisan transport, konsep keseluruhan dari protokol akan kurang berarti.

Continue reading