« Home | Monad/MSH » | The API War and Microsoft » | Carpal Tunnel » | Agile UML » | Disrespecting UML » | The Microsoft Visual C++ /clr Switch » | Just started »

Whidbey Class Designer

The May preview of Visual Studio 2005 (Whidbey) included some of the Whitehorse initiative functionality. As I'm particularly keen on UML diagrams as a means of communicating technical concepts between developers, getting to know the VS2005 class designer has been on the cards since it's preview availability. Recently I spent some time working with the class designer to help communicate the structure of some existing C# source code.

The class designer interaction was primarily oriented around creating a class diagram from a set of existing code. The VS2005 install went smoothly, but once up and running a number of crashes were experienced. The crash handling optionally transmits details to Microsoft for analysis. I have no problem with this but found that the volume of data transmitted was quite high. It took around 20 seconds to transmit on an ADSL link. This is probably related to the preview nature of the code i.e. extra detailed information sent for the preview code.

A lot of the crashes were found to be related to the use of a network drive (Samba on Linux, not that it should make any difference). Once the source code was copied to a local drive, many of the crash problems disappeared. Interestingly, the .NET 2.0 runtime didn't seem to have the option of changing the security level of the "Intranet Zone" to Full Trust. The maximum allowed was Medium Trust. This might be a problem when developing with source code from a local network drive. The existing source code was up and running on .NET 2.0 quickly - even with the use of a 3rd party component that was designed for .NET 1.0.

The VS2005 user interface seemed sluggish when compared to VS2003. Again, this is likely to be due to the preview nature of the code. Class diagrams are added as another item in a project and have a .cd suffix. Once a class diagram was created, it was simply a matter of dragging classes from the solution or class explorer onto the diagram. A couple of class diagrams were created from the existing C# code. The problems I experienced included:

  • No class events were displayed on the diagram. The class internals display in the preview was limited to fields, properties and methods. There may have been a way of choosing to display the events, but I couldn't find it.
  • There didn't seem to be a toolbox option of showing a dependancy between one class and another where the dependancy is purely in the class methods (the related class isn't referred to by the fields or properties). This ability to document dependencies is useful. Automatically identifying the dependancies would be useful as well.
  • The relationship between a class and the interface(s) it implements is shown by the "lollipop" symbol. If you drag an interface on the diagram and show it's properties and methods, there is no "implements" association drawn.
  • For one of the class diagrams created, VS2005 refused to open the diagram after VS2005 was closed and started again. This only happened with one diagram but was frustrating as the diagram had to be created from scratch again.
  • Printing and copy/pasting of the class diagram doesn't appear to be supported as yet. The use of a screen capture utility helped get the diagrams out of VS2005 for passing onto a fellow developer.

Overall my impression was that the class designer functionality is still quite "raw", but very promising. The "look" of the resulting class diagram is impressive and I found the interface easy to use. For example, just right clicking on a Thread field and choosing a popup menu option allowed the relationship to the Thread class to be displayed as an association. If the class designer functionality could be automatically merged into the output of something like NDoc, then I'd be a very happy .NET developer.

Links to this post

Create a Link