Using Quick Sequence Diagram Editor (sdedit) in your Delphi applications

My first article of the year is about Quick Sequence Diagram Editor (sdedit), a tool for creating UML sequence diagrams from textual descriptions of objects and messages that follow a really easy syntax. The ones who follow my blog will realise that I love logging details for my applications and with this component you will be able to create a nice sequence diagram from any of your real business scenarios. I have been dealing lately with loads of different multi-threaded applications and it was when doing some of my homework for Uni when I found this marvellous gem.
I have written a small and quite straight-forward wrapper in Delphi which will help you to generate the ".sdx" file and run the converter calling the library via java command. All the source code and examples can be found in my personal repository on Google code: thundax-delphi-personal-repository where I keep all my tests and things I want to try out.
With few easy callings, you can instantiate the TUML class and use "start" and "call" methods to generate things like this:

More complex example:


It is really useful when doing reports or to display any of your business scenarios in a nice way. One of my tasks was to create a small application which would send messages across different instances in a supercomputer and this is the best way I found to really present what was going on in there. You can generate huge diagrams and sdedit will cope with it.

Here is the piece of code for the wrapper:
And this is a more realistic approach, where we can have for example 3 different threads which will perform different operations at a different times. All of them are asynchronous and they use the TUML class to show how long every thread took to finish its processing.

Example:

A more realistic approach (Output):

I hope you find this article interesting enough to catch you attention as it is always good when finding tools like this an that are easy enough to integrate with any language and with great results.

Don't forget to leave your comment.

Jordi Corbilla

Comments

  1. Great stuff and I plan on implementing a test case right now. Fits perfectly with my current project!!!
    Thanks

    ReplyDelete
  2. Could you please publish the .sd-File of the last diagram? Would be helpful, since sdedit-example-files are rare. Thank you!

    ReplyDelete
    Replies
    1. Hi,
      Check out the source code in my google code page. There you will find the sd files. You can run the code and see what gets generated.
      Jordi

      Delete
  3. Very well explained! What is the diagram software you used to create sequence diagrams . If it is a online free to try, please specify. Thanks

    ReplyDelete

Post a Comment

Popular Posts