UML Sequence Diagram and Visual Studio

In this article I will introduce you to the UML Sequence Diagrams.
UML, as you now stands for Unified Modeling Language. So why sequence diagrams can be useful?

Recently I have been working on legacy project. And sequence diagram can really help you to figure out the application calling sequence.

Let's take this piece of code.

public partial class About : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var authorService = new AuthorService();
            this.Title = authorService.GetServerDateTime().ToString();
        }
    }

I believe that one picture is better that 100 words. So here is the same code but in UML Sequence Digram.
Simple UML Sequence Digram


I have tried a couple of free/open source tools that are designed to help you to create UML diagrams. I must say that they rather do not work, do not work well or they are too complicated to start with. From a bunch of applications for UML modelling I have marked for myself a few ones:

1) Microsoft Visio
2) Sparx Enterprise Architect
3) Visual Studio 2010 Ultimate

I have not tried Sparx Enterprice Architect, therefore I have nothing to say about it.
Microsoft Visio has toolbox with UML objects, and it is quite nice to draw UML diagrams for clients, but I am more interested in real output - i.e. I need to analyse existing application in order to know how it is working. Therefore I don't see big sense in drawing diagrams and decomposing application in manual way. Moreover, simply drawing these diagrams take too much effort & time as you need to dive deeply into each function and determine what it is calling another function, and so on, and so forth... And that is not a job the person should do.

So, this is here when software applications come in place.  What I like about Microsoft is that this company produces products that work well with each other. So all you need is to have Visual Studio 2010 Ultimate Edition(please do check the pricing first).

Pick "Generate Sequence Digram" for any method you are interested in.

And after few seconds you will get great(and often huge) UML sequential diagram of your application. And here is example how it looks.


And for me it is a great way to investigate any product/function I am interested it. Moreover, these diagrams will be of a great help for other software developers and systems architects. A simple and great product what simply does its job.

And the only thing is left it to think about on what device to print it :)

Comments

Popular posts from this blog