Terje Sandstrom

------ Chief Software Geek at Inmeta Consulting in Scandinavia ----- and a Visual Studio ALM MVP

  Home  |   Contact  |   Syndication    |   Login
  38 Posts | 1 Stories | 18 Comments | 0 Trackbacks

News

Follow me on twitter: @OsirisTerje

Twitter












Tag Cloud


Article Categories

Archives

Post Categories

Image Galleries

Company stuff

Interesting bloggers

Interesting companies

Microsoft

Microsoft Norge

Microsoft Regional Directors

Microsoft Test

MSFT Blogs

MVP

NNUG

Other interesting stuff

TFS

Visual Studio

Wednesday, July 08, 2009 #

We have run 10 seminars with myself, Mikael Nitell and Jakob Ehn on TFS 2008 during the last two years. These seminars were made from the point of our company's experience with the TFS system.  We debated different aspects of it, and showed people how we had chosen to solve the different issues that arose.  These seminars took in the range of 4 hours, and we've had around 700 people all in all participating in these seminars, with very favorable feedback. 

Now in June, June 10th, we, myself and Mikael,  ran a new seminar on new features in TFS 2010. For this seminar we chose a different approach from the earlier series.  The earlier series consisted of quite a lot of power points, a nice series of demos, and a lot of talking.  We kept the talking, but reduced the powerpoints to near nil, and increased the demos to cover mostly the whole seminar.  To get this floating, we chose a kind of storytelling approach.  We made up a development story, started from scratch with requirements, and worked through modeling, coding, static code analysis, bugs, testing - in fact we managed to cover a lot of the new "Camano"/Test Edition, and we even managed to show the connections between test and specifications.  The approach neatly showed how good the new edition of Team System is to cover much more of the lifecycle of an application. 

The feedback from the seminar was very good, which proved to us that the storytelling approach did work.  So, if you weren't there, Microsoft Norway wanted to run this again, so you have a new chance the 15th of September, see the invitation here.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

There has always been a controversy between modeling and coding.  All from the point where models are to be turned into code automatically, through the state where models are written and then forgotten after coding has started, to the point where one generates models from the code.

To me, code and model is representations of the same thing - the problem to be solved, or the solution to the problem.  And when the solution matches the problem, which sometimes happens, all is well.

So the artifacts one make in a model IMHO it should be possible  to map to code.  I do believe that should be a strong guideline for which artifacts one uses in a model.  If that holds, one can always reverse engineer a model from code, at least to a certain degree.

In order to make the picture more complete when one uses Use Cases for specifications is to add navigation diagrams to the suite. The term is coined by Manassis I think, and it shows how the different GUI pages are navigated.  This takes form of a set of classes (one for each GUI page or independent part of a page) which depends on each other, where the dependency is named based on how you access the dependency. Ex.:  “Button: Create New”.    Although they say a use case diagram should be independent of the realization in form of GUI’s, I normally take a more pragmatic viewpoint, and connects these things together.  One is to make a software program after all – not a theoretical thesis.  I often connects a use case with a graphical page, or in some cases a page may encompass multiple use cases.  Anyway, by using tracing from the use cases to the GUI pages, those relationships are taken care of, and a relationship matrix can show which use cases and which GUI’s are not connected, thus revealing missing specifications.

So, the use cases links to user interfaces (or messages for a message based system). Since the logic for the use case is not to be engraved into the user interface it has to be the Controller (or presenter or service component) that orchestrates the use case steps, hopefully most of it delegated down to the domain model.  See Controller pattern within the GRASP patterns (Craig Larman).

Very often one uses the Use Case as the main work item for realizing a certain set of functionality, which encompass code on several layers, from the GUI layer, the controller layer, and on the domain layer, possibly also on the database layer. This duality, the use case both representing the code for the logic of the use case, and representing the whole work package for that behavior, is something I believe one just should accept, and not try to mitigate.  It really poses no big problems, and mitigation of this would probably only cause over-complexity in the work item tracking or model.  

Team System 2010 introduces the Layer Model, which can be used to enforce a more strict layering model in an application, making sure code is not placed inadvertently at the wrong layer, or crossing layer boundaries inappropriately.  When one starts to take layering more seriously one also needs to be clear on which artifacts relates to which code-layer.  The navigation diagram classes maps to GUI pages or GUI control classes.  The Use cases maps to Controller classes.  The domain model classes maps firstly to business class domain classes in code, and then, through some O/R mapping into a database model. Having a layering model, together with the necessary model elements, it should be possible to maintain a consistent relationship between model and code.  One can then use whatever view one chooses and finds most convenient, and be sure that code and model is in sync.  If the model then represents the specifications, the problem to be solved and the solution is also kept in sync.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

All these three terms are used to describe the behavior of an application.  They come from different process methodologies, and have different meanings, characteristics and are intended to be used differently.

Larry Guger also discuss these aspects and several others in his blog entries http://continuouslyintegrating.blogspot.com/2009/07/use-cases-and-visual-studio-2010-part-1.html and http://continuouslyintegrating.blogspot.com/2009/07/beginning-use-cases-identifying-actors.html.  

