Geeks With Blogs

News Locations of visitors to this page


Graeme Reisinger Welcome to my Office. My Other Office.

A while back I was tasked with creating a class diagram for one of the applications created by my company.  While I knew there was a possibility I might have to manually create the diagram by hand, I knew this method would probably consume a lot of time.  I also knew there were third-party tools out there that automate some of these tasks.

The problem was, we didn't have any of these third-party diagramming tools.  There are a myriad number of reasons why a company might choose not to purchase these kinds of productivity-enhancing tools; at my workplace the deciding factor seems to be lack of time and money.

I decided to see if Visual Studio had anything to offer, expecting it to fall short in the richness of its features and capabilities.  I was pleasantly surprised to discover the opposite: Visual Studio offers quite a nice little package for class diagramming.  ***Note, the version of Visual Studio I'm referring to is VS 2005.  If I find better tools (third-party or inlcuded in subsequent releases of Visual Studio), I will update this post with my findings.

Here are a few of the features offered by the Visual Studio 2005 class diagram tool:

  1. You can use it to stub out your code, or ...
  2. You can capture all the class information for an already existing project without having to do any real work.  More on this later.
  3. The class designer stays up-to-date in real time.  No need to fuss with keeping everything in synch all the time, excepting perhaps the latest version of class diagram on people's desks.
  4. The VS class designer tool understands (and visually illustrates) all of the following:
    • Object Properties, members, methods, events, delegates, and nested types.
    • Object  inheritance.
    • Class types (abstract, interface, sealed)
    • Class metadata, for displaying (or creating) the documentation and comments associated with your code
    • Object relationships (I'm referring to the arrows depicted on most UML diagrams to express relationship between two or more objects)
  5. The class diagram you've created is exportable to .pdf or image types, so you can print and distrube copies of it freely, without having to install Visual Studio on every consumer's machine.

 

The nice thing about this tool is it is a big time-saver.  Whether you're coming from the design side of things, or whether you're wanting a class diagram for an existing code base, Visual Studio greatly reduces the time and effort required to accomplish either of these tasks.

I'll update this post later with pictures and a quick run-through of both processes.  For now, I hope you might find this article by Microsoft very helpful in the mean time.

http://msdn.microsoft.com/en-us/library/aa288743(VS.71).aspx

I hope you enjoy exploring the many features provided by Visual Studio class diagram tool!

Posted on Sunday, July 11, 2010 12:00 PM Architecture , C# and .NET | Back to top


Comments on this post: Stub out your project using Visual Studio's Class Diagram

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © HighAltitudeCoder | Powered by: GeeksWithBlogs.net