Class designer

Posted on: August 16, 2006

I love the class designer that was added to Visual Studio 2005. Class design (and indeed application design as well) would ideally be divided into a series of related steps that if you follow them generates beautiful non-redundant, efficient and well segmented code. However, the nature and contents of these steps have been a hot topic for debate amongst developers for many many years, and consequently there are to this day a plethora of different “workflows” or “piplines” that you are free to pick and choose from.

Really though, if you simplify the whole process (a_Lot();) you end up with maybe 3-4 major steps.

  1. Design
  2. Implement
  3. Bugfix
  4. Document

And while for example UML and the likes of which may be great tools and guidelines for these steps when it comes to big development teams, long time projects or just simple vast oceans of code, they all tend to be a little bit to detailed and complicated for smaller developer teams and short projects that span say a month or so. To put it simply you end up spending more time drawing diagrams and formatting pictures for pretty print-outs, then actually designing and implementing code.

While I am a firm believer in thorough design and planning from start to finish in any project, one must also I think sometimes realize that a small project, or a project that might never make it to the market but is only executed for research or learning, might not survive the burden of all this great planning and thinking.

One big reason for this is I think the lack of really light-weight, easy to use UML tools and applications. Often you will simply spend to much time defining meta data about your project, and figuring out how to build good looking and easy to understand diagrams of your design (remember, one important point of tools like UML is the ability to communicate your thoughts and designs precisely to your other team members and peers). Also, the next step will be to implement the actual design that you draw so nicely in your UML diagram editor, and I have seen a lot of people who forget that drawing boxes and connecting them with lines is a whole lot easier and faster than actually writing the code that supposedly reflects these lines and boxes.

Enter the Class designer. A built in tool with VS2005 that lets you create, organize and manipulate classes, enums, structs, interfaces and so on in a graphical context with just the bear minimum of tools. Using the Class designer you create classes, define properties, encapsulate fields, add methods(with parameters) and define heritage and accessibility, all in a very intuitive and time efficient way.

Also, what is even better, the Class designer will actually create a bare bone implementation of your and reflect back to the code any changes that you make while designing. This makes it a very nice tool for creating unified diagrams of application and code design that can be easily shared with your co-workers, and it also servers as a very good overview of your code. Actually as my projects grow, I often find myself navigating to particular classes and methods using the Class diagram as a visual map of my code.

There are only to setbacks with the class designer as I see it today. First it does not support unmanaged languages like C/C++, and second if you add a class to your code with out using the class designer, the only way(?) to make it show up in the diagram is to regenerate it, thus loosing your layout and reverting to a standard grid layout of the classes… Hopefully this will be fixed some day…


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


This blog has no clear focus. It has a focus though, it's just not very clear at the moment...

Dev Env.

Visual Studio 2008 Prof / NUnit / Gallio / csUnit / STools (ExactMagic) / doxygen / dxCore / TypeMock / TestDriven.net / SequenceViz / CLRProfiler / Snoop / Reflector / Mole / FxCop / Subversion / TortoiseSVN / SlikSVN / CruiseControl.net / msbuild / nant

Blog Stats

  • 81,593 hits