Continued from http://dotnet.org.za/willy/archive/2008/05/28/rosario-april-2008-ctp-investigation-part-2-project-management.aspx.
It is important that I emphasise that these mini-posts present our, primarily my views, on TFS Rosario, from a real-world viewpoint and determining the potential value or lack thereof to our existing software development environment. It is not a "WOW" TechEd break-out session view, which typically gets management excited and the technical troops in the trenches into hot water! What is, however, important to highlight is that we are reviewing CTP (Community Technology Preview ) versions of the product ... it is not even BETA, it is a preview of what will or could be coming ... no guarantee and definitely no smooth sailing when it comes to bugs and "assumed" features.
If you were one of the TFS evangelists who just could not promote Team Architect in the past ... again I raise my hand and am getting ready for the flak from the Team Architect team ... should investigate the immense changes and improvements in Rosario. Team Architect team, before you launch those nukes, please take note of the Rosario rating at the end of this post.
A peek at ... architecture artifacts
I miss some, but looking at the templates in this CTP we can see:
- Logical class diagram
- Use case diagram
- Class diagram
- Component diagram
- Sequence diagram
... in fact, you should notice a number of UML diagrams and Rosario is delivering UML 2.1.1 support.
Starting at the beginning of the end, or is that the end of the beginning?
A quick detour through history ... when England defeated the sheer invincible and technically superior German Luftwaffe in the infamous "Battle of Britain" during the second world war, Churchill summed it up with and I quote: "This is not the end; it is not even the beginning of the end, but it is, perhaps, the end of the beginning".
I have this sneaking suspicion, that this is not the end for Team Architect either ... we are likely to be part of an amazing journey.
When you select View Menu in Visual Studio, you should spot the "Architecture Explorer". It allows you to do what we often have to do painstaking by hand ... reassemble the evidence when we are told, "there is the source repository, all the information of the system is in there". Gulp ... well, with the Architecture Explorer we are at least able to automate some of this painful exercise of exploring and reassembling the visual evidence.
In case you are wondering, you can either double-click a box in the diagram and beam yourself over to the source code, or continue refining the selection. In this case we will select select the payment class, taking us to the source of the payment class:
We note the comment "credit card processing code goes here" ... hhhmmmmmmm, right, it is probably time to define the requirements by defining one or more user stories, requirements, scenarios or other relevant work item types, based on your process template of choice.
In this case we would like to explore the next new diagram ... the use case diagram.
Use Case Management
1. Creating the use case diagram
Create a new use case diagram:
... "look mom, no Visio" ... we can add actors, use cases, notes, annotations, use case details ...
2. Creating an association of the use case with work items
To complete the circle of life, we have to associate the use case we have just created with a work item.
As shown, we use the Architecture Explorer, selecting the RosarioCtp12 TFS server --> TFS Projects --> CTP12-CMMI Team Project --> Query Hierarchy
--> Work Items --> Team Queries --> All Items. It is amazing what this new explorer allows us to do and we should take note that the model at the bottom can be displayed in a number of views, whereby we used the horizontal layout in the above case:
We select a work item, i.e. the functional "Customer must be able to make online payments" work item.
We select the work item and in the next column, select "Insert into active diagram" ... the columns in this architecture explorer seem to be endless:
We will notice that a TFS Work Item shape is added to the use case diagram:
? It would be great if I could spot the use case diagram as a link or attachment when viewing the work item, or select the work item shape and zoom over to the work item. It may be possible, but I have not been able to find a way ... yet.
We should feel the excitement by now ... so let's move to the next diagram.
Class Diagram ... on serious steroids
The one modelling tool that was great in 2005 and 2008 is the Class diagram. The seamless integration of the code and model is truly amazing and powerful, but the fact that we could only generate a model per project limited the value of the tool immensely ... in fact it has been a frustrating hindrance. Imagine looking at a space shuttle with two powerful outboard 2-stroke engine ... very limiting.
So let's review the latest class diagram, the logical class diagram.
We start with a solution containing three sample projects, namely a Windows Forms project, a Class Library project and a WCF Service library project.
We can create a physical class diagram ... nothing new here. We get project-specific class diagrams that have their specific value, but when designing and/or documenting a solution larger than the Windows calculator their value diminishes exponentially.
But when we select the following dialog, the magic begins...
We obtain a logical class diagram consisting of some or all of the classes contained in our physical models, which we can modify, i.e. we can change, add and remove operations and attributes, we can add relationships, associations, and dependencies and more...
? Can we synchronise the logical model with the physical models and thus the code base? Busy investigating ...
? What is the cause of the following error we have noticed while manipulating the models? Reported and waiting for guidance...

Sequence Diagram
Now for the final model we will review in this CTP ... the sequence diagram, which is an invaluable model when visualising the messages and lifetimes of objects and their collaboration.
1. Creating a sequence diagram from scratch
We select sequence diagram as a new item to the solution:
We can then use the SequenceDesigner toolbox to add lifelines and other artifacts to the empty sequence diagram. This is pretty straight forward and boring, so let's rather focus on creating a sequence diagram based on our logical sequence diagram.
2. Basing a sequencing diagram on existing code
We select the classes we want to work with on the logical class diagram, right click and select "create lifetime". We must then select the sequence diagram we want to work with ... in our case it is one and hence the decision is simple:
As we can see, the modelling tool creates lifetimes for each class we selected.
Next we add messages to the sequence diagram:
Next we select each message and select the relevant operation from the list of available operations in each case:
What do you mean we are missing a class? What? Scope creep? ... simple, we proceed as follows:
- Add missing lifeline.
- Right-click ... select create class, then select Logical Diagram.
... results in ...
- Add operations to the lifeline and hook up the beastie.
... results in ...
? is there a way of synchronising the methods added after creating the method from the sequence diagram, to the logical diagram? In other words, after method is visible in logical designer, is there any way of getting it back to the sequence diagram, without re-creating a lifetime?
The steps I had to do:
1. Select create method in sequence diagram.
2. Rename the method in the logical diagram.
3. Problem is that change is not synchronised with sequence diagram.
4. Create lifetime of object in sequence diagram.
5. Select correct operation on previous lifetime object in sequence diagram
... list is now up to date.
6. Delete the new lifetime we just added. - Voila, we are done.
Are you excited yet? If not, well parachuting out of fully functional aircraft is apparently an exhilarating experience ... I will chat with the pilot, land safely while the plane is functional and continue the happy hunting through the Rosario features. I, for one, am excited!
Conclusion
Support for UML is a welcome feature, as we have been wanting an integrated modelling experience in Visual Studio, without constantly having to switch over to Visio. Although I am not a Visio fanatic, I have been a regular user of Visio ... with Rosario this relationship will sour slightly, because I can now do my work in one integrated environment. The new features of Visual Studio Team Architect make it a product worth mentioning and evangelising as part of the Team Suite of products. In other words, Team Architect team, stand down, close the ICM missile covers and deactivate the targeting sequence.
My personal rating for the team architect improvements in Rosario at this stage is: 



/ 5 smiles.
The last two smiley's are not ecstatic as I am unable to find some of the diagrams I am aware of ... have to wait for future CTP releases. Also being Swiss, I would like more control in aligning and sizing shapes in the modelling tools, i.e. use case diagram.
I can sense the hatches are sliding open again ... stop, it is still a 5 smiley rating as there are no
's.
Next
... part 4 will look at Version Control.