<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Agile Sharepoint development by 21apps and Andrew Woodward MVP &#187; Development</title>
	<atom:link href="http://www.21apps.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.21apps.com</link>
	<description></description>
	<lastBuildDate>Wed, 28 Jul 2010 10:19:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Automated UI Testing Tip &#8211; Automating deployment to Solutions Gallery</title>
		<link>http://www.21apps.com/sharepoint/ui-testing-tip1/</link>
		<comments>http://www.21apps.com/sharepoint/ui-testing-tip1/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 19:10:03 +0000</pubDate>
		<dc:creator>Andrew Woodward</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[21Scrum]]></category>
		<category><![CDATA[UI Testing]]></category>
		<category><![CDATA[VS2010]]></category>

		<guid isPermaLink="false">http://www.21apps.com/?p=1304</guid>
		<description><![CDATA[As part of the 21SCRUM development project I implemented build verification testing using Visual Studio 2010.  21SCRUM has a great suit of unit tests for the core logic,  it has some integration tests (although I would like more) but I found a lot of the coding was very targeted at the User Interface.  So much so that no real changes [...]]]></description>
			<content:encoded><![CDATA[<p>As part of the <a href="http://www.21scrum.com/" target="_blank">21SCRUM</a> development project I implemented build verification testing using Visual Studio 2010.  21SCRUM has a great suit of unit tests for the core logic,  it has some integration tests (although I would like more) but I found a lot of the coding was very targeted at the User Interface.  So much so that no real changes to the core logic have been made since the beta release.</p>
<p>The team did a number of Spike tests <sup>1</sup> to see if it was possible to do unit testing of the JavaScript code.  Unfortunately nothing that was looked at really provided the confidence or ease of use needed to become a part of the development process.</p>
<p>I have flirted with automated UI testing for a long time,  looking at WinRunner, Segue, QA Runner and various other tools along the way.  I actually remember doing UI testing against a FoxPro application that used OCR technology to verify the text on the screen.  The problem has always been that the tests are brittle, any slight changes to the UI and they break and it becomes a case of diminishing returns.  However having failed to find a good solution to unit testing the UI code I decided to give the new Visual Studio 2010 tools a look.</p>
<p>My first impressions were very good,  I actually changed the session I was doing at the SUGUK event in Wolverhampton due to being so impressed by the tools.  This post is going to be one of a number I do covering lessons learned as the team develop our test suite using these tools for real on 21SCRUM.  </p>
<p>The first lesson and one that you need to do before you start any UI testing is start from a known place.</p>
<h3>Start from a known place</h3>
<p>I quickly discovered that getting good, repeatable and maintainable automated UI tests to work over time you really have to make sure you always start at the same place.  This means no additional browser windows open,  no test web parts added to your pages, no left over&#8217;s from the last test or development.   </p>
<blockquote><p>One of the reasons I love Unit Testing is the isolation for any real environment or the need to go through a lot of setup and tear down steps.</p></blockquote>
<p>In order to do this properly and repeatedly you need to have a script that will refresh your test location.</p>
<p>The script used for 21SCRUM is simple and does the following:</p>
<ul>
<li>- Deletes the test site collection</li>
<li>- Create the test site collection based on required site template</li>
<li>- Uploads the 21SCRUM sandboxed solution to the Solution Gallery</li>
<li>- Activate the 21SCRUM solution</li>
</ul>
<p>These steps ensure that when the tests are run they always start from a clean site collection.   The script has been extended to provided sub sites and additional site collections but the changes are incremental and added as the tests demand.</p>
<h3>Powershell</h3>
<p>Like all good developers Powershell is the scripting language of choice.  Actually kicked off with a good old fashioned .bat file &lt;&lt;  interested to know if there are any alternatives to this?</p>
<p>The batch file RefreshSite.Bat  (powershell.exe is in my standard path)</p>
<pre>powershell -File RefreshSite.ps1</pre>
<p>The powershell script does the work</p>
<p><span style="font-family: Courier New;">//Load the SharePoint Commandlets</span></p>
<p><span style="font-family: Courier New;">Add-PSSnapin Microsoft.SharePoint.Powershell</span></p>
<p><span style="font-family: Courier New;">//Delete the site collection – don’t prompt the user to confirm</span></p>
<p><span style="font-family: Courier New;">Remove-SPSite -Identity &#8220;http://aberdovey.com&#8221; -Confirm:$false</span></p>
<p><span style="font-family: Courier New;">//Create a new site collection based on the Team Site Template</span></p>
<p><span style="font-family: Courier New;">Get-SPWebTemplate | Where{ $_.Title -eq &#8220;Team Site&#8221; } | ForEach-Object{ New-SPSite http://aberdovey.com –OwnerAlias DOMAIN\USER -Name &#8220;Aberdovey&#8221; -Template $_ } </span></p>
<p><span style="font-family: Courier New;">//Add the solution to the solution Gallery – it must have the full path name and not a relative path</span></p>
<p><a name="code-7"></a><span style="font-family: Courier New;">Add-SPUserSolution -LiteralPath C:\&lt;full path to the location of the WSP&gt;\21Scrum.Solution.wsp -Site http://aberdovey.com -Confirm:$false </span><a name="code-8"></a></p>
<p><span style="font-family: Courier New;">// Activate the solution – and yes Microsoft have done it again with the naming!  Install means Activate</span></p>
<p><span style="font-family: Courier New;">Install-SPUserSolution -Identity 21Scrum.Solution -Site http://aberdovey.com -Confirm:$false</span></p>
<p> </p>
<p>This simple command allows the refreshing of the environment to be run quickly and ensures the tests always start from a known place.</p>
<p> </p>
<blockquote><p><sup>1</sup> Spike Tests &#8211; short time-boxed pieces of work looking to prove an approach or providing additional knowledge to make estimates more accurate.</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.21apps.com/sharepoint/ui-testing-tip1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SharePoint 2010 ECMAScript &#8211; &#8216;b&#8217; is null or not an object</title>
		<link>http://www.21apps.com/development/sp2010-b-is-null/</link>
		<comments>http://www.21apps.com/development/sp2010-b-is-null/#comments</comments>
		<pubDate>Mon, 24 May 2010 13:30:15 +0000</pubDate>
		<dc:creator>Andrew Woodward</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[ECMAScript]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.21apps.com/?p=1278</guid>
		<description><![CDATA[I had to post this quick article as its one of those can&#8217;t see the wood for the trees.
I had been trying to do a simple call back to the server to display some information about a list item.
   getStory: function (id) {
    var backLogList = this.lists.getByTitle('BackLog');
     [...]]]></description>
			<content:encoded><![CDATA[<p>I had to post this quick article as its one of those can&#8217;t see the wood for the trees.</p>
<p>I had been trying to do a simple call back to the server to display some information about a list item.</p>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px;">   getStory: <span style="color: #0000ff">function</span> (id) {</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px;">    <span style="color: #0000ff">var</span> backLogList = <span style="color: #0000ff">this</span>.lists.getByTitle('BackLog');</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px;">        <span style="color: #0000ff">this</span>.itemToGet = backLogList.getItemById(id);</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px;">        context.executeQueryAsync(</pre>
<pre style="background-color: #ffff00; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px;">        Function.createDelegate(<span style="color: #0000ff">this</span>, com.apps.aberdovey.SprintPlanning.getStorySucceeed),</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px;">        Function.createDelegate(<span style="color: #0000ff">this</span>, com.apps.aberdovey.SprintPlanning.onFail));</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px;">    },</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px;">    getStorySucceed: <span style="color: #0000ff">function</span> (sender, args) {</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px;">    alert('got it');</pre>
<pre style="background-color: #ffffff; margin: 0em; width: 100%; font-family: consolas,'Courier New',courier,monospace; font-size: 11px;">    },</pre>
<p>The problem was I never got anything to happen.  My onFail() had an alert and I also showed an alert when the call succeeded.   But nothing.</p>
<p>I reverted to IE Dev toolbar where I kept getting the error</p>
<blockquote><p>&#8216;b&#8217; is null or not an object</p></blockquote>
<p>after spending time validating my calling code and cursing the lack of good examples on the web for SharePoint 2010 ECMAScript I eventually found it. </p>
<p>The delegate name for the getStorySucceed was spelt incorrectly!</p>
<p>It is amazing how much time you spend looking for stupid errors when doing JavaScript development.  This one I thought worth posting so that when other search for &#8216;b&#8217; is null or not an object they will at least have a better idea what&#8217;s wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.21apps.com/development/sp2010-b-is-null/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Call for common code &#8211; Can we unit test it</title>
		<link>http://www.21apps.com/sharepoint/call-for-common-code-can-we-unit-test-it/</link>
		<comments>http://www.21apps.com/sharepoint/call-for-common-code-can-we-unit-test-it/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 16:53:39 +0000</pubDate>
		<dc:creator>Andrew Woodward</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Pex]]></category>
		<category><![CDATA[Unit Testing]]></category>

		<guid isPermaLink="false">http://www.21apps.com/?p=1218</guid>
		<description><![CDATA[One of the challenges with unit testing SharePoint projects is the need to fake the calls into SharePoint.  If you are a regular reader of my blog you will have seen examples of how I have been doing this using Typemock Isolator. 
Microsoft have their own isolation framework called moles.  A more accurate descripition would be [...]]]></description>
			<content:encoded><![CDATA[<p>One of the challenges with unit testing SharePoint projects is the need to fake the calls into SharePoint.  If you are a regular reader of my blog you will have seen examples of how I have been doing this using Typemock Isolator. </p>
<p>Microsoft have their own isolation framework called moles.  A more accurate descripition would be isolation through detours and stubs.  Moles was developed to support <a href="http://research.microsoft.com/en-us/projects/pex/" target="_blank">Pex</a> white box testing and one interesting development from within the team has been Behaviours.  Behaviours are really a way to model the thing you want to isolate for the test without needing to define every isolation point. </p>
<p>Isolatation frameworks (regardless of technology) can result in brittle code, test code that is very tightly linked to the production code.   A simple change from List.GetItems() to List.Items[""] will cause the test to fail.</p>
<p>One of the samples provided with Pex is the modelling of SharePoint Behaviour that will make it much easier for people to be able to create robust tests with minimal or no additional isolation code needed.   Part of the work we are doing is to drive out the things that need to be modelled and reporting these to the Pex team.  It is not going to be easy to model the whole of SharePoint from day one,  however it should be possible to cover the areas most used.</p>
<p>This is where I would like some help.     Do you have any code that you use often,  code that you would like to unit test that takes a long time to isolate and that end up being brittle?</p>
<p>Please post examples here in the comments and we will try to get as much covered as possible.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.21apps.com/sharepoint/call-for-common-code-can-we-unit-test-it/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SharePoint Memory Leaks</title>
		<link>http://www.21apps.com/sharepoint/sharepoint-memory-leaks/</link>
		<comments>http://www.21apps.com/sharepoint/sharepoint-memory-leaks/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 22:16:29 +0000</pubDate>
		<dc:creator>Andrew Woodward</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.21apps.com/sharepoint/sharepoint-memory-leaks/</guid>
		<description><![CDATA[Normally I refrain for doing simple reposts of other people blogs,&#160; however having read the post SharePoint&#8217;s Sasquatch Memory Leak by Todd Carter I just had to help get the information out to as many people as possible.
We are all being good developers and running SPDisposeCheck regularly on our code to make sure we don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Normally I refrain for doing simple reposts of other people blogs,&#160; however having read the post <a href="http://todd-carter.com/post/2010/02/08/SharePointe28099s-Sasquatch-Memory-Leak.aspx" target="_blank">SharePoint&#8217;s Sasquatch Memory Leak</a> by Todd Carter I just had to help get the information out to as many people as possible.</p>
<p>We are all being good developers and running <a href="http://code.msdn.microsoft.com/SPDisposeCheck" target="_blank">SPDisposeCheck</a> regularly on our code to make sure we don&#8217;t leak memory,&#160; however for some we still experience spiralling memory leaks that seem untraceable.&#160; until Todd&#8217;s post that is.</p>
<p>Rather than hang around here you MUST <a href="http://todd-carter.com/post/2010/02/08/SharePointe28099s-Sasquatch-Memory-Leak.aspx" target="_blank">read it</a> now,&#160; and if your experiencing issues and have SPDisposeCheck&#8217;d your application to within an inch of it&#8217;s life with no success on controlling memory you will want to implement the workaround as soon as possible.</p>
<p>Big Thanks to Todd find Big Foot <img src='http://www.21apps.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.21apps.com/sharepoint/sharepoint-memory-leaks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Namespace not updated in SharePoint SPIs</title>
		<link>http://www.21apps.com/development/namespace-not-token-spis/</link>
		<comments>http://www.21apps.com/development/namespace-not-token-spis/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 09:54:48 +0000</pubDate>
		<dc:creator>Andrew Woodward</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint 2010]]></category>
		<category><![CDATA[SharePoint]]></category>

		<guid isPermaLink="false">http://www.21apps.com/?p=1180</guid>
		<description><![CDATA[Firstly what is a SharePoint SPI?
No it&#8217;s not another new version, it&#8217;s a generic term that is used to describe a SharePoint Project Item within the context of a Visual Studio project.
Visual Studio 2010 has introduced a lot of great SharePoint specific features making it significantly easier to get started with SharePoint development. This post [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Firstly what is a SharePoint SPI?</p>
<p>No it&#8217;s not another new version, it&#8217;s a generic term that is used to describe a SharePoint Project Item within the context of a Visual Studio project.</p></blockquote>
<p>Visual Studio 2010 has introduced a lot of great SharePoint specific features making it significantly easier to get started with SharePoint development. This post however is not about the tools, it is intended to point out one little bit of the hidden functionality that unfortunately didn&#8217;t get completed in time.</p>
<p>The Visual Studio tools hide away so of the configuration options in .spdata files. This is normally great as you can change these via the UI tools and everything works. However I discovered a small issue during a recent refactoring of a project.</p>
<p>When you create a new SharePoint SPI (for example a web part) that needs to add a reference to the assembly it updates the .spdata file with information (as below)</p>
<pre class="csharpcode"><span class="kwrd">
<pre><span>&lt;?</span><span>xml</span> <span>version</span><span>="1.0"</span> <span>encoding</span><span>="utf-8"</span>?<span>&gt;</span>
<span>&lt;</span><span>ProjectItem</span> <span>Type</span><span>="Microsoft.VisualStudio.SharePoint.WebPart"</span>
   <span>DefaultFile</span><span>="MyWebpart.cs"</span>
   <span>SupportedTrustLevels</span><span>="All"</span>
   <span>SupportedDeploymentScopes</span><span>="Site"
   </span><span>xmlns</span><span>="http://schemas.microsoft.com/VisualStudio/2010/SharePointTools/SharePointProjectItemModel"</span><span>&gt;</span>
  <span>&lt;</span><span>Files</span><span>&gt;</span>
    <span>&lt;</span><span>ProjectItemFile</span> <span>Source</span><span>="Elements.xml"</span> <span>Target</span><span>="MyWebpart\"</span> <span>Type</span><span>="ElementManifest"</span> <span>/&gt;</span>
    <span>&lt;</span><span>ProjectItemFile</span> <span>Source</span><span>="MyWebpart.webpart"</span> <span>Target</span><span>="MyWebpart\"</span> <span>Type</span><span>="ElementFile"</span> <span>/&gt;</span>
  <span>&lt;/</span><span>Files</span><span>&gt;</span>
  <span>&lt;</span><span>SafeControls</span><span>&gt;</span>
    <span>&lt;</span><span>SafeControl</span> <span>Name</span><span>="MyWebpart"</span>
       <span>Assembly</span><span>="$SharePoint.Project.AssemblyFullName$"</span>
       <span>Namespace</span><span>="_21apps.Sample.SPSolution"</span> <span>TypeName</span><span>="*"</span> <span>IsSafe</span><span>="true"</span> <span>/&gt;</span>
  <span>&lt;/</span><span>SafeControls</span><span>&gt;</span>
<span>&lt;/</span><span>ProjectItem</span><span>&gt;</span></pre>
<p><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p> </p>
<p></span></pre>
<p><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p>In here you will see references to the ProjectItemFiles (.weppart and element manifest) and also an entry for the SafeControls.</p>
<p>If you look closely at the SafeControl entry you will see the Assembly is using a Token</p>
<p><span style="font-family: courier new; font-size: small">Assembly=&#8221;$SharePoint.Project.AssemblyFullName$&#8221;</span></p>
<p>This is great as it allows the SafeControl to pickup the actual assembly name at compile time. The problem comes with the next part of the entry</p>
<p><span style="font-family: courier new; font-size: small">Namespace=&#8221;_21apps.Sample.SPSolution&#8221;</span></p>
<p>As you can see this is not token based, which means that if you later decide to rename you namespace, and this is case sensitive, the SharePoint safe control entry will no longer be valid and you will get an error like the one below when you deploy the solution.</p>
<blockquote><p><span style="color: #ff0000">A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered on this site as safe.</span></p></blockquote>
<p>For more info on what this actually means have a look at Maurice Prather&#8217;s <a href="http://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=189" target="_blank">post</a> from back in 2005, the information is still applicable today.</p>
<p>Unfortunately this namespace is unlikely to be made into a Token any time soon. Perhaps one for the community to pickup in the meantime. For now it is case of being aware that you need to correct this manually if you do change your namespace.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.21apps.com/development/namespace-not-token-spis/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Interviewed by Typemock</title>
		<link>http://www.21apps.com/sharepoint/interviewed-by-typemock/</link>
		<comments>http://www.21apps.com/sharepoint/interviewed-by-typemock/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 12:52:36 +0000</pubDate>
		<dc:creator>Andrew Woodward</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Testing]]></category>
		<category><![CDATA[Test Driven Development]]></category>
		<category><![CDATA[TypeMock]]></category>

		<guid isPermaLink="false">http://www.21apps.com/sharepoint/interviewed-by-typemock/</guid>
		<description><![CDATA[At the recent SharePoint Conference in Vegas I took a few minutes out to talk to Gil Zilberfeld of Typemock about what 21apps is doing with SharePoint and what I see as the next steps in the community regarding SharePoint development.
 
Looking at what areas I see as being a focus in the SharePoint development [...]]]></description>
			<content:encoded><![CDATA[<p>At the recent <a href="http://www.21apps.com/sharepoint/spc09-is-go-conference-keynote/" target="_blank">SharePoint Conference</a> in Vegas I took a few minutes out to talk to Gil Zilberfeld of <a href="http://learn.typemock.com" target="_blank">Typemock</a> about what 21apps is doing with SharePoint and what I see as the next steps in the community regarding SharePoint development.</p>
<p> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="437" height="389" id="viddler"><param name="movie" value="http://www.viddler.com/player/8e5d1ac5/" /><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="true" /><embed src="http://www.viddler.com/player/8e5d1ac5/" width="437" height="389" type="application/x-shockwave-flash" allowScriptAccess="always" allowFullScreen="true" name="viddler"></embed></object>
<p>Looking at what areas I see as being a focus in the SharePoint development space,&#160; how I will continue to push TDD but will also, now that people are starting to talk about good SharePoint development practices, start to look at the wide picture &#8211; looking at how we complement the Unit Tests with integration tests,&#160; looking at ways to automate use acceptance tests and generally looking at ways to make the code better so that testers can focus on the scenarios and complex tests rather than dealing with the &#8217;stupid bugs&#8217;.</p>
<p>Original post on <a href="http://learn.typemock.com/andrew-woodward-on-unit-testin/" target="_blank">Typemock Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.21apps.com/sharepoint/interviewed-by-typemock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TDD Kata &#8211; By Example video</title>
		<link>http://www.21apps.com/agile/tdd-kata-by-example-video/</link>
		<comments>http://www.21apps.com/agile/tdd-kata-by-example-video/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 08:35:09 +0000</pubDate>
		<dc:creator>Andrew Woodward</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Kata]]></category>
		<category><![CDATA[Test Driven Development]]></category>

		<guid isPermaLink="false">http://www.21apps.com/?p=1065</guid>
		<description><![CDATA[Since attending Roy Osherove&#8217;s TDD Master Class I have been doing my daily TDD Kata, I will admit I have missed some days but generally I have been keeping up with it and really seeing the benefit.
Here I talked about what a Kata is and how it compares to Kumon Maths and I also took [...]]]></description>
			<content:encoded><![CDATA[<p>Since attending <a href="http://www.21apps.com/development/tdd-master-class/" target="_blank">Roy Osherove&#8217;s TDD Master Class</a> I have been doing my daily TDD Kata, I will admit I have missed some days but generally I have been keeping up with it and really seeing the benefit.</p>
<blockquote><p><a href="http://www.21apps.com/development/daily-tdd-kata/" target="_blank">Here</a> I talked about what a Kata is and how it compares to Kumon Maths and I also took the opportunity to practice my reviewing techniques by looking at the best and reviewing <a href="http://www.21apps.com/development/comparing-myself-to-uncle-bob-martin/" target="_blank">Uncle Bobs prime factors TDD Kata</a>.</p></blockquote>
<p>I had promised to provide a web cast of the TDD SharePoint session that I did at the <a href="http://www.21apps.com/sharepoint/review-bpc-2009-dc/" target="_blank">Best Practices conference</a>, but I feel now that I need to really improve my keyboard mastery before taking on that one.  Instead I have taken the opportunity to record my current TDD Kata which is based on <a href="http://osherove.com/tdd-kata-1/" target="_blank">Roy Osheroves String Calculator</a>.  I have limited the steps I have done in this recording as I think 30 minutes would get a little boring.</p>
<h3>String Calculator</h3>
<ol>
<li>Create a simple String calculator with a method <strong>int Add(string numbers)</strong>
<ol>
<li>The method can take 0, 1 or 2 numbers, and will return their sum (for an empty string it will return 0) for example<strong> &#8220;&#8221; or &#8220;1&#8243; or &#8220;1,2&#8243;</strong></li>
<li>Start with the simplest test case of an empty string and move to 1 and two numbers</li>
<li>Remember to solve things as simply as possible so that you force yourself to write tests you did not think about</li>
<li>Remember to refactor after each passing test</li>
</ol>
</li>
<li>Allow the Add method to handle an unknown amount of numbers</li>
<li>Allow the Add method to handle new lines between numbers (instead of commas).
<ol>
<li>the following input is ok:  &#8220;1\n2,3&#8243;  (will equal 6)</li>
<li>the following input is NOT ok:  &#8220;1,\n&#8221; </li>
<li>Make sure you only test for correct inputs. there is no need to test for invalid inputs for these katas</li>
</ol>
</li>
<li>Allow the Add method to handle a different delimiter:
<ol>
<li>to change a delimiter, the beginning of the string will contain a separate line that looks like this:   &#8220;//[delimiter]\n[numbers.]&#8221; for example &#8220;//;\n1;2&#8243; should return three where the default delimiter is &#8216;;&#8217; .</li>
<li>the first line is optional. all existing scenarios should still be supported</li>
</ol>
</li>
</ol>
<p> </p>
<p>The idea behind TDD is to work through one thing at a time,  so in the example we start with 0 numbers (or empty string) and progress through each requirement continuing to adopt the Red, Green, Refactor approach &#8211; hopefully this will be clear from the video.</p>
<p>The Kata is not about knowing how to solve this problem, it is about knowing how to do things quickly and also knowing how to approach problems using TDD. </p>
<p>In this example,  as in my day job, I am using <a href="http://www.jetbrains.com/resharper/" target="_blank">ReSharper</a> to aid refactoring,  <a href="http://www.nunit.org/index.php" target="_blank">NUnit 2.5</a> for my tests as this supports TestCase and <a href="http://www.testdriven.net/" target="_blank">TestDriven.Net</a> to run the tests.</p>
<p>I have setup some live templates for the Test method and common Assert.AreEquals statements and have added a Keyboard shortcut to Re-Run the tests in TestDriven.Net (I use Alt + R).</p>
<p>Hope you enjoy the video, I have left the sound off - if you perfer some nice background music I can edit and add some <img src='http://www.21apps.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Would love to hear your thoughts on this.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="600" height="450" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=7014098&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="600" height="450" src="http://vimeo.com/moogaloop.swf?clip_id=7014098&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" allowfullscreen="true" allowscriptaccess="always"></embed></object></p>
<p><a href="http://vimeo.com/7014098">TDD Kata &#8211; Calculator Part 1 by AndrewWoody</a> from <a href="http://vimeo.com/user2441558">Andrew Woodward</a> on <a href="http://vimeo.com">Vimeo</a>.</p>
<p>You can download the WMV video to watch locally from the Vimeo site.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.21apps.com/agile/tdd-kata-by-example-video/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Which Build Servers in SharePoint &#8211; The Results</title>
		<link>http://www.21apps.com/sharepoint/which-build-servers-the-results/</link>
		<comments>http://www.21apps.com/sharepoint/which-build-servers-the-results/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 11:11:36 +0000</pubDate>
		<dc:creator>Andrew Woodward</dc:creator>
				<category><![CDATA[Aberdovey]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Continuous Integraton]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Continuous Integration]]></category>

		<guid isPermaLink="false">http://www.21apps.com/?p=1062</guid>
		<description><![CDATA[The numbers are in and I think this small sample really gives a good view as to the way people are approaching their SharePoint development projects.
Numbers taken from a one week poll asking people which build servers they used on their SharePoint projects.

It&#8217;s very clear from this that people are in one of 3 camps [...]]]></description>
			<content:encoded><![CDATA[<p>The numbers are in and I think this small sample really gives a good view as to the way people are approaching their SharePoint development projects.</p>
<blockquote><p>Numbers taken from a one week poll asking people <a href="http://www.21apps.com/agile/which-build-server-are-you-using/" target="_blank">which build servers they used on their SharePoint projects</a>.</p></blockquote>
<p><a href="http://www.21apps.com/wp-content/uploads/2009/10/CIPollResults.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="CI Poll Results" src="http://www.21apps.com/wp-content/uploads/2009/10/CIPollResults_thumb.png" border="0" alt="CI Poll Results" width="533" height="279" /></a></p>
<p>It&#8217;s very clear from this that people are in one of 3 camps of almost identical size</p>
<ul>
<li>Those using Team Foundation Server</li>
<li>Those that user another non Microsoft tool</li>
<li>Those that don&#8217;t do anything</li>
</ul>
<h3>Team Foundation Server</h3>
<p>Installing and using, or developing against Microsoft SharePoint Server requires a fairly big commitment to the Microsoft technology stack, so the domination of <a href="http://msdn.microsoft.com/en-us/teamsystem/default.aspx" target="_blank">Team Foundation Server</a> is probably to be expected.</p>
<ul>
<li>If your a big corporate user of SharePoint you most likely have a deal that includes TFS licenses</li>
<li>You have likely committed to Microsoft as the platform of choice across the board</li>
<li>If your a Microsoft Partner delivering products and solutions you will have a big investment in Microsoft licenses, and also a duty to adopt the MS recommended path</li>
<li>TFS is a good solution,  and it&#8217;s getting better in 2010</li>
</ul>
<h3>Non Microsoft Tools</h3>
<p>I was surprised by the mix of Non Microsoft tools,  having looked at what you get for free and the costs for licensing beyond that I would have expected <a href="http://www.jetbrains.com/teamcity/" target="_blank">Team City</a> to have a bigger following.  Perhaps the reason for not being higher is jetBrains being thought of a Java based?</p>
<p>I bundled <a href="http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET" target="_blank">CruiseControl</a> and <a href="http://thoughtworks.com/cruise" target="_blank">Cruise</a> together,  in hindsight I should have split them as they are totally different products.   I will make the assumption that most are using CruiseControl as this was really one of the first decent automated build tools to target the .Net platform.  People have got to know it an have scripted automation for their non SharePoint projects already.</p>
<p><a href="http://www.finalbuilder.com/" target="_blank">Final Builder</a> I have always liked the look of;  I really do find the whole raw XML editing that we have to do in any build automation a bit like developing against SharePoint,  it&#8217;s ok but the tools really should be better than this.   Final Builder has a great product, but the cost per user is perhaps the barrier here.</p>
<h3>Other</h3>
<p>Some people had build servers but didn&#8217;t use it for SharePoint &#8211; would really count those as None.</p>
<p>Others listed the source repository (SVN) or scripting language (msbuild, nant) so I assume that the build is done manually using batch files rather than via a dedicated build server.</p>
<p>Also someone listed Hudson,  something I had personally never heard of, but will bundle with the Non Microsoft Tools.</p>
<h3>None, we don&#8217;t have a build server</h3>
<p>This was probably the biggest surprise to me,  and perhaps not the way you might think.  I was actually surprised that only 35% of people indicated that they did not have any form of build server for their SharePoint projects.  </p>
<p>Based on my years of doing consultancy gigs I found that the majority of companies that I went into to do work didn&#8217;t have anything even close to an automated build server.  Heck some don&#8217;t even have source control for the code!</p>
<p>So I can take a couple of things from this</p>
<ul>
<li>People who don&#8217;t were too embarrassed to answer</li>
<li>SharePoint development has moved on significantly and most teams now have proper build servers</li>
<li>The readers of my blog are not representative of the wider SharePoint user base</li>
</ul>
<p> </p>
<h3>Conclusion</h3>
<p><a href="http://www.21apps.com/wp-content/uploads/2009/10/CIPollResultsNumbers.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="CI Poll Results Numbers" src="http://www.21apps.com/wp-content/uploads/2009/10/CIPollResultsNumbers_thumb.png" border="0" alt="CI Poll Results Numbers" width="644" height="292" /></a></p>
<p>There are still a lot of SharePoint teams out there that have yet to get the benefit from automating their builds,  who will undoubtedly be spending many hours manually putting things together the night before Go-Live.  </p>
<p>For these people, and those moving into SharePoint for the first time, there is a need to provide more information on why investing time in getting your automated build in from the start can make huge savings over the life of a project.  Providing walkthroughs on how to do this and some of the challenges you will encounter along the way.</p>
<p>Based on the feedback I could look at doing TFS first,  but I know that for teams with nothing setup yet this is going to be a big stumbling block.  Trying to convince you boss to roll out Team Foundation Server just so you can automate your SharePoint build is not an easy argument to have.   I will instead look at the options allowing you to get up and running quickly and more importantly without needing to get budget for licenses. </p>
<p>I will start with <a href="http://thoughtworks.com/cruise" target="_blank">Cruise</a>,  and I will be dog fooding this for real on <a href="http://www.21apps.com/sharepoint/introducing-project-aberdovey/" target="_blank">Project Aberdovey</a>.  </p>
<p>Thanks to everyone who took the time to vote,  I would love to hear your own take on what the numbers mean to you and your experience with automating builds in SharePoint.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.21apps.com/sharepoint/which-build-servers-the-results/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Which build server are you using?</title>
		<link>http://www.21apps.com/agile/which-build-server-are-you-using/</link>
		<comments>http://www.21apps.com/agile/which-build-server-are-you-using/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 16:32:06 +0000</pubDate>
		<dc:creator>Andrew Woodward</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Test Driven Development]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://www.21apps.com/?p=1051</guid>
		<description><![CDATA[I am looking to provide some guidance on doing Continuous Integration (CI) on SharePoint projects,  looking at the concepts behind CI but also looking to provide examples that can help people get the most out of CI on a SharePoint project.   Having used a number of technologies in the past I thought it would be useful [...]]]></description>
			<content:encoded><![CDATA[<p>I am looking to provide some guidance on doing Continuous Integration (CI) on SharePoint projects,  looking at the concepts behind CI but also looking to provide examples that can help people get the most out of CI on a SharePoint project.   Having used a number of technologies in the past I thought it would be useful to get an idea of the which technologies people are using, if any. </p>
<p>Please take a few seconds to tell me what you have used, and have a look at what others are doing.  </p>
<p style="text-align: center;"><script type='text/javascript' language='javascript' charset='utf-8' src='http://s3.polldaddy.com/p/2084177.js'></script><noscript> <a href='http://answers.polldaddy.com/poll/2084177/'>View Poll</a></noscript></p>
<p> </p>
<p>I have made the selections mutiple choice as I know people, especially consultants, have worked with more than one platform.  And if you haved used something not listed please add it in the other box.  </p>
<p>Also if you have any specific areas that you would like to see covered please add a comment.</p>
<p>Thanks for taking part</p>
]]></content:encoded>
			<wfw:commentRss>http://www.21apps.com/agile/which-build-server-are-you-using/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TDD Master Class &#8211; with Roy Osherove</title>
		<link>http://www.21apps.com/development/tdd-master-class/</link>
		<comments>http://www.21apps.com/development/tdd-master-class/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 21:54:39 +0000</pubDate>
		<dc:creator>Andrew Woodward</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Test Driven Development]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://www.21apps.com/?p=1045</guid>
		<description><![CDATA[For almost my entire career I have been involved in software development, and probably uniquely more often than not in an environment or role where I have needed to look at process improvement. This started with my first role where I had to ensure development adhered to ISO9001 standards, through to today where I work [...]]]></description>
			<content:encoded><![CDATA[<p>For almost my entire career I have been involved in software development, and probably uniquely more often than not in an environment or role where I have needed to look at process improvement. This started with my first role where I had to ensure development adhered to <a href="http://en.wikipedia.org/wiki/ISO9001" target="_blank">ISO9001</a> standards, through to today where I work with teams to help them adopt <a href="http://www.21apps.com/agile/" target="_blank">agile techniques</a> and continuous improvement.</p>
<p>Along the way almost everyone I talked to understands the basic idea that the earlier in the cycle you find a defect the cheaper and easier it is to fix, and from this most (if not all) agree that Unit Testing is one of the most cost effective ways to catch these defects. The problem is, it appears, developers are lazy; they understand they should do it they just never get around to it &#8211; &#8216;perhaps on the next project&#8217;.</p>
<p>As part of my own development I like to work with, be trained by or just hang with people that I see as having reached a higher level of knowledge and skill than me in a particular field. You could say a greater Mastery of the subject. One area that I am very passionate about, many may have seen some great interviews on the subject, is <a href="http://www.21apps.com/?s=tdd" target="_blank">Test Driven Development</a> (TDD). TDD is more than just doing Unit Testing; it is a technique that once you understand and are willing to invest time in helps you to become a better developer.</p>
<p>I have been doing TDD, although not on every project (sadly), for about 2 years and have shared the knowledge I have gained through <a href="http://www.21apps.com/agile/beginners-guide-to-test-driven-web-part-development/" target="_blank">white papers</a>, <a href="http://www.21apps.com/sharepoint/tdd-using-di/" target="_blank">blogs</a> and talking at <a href="http://www.21apps.com/sharepoint/tdd-at-spbpc-slidedeck/" target="_blank">conferences</a>. In trying to lead the way in my area of expertise, SharePoint, I felt that I was missing something. I had yet to reach a place where I felt that I had mastered the art, where I had moved into the phase of challenging myself to do more than just the practice of TDD.</p>
<p>As part of my work with <a href="http://learn.typemock.com/" target="_blank">Typemock</a>, the only solution of working with SharePoint&#8217;s sealed API, I found that these guys really did get it, they had the battle scars and were practicing what they preached, and they were challenging themselves to do it different, better. <a href="http://osherove.com/" target="_blank">Roy Osherove</a> is the Chief Architect at Typemock and I have seen him speak at conferences in a way that was engaging and thought provoking. The opportunity therefore to be able to spend 5 days with Roy doing a <a href="http://osherove.com/training/" target="_blank">TDD Master Class</a> was one that I could not miss.</p>
<p>I&#8217;m not going to do the, on day 1 we did this, on day two we did this, as I think that Sara (fellow attendee) has covered this quite well in her <a href="http://developerdame.blogspot.com/2009/09/learning-powers-of-tdd-and-much-more.html" target="_blank">post</a>. Instead I will talk about how the course was much more than a lesson in Test Driven Development; we paired up to cover all of the practices looking at the basics of unit testing frameworks (Nunit, MSTest), understanding isolation frameworks (Moq, Rhino Mocks, Typemock Isolator) and how they all look to solve the same issues whilst using slightly different syntax. We looked at how the techniques around TDD have evolved over time, and the how the tools have really moved on significantly in recent years making the barrier to entry and the ability to create readable and maintainable code possible. We looked at techniques, like the daily <a href="http://en.wikipedia.org/wiki/Kata" target="_blank">Kata</a>, that will help perfect the practices, and discussed the ideas of <a href="http://en.wikipedia.org/wiki/Shu_ha_ri" target="_blank">Shu -Ha -Ri</a> where the student moves from the fundamental techniques, to finding new ways and challenging tradition and then onto surpass the teacher and ultimate mastery.</p>
<p>I liked the way Roy questioned the idea that the lazy coder was in fact the one looking to do it as easily as possible, the one who knew all of the keyboard short cuts, the one with all the Live Templates in <a href="http://www.jetbrains.com/resharper/" target="_blank">ReSharper</a>. The Lazy code is really the one who gets the job done well, with the least amount of effort &#8211; unlike the average developer, who I initially thought of as lazy, who just doesn&#8217;t see development as a craft but more a way to pay the bills.</p>
<p>My view that learning from someone, who is at a higher level of knowledge and understanding has been reaffirmed. The same principles should apply to you, when you look at training and work, ensure that the person teaching you is someone you admire, someone who you feel has the level of knowledge and experience that you aspire to.</p>
<p>Having attended Roy&#8217;s TDD Master Class I can say that my knowledge has been enhanced, the core values have been reaffirmed and I am now in a much better place with regards my own capability, but more importantly my own ability to help others.</p>
<p>So the question is should you attend Roy&#8217;s TDD Master Class?</p>
<p>If you want to really Master the Art of Test Driven Development then <strong>definitely</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.21apps.com/development/tdd-master-class/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
