Best Practices: Test Driven Development with SharePoint Slide Deck

In contrast to the Agile SharePoint development with Scrum session this was very light on the slides.  In good Agile tradition I adopted a Pair Programming approach with me at the keyboard and the audience been my code buddy.  Everyone was provided with a copy of Uncle Bobs Three rules of TDD to help with during the pairing process.  The rules state:

  1. You are not allowed to write any production code unless it is to make a failing unit test pass.
  2. You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are failures.
  3. You are not allowed to write any more production code than is sufficient to pass the one failing unit test.

I did have some slides to set the scene (see below), to give some background to TDD and raise the issues around the use of the word TEST.  We also looked at 10 reasons TDD sucks, with a slight SharePoint slant,  and quickly got into Visual Studio where the real learning was to happen.

The user story was to develop a Magic 8 Ball web part that could have custom answers defined in a SharePoint list.  The finished code is available on CodePlex and it is planned to extend this solution over time to expand on the ideas.  My main issue with just getting the finished code is the learning is in the process and it can be hard to see how the design was driven by the code.   I am planning to do a web cast on this to show this process.

CodePlex project now available  http://www.codeplex.com/sp8ball

Winners

The guys at Typemock we very generous in donating 3 copies of Isolator for SharePoint which is an essential component for anyone doing unit testing in a SharePoint environment.  The lucky winners were

Mark Freeman
Shahar Tamari
Kennedy Duncan

Each of you will receive a free license for Isolator for SharePoint,  for those that did not win Typemock are running a special discount.

This entry was posted in Agile, Development, SharePoint and tagged , , , . Bookmark the permalink.