15

Does anybody use the Class Designer much in Visual Studio?

I have downloaded the Modeling Power Toys for 2005 and have been impressed with what I've seen so far. The MSDN Class Designer Blog doesn't seem to have been updated for a while but it still looks quite useful.

Is the Class Designer a quick way to build the basic application or should I just work out on paper and then start coding?

Thanks

David A Gibson
  • 2,013
  • 5
  • 35
  • 60

8 Answers8

18

As a visualization tool, or for exploratory purposes (drawing up multiple options to see what they look like) it's not bad, but generally I find the object browser does fine for most stuff I care about.

As a code generation tool, it's a terrible idea.

The whole idea that we will design all our code structure first, then fill in the blanks with small bits of implementation is fundamentally broken.

The only time you actually know what the code structure should look like, is if you've done the exact same thing before - however then you can just use your previous code, and you don't need to draw up any new code in any kind of designer.

If you decide ahead of time to use a particular class structure before you've actually tried to solve the problem, there is a 100% chance that you will pick the wrong design, and shoot yourself in the foot.

Orion Edwards
  • 121,657
  • 64
  • 239
  • 328
  • I think this answer is highly subjective. Class Diagram is a very important design tool. If you want to develop an complex application (which would undergo enhancement) then having a well thought of Class Diagram is inevitable. – Abhijeet Nagre Jan 20 '16 at 12:59
  • Class diagrams can be very valuable in initial design, but the point I wanted to make was that the low level structure will almost always change when you start coding, and so 'generating' your code from a visual designer is not useful – Orion Edwards Jan 22 '16 at 03:25
  • @Orion - The validity of your opinion on UML as a code generation tool depends on the personnel, technologies, and the project. I worked with a software engineer that was involved with forward code generation for several projects (no code was in the final build that wasn't forward generated). It cut their development cycle in half said he. You just have to think in UML and not in code. Although I do doubt that the VS designer would be a good tool for this. – Ian May 09 '16 at 17:44
6

Short answer: No.

Longer answer: No, not at all. There's a reason it hasn't been updated.

[EDIT] @ MrBrutal - Sorry - do you mean to generate code or just represent a design? Because I took your question as to generate code for you.

Iain Holder
  • 14,172
  • 10
  • 66
  • 86
2

I guess this is old, but I use it a lot. It could definitely be improved, but I find it extremely useful to be able to visualize my class structure, and to be able to jump to a specific class or method by clicking on it visually.

It's also slightly easier to add classes/interfaces with than the solution explorer, although the new files always end up in the root folder, instead of the same folder as the CD.

The main benefit I find is to be able to see a group of closely related classes at once. I think the best approach might be to have a single CD for each code folder/namespace.

Dave Cousineau
  • 12,154
  • 8
  • 64
  • 80
1

I've used it a couple of times to get some decent looking class diagrams to put in presentations/blogposts etc. But thats about it...

Any suggestions on other simple UML/class diagram tools that is easy to use and create some nice looking diagrams? Must be able to generate diagrams from .NET code.

Jonas Follesø
  • 6,441
  • 7
  • 41
  • 54
0

I have tried it out couple of times, mainly for viewing existing classes. If it would show all the relationships, it would be more usefull. Now it only shows inheritation.

Tuoski
  • 1,081
  • 3
  • 15
  • 15
0

I find it useful sometimes, more often for documentation afterwards.

It's a new little utility, but I don't think you get the full functionality in VS Pro - I think you need Architect's Edition.

Keith
  • 150,284
  • 78
  • 298
  • 434
0

The comments here suggest that few people find the class designer useful.

Amusing to note that Microsoft designed the class designer to be a useful replacement to useless UML (UML diagrams being untrustworthy once they lose synchronisation with source code).

The trouble with class diagrams is that they tell us what we already know.

Phil Bachmann
  • 373
  • 4
  • 11
0

I only use the class designer to display my existing classes, but I don't use it the other way, e.g., design your classes there then let it generate the code.

Jon Limjap
  • 94,284
  • 15
  • 101
  • 152