I have been using Visual Studio for a LONG time! When I started looking at Windows Azure I was using VS2008. Then I moved on to VS2010 Beta and VS2010 Release Candidate. During the same time, of course, Azure (and the SDK) was also in flux. At each stage (as was to be expected) there were some slight changes required to keep my Azure projects working. Now Azure is a released product and Visual Studio 2010 is here! It was released last week at a Microsoft Launch Event in Las Vegas.
My experience so far with the VS2010 released version has been positive. Azure projects developed under RC1 continue to load, compile, deploy and run as before. That was a relief!
There are also some pretty cool features in VS2010 that I have started to use. One that I found particularly interesting is the capability to understand existing code by generating diagrams in a ”Modeling Project” that can be added to the solution. In the context of development of Learning Tree’s Windows Azure course I found this really useful.
For example, I am serving as a Technical Editor for the course. Let’s say Doug Rhenstrom, our course author, develops some code to be used in a case study. Part of my job is to review the code. In order to be able to review effectively I need to understand the code first. Note that this same scenario could also occur for any software developer coming into an existing project.
One option I have is to read through all the code and try to build up an understanding of how it works and how it all fits together. This is fine, except that for a large project there are often thousands of lines of code in several projects distributed across multiple assemblies. The process of manually going through all that code is tedious at best.
Using VS2010 with a few clicks of the mouse I can quickly generate compelling interactive diagrams that make it much easier for me to understand how the code works and how it is structured. Among the various diagram types I have found the Dependency Graph and the UML Sequence Diagram to be very useful.
A Dependency Graph shows how the various pieces of the solution fit together.
Figure 1 Dependency Graph for FlashCardsCloudService Solution
In this case I have chosen to show dependency by Namespace. You could also do it by Assembly, Class or a custom combination that might also include types, methods and external calls. In the diagram the grey arrows indicate dependency and the thickness of the line indicates the degree of coupling. For example there is relatively high coupling between FlashCardsWebRole and Externals but relatively low coupling between Generics and SilverlightFlashCards.
A UML Sequence Diagram, on the other hand, shows the call sequencing between various objects.
Figure 2 UML Sequence Diagram for WorkerRole Run method
Using diagrams such as these often results in faster and better high level understanding of the solution architecture.
For a quick demo of how these diagrams were created from the FlashCardsCloudService project in Visual Studio 2010 click here.