tags:

views:

101

answers:

7

Hi to all,

We have a very large app which has been designed exclusively by a single developer who is a bit reluctant to give too much information out on how it has been put together.

We were thinking about using a UML tool for educational purposes so others can start to learn and take ownership of the code but with the the large code base it may be difficult to work out how it all works.

My questions are:

  1. How would you go about educating others on a complex piece of framework?
  2. Will UML benefit?
  3. What UML tools are there for .net apps?
  4. Can UML tools auto-generate sequence diagrams and at least this will give more information on how the objects interact?

Any information provided will be greatly appreciated.

JD

+2  A: 
  1. Documentation. Create inline documentation and overall documentation with usage and examples. This is probably the best way for others to get insight into the framework;
  2. Maybe; depends on how you use the tool. Documentation might help more;
  3. We're using Enterprise Architect with relative success;
  4. Some of them can, yes. This really depends on what you are expecting to be generated.
Pieter
+1  A: 
  1. How would you go about educating others on a complex piece of framework?

One package or layer or module at a time. If decomposition helps to create the app, so can it help to learn.

  1. Will UML benefit?

Perhaps. Complex diagrams might not be much benefit. Find the sweet spot where graphical presentation gives you the ideas.

  1. What UML tools are there for .net apps?

All of them. UML is framework agnostic. Most support Java EE and .NET.

  1. Can UML tools auto-generate sequence diagrams and at least this will give more information on how the objects interact?

Sparx Enterprise Architect can.

duffymo
Hi Duffymo, I have downloaded Sparx Enterprise Architect trial version but apart from importing a module which generates class diagrams, how can I see the generated Sequence diagrams (this is for a .net C# binary)?
JD
They don't come automagically. You have to actually step through the code running in a CLR. I don't have it in front of me, so I can't walk you through it. Check out their help - it's not bad.
duffymo
+3  A: 
  1. No single answer to this. Diagrams can help with overall structure. Writing Unit Tests can be very instructive in understanding how it works, and provides an added bonus for subsequent evolution. And finally, just read the code.
  2. It can do. Class Diagrams can be very useful in understanding the static structure. Specifically visualising the relationships among classes - for me they're the "secret sauce". Sequence Diagrams and Activity Diagrams are useful for understanding behaviour.
  3. Visual Studio has UML tools built in (Ultimate edition?) which can auto-generate class and sequence diagrams.
  4. See above.

Overall though there's no magic bullet. Getting your head around a large body of code you're not familiar with will take time. I'd look at options to "removing the reluctance" on the part of the developer who knows it. Getting him (her) to run a series of tutorial sessions where (s)he goes through each element of the framework in turn would be hugely beneficial. Crucially, (s)he will be able to explain why certain things are as they are - which can be extremely valuable. No tool will give you that.

hth.

sfinnie
Thank you all. I am going with Altova UModel for now but all the points are taken on board and with addition to UML, unit testing (which I have been insisting on), inline coding and hopefully some tutorial sessions will help share the knowledge.
JD
A: 
  • Use Class diagrams

Visual Studio 2010 Ultimate Edition supports architecture and modeling.

  • Architecture Explorer
  • Layer Diagram and Dependency Validation
  • UML 2.0 Compliant Diagrams (Activity, Use Case, Sequence, Class, Component)

http://www.microsoft.com/visualstudio/en-us/products

Amir Rezaei
+1  A: 

1) How would you go about educating others on a complex piece of framework?

Answer: I wouldn't focus too much on UML specifics as your audience might get lost. I would suggests taking a look at UML Distilled, Third Edition as it will touch on the most important diagrams you can use, as well as how to use them. As others have said, unit tests (or integration tests if the code doesn't support it), and inline documentation could be very helpful too.

2) Will UML benefit?

Answer: This depends on the audience. Do they already know UML? If so it will likely help. Otherwise, anything but class diagrams and use cases may require you to do double duty (teach the program and UML).

3) What UML tools are there for .net apps?

Answer: I can't speak for anything other than UMLet. Yes, it's a java tool, but it has a standalone version. It makes it fairly easy to create diagrams. I use it instead of a white board for experimenting with designs. However, this tool would require you to manually create everything, which isn't what I think you are wanting. I did a bit of searching and came across StartUML, which is open source. It appears to be able to generate UML from c# code.

4) Can UML tools auto-generate sequence diagrams and at least this will give more information on how the objects interact?

Answer: Others have mentioned tools in VS2010 Ultimate and other programs regarding sequence diagrams. But if you don't have that version of the IDE (or want the other programs mentioned), VS2008 PRO can at least generate class diagrams for you, showing how they are related. If you do have VS2010 ultimate, here is an article on it.

Matt Spinelli
A: 

Borland Together and Eclispe extensions maybe are fine tools. Microsoft Visio is also a good tools that have many stencils, shared by professionals on internet

Jahangir Zinedine
+1  A: 

This is serious problem if the code has been developped by a single developer. You can try to reverse the full project and then ask him to explain in each package whiche are the strategic classes and methods. You also have javadoc but it is not as complete as UML.