DevConnections Day 4 (11:00 AM) – ActiveNick Delivers the Goods

I just got finished with a session by Nickolas Landry entitled “From UML to the Visual Studio 2005 Class Designer: New Tools for OOP, CBD and SOA” and I thought I’d post a few thoughts before my next session.

  • ActiveNick is a great presenter who did a masterful job communicating a ton of information in a short time. This was not a light topic, but I felt that he broke the meal down into several edible chunks that made sure none of us left with information overload.
  • The presentation was a great mix between slides and demos. The slides weren’t heavy and didn’t convey too much or too little information.

There were some great highlights from the presentation itself. Nick started with some arguments related to Visual and Domain Specific Languages and the UML:

  • Developers are visual and we need visual, Domain Specific Languages (DSLs) to understand and model software. A great proof of this is the need for whiteboards in every developer cubicle and conference room.
  • UML was created in 1996 to be that visual DSL, but how many of us actually use it to model our software products? Even for those of us that do use it, how many of us use it to generate code? Nick asked for hands on those two questions and only half of the 200 attendees actually model in the UML and less than 5 (people, not percent) actually try to generate code from the diagrams.
  • Basically, use of the UML has shown no significant increase in productivity, no significant change in the way we create apps and the language doesn’t address a number of key design issues in software (like database design, testing, deployment, component-based development and UI construction).
  • In addition, because the UML is technology-agnostic, you can’t cover language specific nuances or synchronize you models and code. This lack of synchronization between the UML diagrams we create and our code means that UML becomes useless as soon as scope- or feature-creep occurs.
  • But on the other side, if you introduce new stereotypes and tags to the UML to account for language-specific features, the UML is no longer Unified. Ever wonder why Microsoft has avoided integrating UML diagrams into the IDE? I think this talk really settled that for me.

So do we scrap the UML? Of course not. Agile development has been created as an adaptation of the UML to answer many of the concerns Nick surfaced above. But agile doesn’t answer issues related to our technology-specific development and the need for model-code synchronization. All hope is lost again… But wait! There is hope in the form of the new Visual Studio 2005 Class Designer, which comes packaged with the Standard Edition and above. Some specifics:

  • The new Class Designer was created to produce diagrams using UML artifacts, but it supports .NET design concepts and language nuances. It’s also strongly tied to the CLR type system.
  • The designer is fully integrated into VS 2005 and provides code gen and synchronization.
  • You can generate diagrams from code and use the designer as a great tool for refactoring.
  • It’s not a perfect tool and it doesn’t do everything. However, along with a code gen tool like CodeRush, the designer can really cut down development time for classes.

Some of the features of the tool are:

  • A way to visualize class hierarchies and their relationships. Basically, it does a great job of visually mocking my lack of skill in creating useful and reusable classes.
  • View/ Edit class details.
  • Roundtrip engineering between code and design.
  • And it supports all .NET language nuances.

But Microsoft isn’t trying to be a UML killer here. All they offer is the class diagram at this point and they have no plans to integrate other diagrams into the IDE. Visio is still their recommended tool for diagram creation with the UML (Although I would recommend a tool called Enterprise Architect by Sparx Systems). That being said, Nick recommends that we start using the new Class Designer for a number of reasons:

  • To understand existing code- While Nick was talking, I used the designer to load classes for a Windows Service app I created earlier this year. See my point above about being mocked by the tool.
  • Graphical class design- Seeing what we’re creating and have created has immeasurable value to most developers
  • Review and Refactor code- It’s not meant as a refactoring tool, per se, but it’s a great visual first pass for developers.
  • Documentation is always in sync- The best reason, in my mind. Synchronization means that scope- and feature-creep don’t render my hard documentation work useless.

Page 1 of 2 | Next page