December 4, 2022

Plant UML

Quite often I need to examine some existing code to find a solution to a problem. Sometimes this requires going in detail about what calls what and when. However, usually the code your looking at has many calls to many other objects. We don't want the details of every single call, just the important ones. Here sequence diagrams are very useful to document this visually. I prefer to use PlantUML for this because it allows you to write the diagram as text, PlantUml takes care of spacing everything appropriately. You can just get your object name/type and the method called on it from your IDE.
PlantUML is found at this web address: https://www.plantuml.com/ .
Here is some good documentation on how to use it: https://crashedmind.github.io/PlantUMLHitchhikersGuide/ .
Here is an example of using Plant UML to create a sequence diagram in UML:

Here is the resulting image, click on it to open it full size:

No comments: