Saturday, October 02, 2004

Can sequence diagrams be any more simpler?

For some of the work we have been doing recently, I wanted to sketch small sequence diagrams to explain the flow.

As always the temptation is to launch Rational Rose. This time I hadn't set it up in my new laptop as I didn't want to bloat it with lots of software. Since I had heard about ArgoUML, I tried that next. It was very quick to launch it as it was Webstart enabled. But the sequence digramming option itself wasn't enabled for some reason. Docs weren't of help.

As always the better ideas come last to me. With so little brain cells I have left it is wonder that they even come . About a year ago as I was playing with AspectWerkz, I had integrated it with Sequence. At that time, I was doing this to draw the sequence digram on the fly as the code executes. We will talk about that in another post. This tool is really cool. I should suggest this to be Webstart enabled also. It has a very simple text syntax where you specify the sequence steps and it draws the digram for you. How can you do faster than this? Here is some simple text sequence I wrote and the digram below.


SomeObject.someCall {
Connection.prepareStatement(sql) -> preparedStatement {
ScopingAspect.around(connection, sql) -> preparedStatement {
SqlStatement.parse(sql) -> statement;
LegacyScoper."getScopeBy EntityName + ViewName"() -> condition;
LegacyScoper.[isEmpty]getScopeByViewName() -> condition;
LegacyScoper.[isEmpty]getScopeByEntityName() -> condition;
LegacyScoper.[isEmpty]getScopeByTableName() -> condition;
DefaultScoper.[isEmpty]getScope() -> condition;
SqlStatement.[isNotEmpty]addCondition(condition);
SqlStatement.toSql() -> sql;
Connection.proceed(sql) -> preparedStatement;
}
}
}




1 comment:

Karthik Krishnan said...

Boy :) Sequence Diagram is something I always looked for to understand a piece of program. The other day, Deepak had to create a dummy method and put some Exception and stack trace codes to find out the call stack.