The Use Case is the term used in UML and in the different Unified Process based methodologies.  See http://en.wikipedia.org/wiki/Use_case for a good overall description.  A use case is often looked upon as a more formal way of describing behavior, and which has to be accompanied by a detailed description following certain rules.  However, a Use case can in fact be as light weight or as formal as one wants it to be.  I find that this depends more on the process methodology one uses more than characteristics of the use case itself.

The User Story comes from the Scrum based processes, and is meant as a short concise way of capturing a users need for a certain behavior.  See http://en.wikipedia.org/wiki/User_story for a useful description.

Scenarios comes as two different meanings, one is as a separate term used in agile modeling, see http://en.wikipedia.org/wiki/Scenario_(computing) for a description.  It is very equal to a User Story, but I tend to see it as a more general term.  The other meaning is as a certain path of actions for a use case.  One talks of a "happy path" scenario, or an alternate scenario. 

One can argue that a User Story can be converted into a Use Case, and there is a point in this.  A Use Case is meant to describe an application behavior, whereas a User Story is used more freely to catch behavior "as is" from the product owner.   This may lead to the case where multiple User Stories matches up to one Use Case, possibly as an Use Case with multiple scenarios, each scenario matching a User Story. 

In the TFS 2010 these terms are used at different places in the suite.  In the architect diagrams one can draw up a Use Case diagram, and in the Work Item store you can create User Stories.  You can even create a User Story item from the Use Case artifact in the Use Case diagram.  So these items can be related in TFS 2010.  However, since they are not coming from the same methodologies, the mixing of these can be confusing.  

I’m very pragmatic (even if I’m a theoretical guy), and I’ve noticed people have problems with these terms.  I often just say that it’s more important to catch the behavior aspect of the requirements, regardless of whether you call it Use Case, User Story or Scenario.  Scott Ambler has an interesting article on Agile Maturity (http://www.ibm.com/developerworks/blogs/page/ambler?entry=apmm_overview).  I’ve noticed the same thing, that dependent upon the maturity of the product owners, the developers (really all involved), one uses the process differently.  Also, dependent upon the size of the project, the maturity of the organization, the clarity of what is to be developed, and who’s the client and how is the contract specified, the need for formalized specifications vary based on these factors.   A use case specification is more formal, than a set of user stories.  Although as you so nicely shows, use stories can be converted into use cases.  I fully agree.  But I feel there is a one-to-many relationship between use case and user story.  And then I’m not quite sure if I want that within the TFS's work item system. It just becomes too much.

I tend to take a pragmatic approach to things like this, and just say that you could argue that these terms are "equal enough" to be used interchangeably.  In a real setting I would tend to try to catch as much as possible from a client (product owner) in terms of user stories, and during analysis convert these to Use Cases.  After having made my set of use cases, and made sure I had captured enough to start working with code, I would convert these into work items to start the show.  In order to make the terms less confusing, I would rename the User Story work item types into Use Case work item types.  No other changes really required.  And then I would simply use the actual User Stories as yellow notes in a customer meetings.

It is said that a Use Case need a more thorough specification, detailing the action steps it should take.  One thing I’ve started to recognize is that a set of test cases is very similar to a set of use case action steps, and should never be less than these steps.  So, to save on work to be done, one could simply skip the action steps, and just use the test cases with their steps as the specification.  It might be that the Microsoft guys have been thinking in this route when they connected the User Story so directly with the Test Cases.  It makes sense, and gives a leaner specification.  But, it makes the User Story look even more like a Use Case.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati

When I started blogging I made a decision to concentrate on technical stuff.  I would not write about personal things, not about what happened in my everyday life, not about my social life, not about personal trivia, but just keep it technical - write about software and software technology.  And keeping my personal life and my technical life separated seemed like a good idea, and shouldn't pose any problem what so ever. 

But, as everything in life, things doesn't work out quite the way one thinks.  My mother  got a cancer diagnostic last summer, she was operated - which went very well, or so it seemed just afterwards.  At the end of last year the cancer came back, and this time the doctors could not do anything more.  She was not at all prepared to die, but understood very well what was going to happen - that this was the end.  She just got weaker and weaker, and on the 29th of March she died. 

I hadn't expected to be so affected by my mother's death, but it surely hit me hard.  I just stopped blogging, twittering, and mostly everything came to a dead stop.  It has taken me a couple of months now to recover.  I knew that I would react to her death, but didn't expect it that hard.

I learned quite a lot more about myself during the process, and I learned what is important and not.  I stayed with my mother continusly during her last days - a week in fact, when she was almost all the time in coma, and I would never have done otherwise.  It was a good way of saying farewell. Just the moment when she woke up for some seconds, looked at me and said "I'm dreaming of you" and smiled....just that was worth more than anything. 

When I got back to work afterwards, which really had piled up too, most of it seemed unreal, and uninteresting.  It was really hard to get anything done. Now I'm starting to get out of it, and back to normal.  And summer holiday now will probably do me good too, get away from the rush of everyday life, and getting back more slowly.   I plan to write up a few blog entries now during summer, about things that have been turning around in my head during the last few months.  Especially the TFS 2010, and the beta which we have been playing with for some time now.  We also ran a seminar on the TFS 2010 now in June, which went very well. There are a lot of new goodies coming with the TFS 2010 release - I'm really looking forward to that release.

So, to sum it all up, "Hello World !   I'm back,  I think....."

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati