Modeling as a Productivity Enhancer in Visual Studio Team System

It's been a theme for me over the past couple of weeks where people have mentioned that they can't afford the time to do modeling. If you've done a lot of UML modeling, you know what I'm talking about. But it doesn't have to be that way. Now just to ward of the UML flames, even when UML modeling seems like a waste of time, it may actual pay for itself if you uncover a requirement or a design flaw that you wouldn't have otherwise. Certainly catching this kind of thing early than later pays for itself. But that's not what I'm talking about.

In my days as an ERwin/ERX user, doing data modeling was done in this tool not only because it was good to visualize something quickly before committing to code. Using ERwin/ERX was just plain faster than cutting DDL code manually - or heck, even using the Database diagramming in SQL Server. One simple feature was foreign key migration - you drew a relationship from parent to child and bam - it copied down the pk from the parent table and set it up as a fk on the child table.

For the VSTS class designer to be successful (or any of the designers for that matter) MS needs to make using them just plain faster than stubbing out the code manually. Visual Studio has a great editor so they have their work cut out for them. It gets even better with things like code snippets. Why not enable some of the code snippets in the class designer? I can still create a single field wrapped up by a public property faster in the code editor using a snippet (in C# “prop“) than using the class designer - but I don't see why they couldn't add support for that in the class designer too.

A feature I stumbled upon last week was the ability to override a member. Simply right click on the descended class, and select “Override Member“ and you'll see a list of members from the ancestor that are overridable. Select the member to override and bam - you have the code stub. This reminds me a bit of the Inherited Class Skeleton Generator. This represents the kinds of productivity features that can make models/designers more usable, even if just for productivity sake.

There are obviously some types of edits that are better performed in the code editor, such as actually editing code fragments. Other types of edits can be performed more appropriately in the model such as stubbing out the api/members of a class, overriding members, etc. Let's not forget the other types of edits which are much better done in a WYSIWYG designer such as the windows or web forms designer.

One thing I'd like to see come in the Class Designer is a flattened out view of a class that collapses all inherited members into one layer. I'll call this the consumer or intellisense view of a class. It's helpful for viewing the entire interface to a class so I can see how the whole thing makes sense to a user. I would propose a greyed out notation or perhaps a lock icon or something similar to the online help view of a class.

Comments

  • TrackBack March 15, 2005 3:29 AM

  • Barry Gervin March 20, 2005 1:08 AM

    Hi Barry,
    You raise excellent points regarding the areas where the Class Designer can really help developer productivity in the code generation scenarios. I couldn't agree more.

    However, class designer being a V1 product in Visual Studio, we had to make some hard choices on scenarios we want to focus on and successfully deliver them with high quality.

    Firstly, we wanted to make sure that class diagrams created are made relevant throughout the development cycle - too often we have heard complaints from developers using UML tools that while the class diagrams they create are great to do initial design, they often go out of date once actual development begins.

    Secondly, we wanted to make sure that creating and using class diagrams are easy and approachable to developers. The diagrams should speak the language the developers are familiar with - the language they program in.

    John Stallo, the Program Manager for Class Designer elaborates on these goals in his blog entry "A picture is worth a thousand words" (http://blogs.msdn.com/classdesigner/archive/2005/02/25/380023.aspx).

    With the main focus on these two goals, we had to cut back on some of the cool productivity features you list above in terms of initial class design. As you correctly point out, there are some types of edits that are better performed in the code editor and some that are intuitive to perform in the class designer. We picked a few of them - interface implementation, overriding members, etc.

    Integrating support for code snippets may be one thing we should have done but we missed. It was something we discussed but we didn't push hard enough to get it in. The same goes for grouping members based on interface implementation, code regions (although this was cut because of some technical difficulties).

    If you have the time please log bugs for your suggestions here: http://lab.msdn.microsoft.com/productfeedback/

    This will enable us to collect data on what features customers request the most.

    Cheers,
    Ramesh Rajagopal.
    Class Designer Team.

  • TrackBack March 20, 2005 1:15 AM

New Comments to this post are disabled