
Indian developers shows immense interests in Generating Sequence Diagram from Code. In fact, about 10 % of the total projects Indian System Integrators get are around Documentation generation from legacy code.
There are tools that help you to generate Sequence diagram from source code to a good extent but their scope is only that of a function. That does not help much from the prospective of understanding the user interaction. However, it can only be used to understand if a function has a big enough business logic or some complex algorithms.
What people are looking for is a way in which you can generate sequence diagram across tiers and that for a full end-to-end scenario or a use case. Basically they want to generate sequence diagram showing UI classes, Business Logic objects all the way down to stored procedures all in one sequence diagram. I am yet to come across a tool that does it well. In fact it not so easy to achieve this because in order to generate such a sequence diagram, the tool has to have an understanding of the underlying system architecture. There could be 100s of combinations of different MVC choices and, in fact, to make it further complex custom MVC frameworks that the code may be implementing.
One of the way a UML sequence diagram from the running code can be created for the entire use case is by running it in profiling mode. One need to make sure to filter out lots of unwanted classes in that otherwise a sequence diagram with enormous number of classes on one diagram would be useless. Ultimately, you are going to get an image in this case, and not the model. That too would not cover the stored procedure or other database objects.
There are tools that help you to generate Sequence diagram from source code to a good extent but their scope is only that of a function. That does not help much from the prospective of understanding the user interaction. However, it can only be used to understand if a function has a big enough business logic or some complex algorithms.
What people are looking for is a way in which you can generate sequence diagram across tiers and that for a full end-to-end scenario or a use case. Basically they want to generate sequence diagram showing UI classes, Business Logic objects all the way down to stored procedures all in one sequence diagram. I am yet to come across a tool that does it well. In fact it not so easy to achieve this because in order to generate such a sequence diagram, the tool has to have an understanding of the underlying system architecture. There could be 100s of combinations of different MVC choices and, in fact, to make it further complex custom MVC frameworks that the code may be implementing.
One of the way a UML sequence diagram from the running code can be created for the entire use case is by running it in profiling mode. One need to make sure to filter out lots of unwanted classes in that otherwise a sequence diagram with enormous number of classes on one diagram would be useless. Ultimately, you are going to get an image in this case, and not the model. That too would not cover the stored procedure or other database objects.



