<?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>21apps &#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>Inspiring people to change the way they work</description>
	<lastBuildDate>Thu, 02 Feb 2012 17:58:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>SharePoint Retreat SW London&#8211;14th May 2011</title>
		<link>http://www.21apps.com/sharepoint/spretreat-swlondon2011/</link>
		<comments>http://www.21apps.com/sharepoint/spretreat-swlondon2011/#comments</comments>
		<pubDate>Mon, 02 May 2011 07:15:07 +0000</pubDate>
		<dc:creator>Andrew Woodward</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[SharePoint Retreat]]></category>
		<category><![CDATA[SPRetreat]]></category>

		<guid isPermaLink="false">http://www.21apps.com/?p=2040</guid>
		<description><![CDATA[There have been a few really good SharePoint Retreats, the idea behind them is to get people actually coding during the day rather than watching others present.  The reason this that you only really learn by doing and as has &#8230; <a href="http://www.21apps.com/sharepoint/spretreat-swlondon2011/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>There have been a few really good <a href="http://www.21apps.com/?s=spretreat" target="_blank">SharePoint Retreats</a>, the idea behind them is to get people actually coding during the day rather than watching others present.  The reason this that you only really learn by doing and as has been shown in previous retreats the act of doing the same thing a few times really does work.</p>
<p><img style="margin: 5px auto 6px; display: block; float: none;" src="http://www.21apps.com/wp-content/uploads/2010/05/mainlogo.jpg" alt="" /></p>
<p>This retreat, organised by <a href="http://twitter.com/PaulBeck1" target="_blank">Paul Beck</a>, is looking at two areas LINQ to SharePoint and InfoPath.</p>
<p>The other brilliant thing about SharePoint Retreats is they are completely free to attend community events &#8211; this does mean that the places even on a Saturday get filled very quickly.</p>
<p>For more information on the event and to register visit the <a href="http://spretreatswlondon.eventbrite.com/" target="_blank">Eventbright listing</a>.</p>
<p>&nbsp;</p>
<p>Happy SPRetreating <img class="wlEmoticon wlEmoticon-smile" style="border-style: none;" src="http://www.21apps.com/wp-content/uploads/2011/05/wlEmoticon-smile.png" alt="Smile" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.21apps.com/sharepoint/spretreat-swlondon2011/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slide deck from Automated UI Testing at BPC10</title>
		<link>http://www.21apps.com/sharepoint/slides-ui-testing-bpc10/</link>
		<comments>http://www.21apps.com/sharepoint/slides-ui-testing-bpc10/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 20:22:41 +0000</pubDate>
		<dc:creator>Andrew Woodward</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[Public Speaking]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.21apps.com/?p=1399</guid>
		<description><![CDATA[Slide deck from my Automated UI Testing of SharePoint 2010 with Visual Studio 2010 presented at the Best Practices Conferences in Washington DC in August 2010. &#160; Automted testing with visual studio 2010 View more presentations from Andrew Woodward.]]></description>
			<content:encoded><![CDATA[<p>Slide deck from my Automated UI Testing of SharePoint 2010 with Visual Studio 2010 presented at the <a href="http://www.bestpracticesconference.com/" target="_blank">Best Practices Conferences</a> in Washington DC in August 2010.</p>
<p>&#160;</p>
<p> <span id="more-1399"></span>
<div style="width: 425px" id="__ss_5055561"><strong style="margin: 12px 0px 4px; display: block"><a title="Automated testing with visual studio 2010" href="http://www.slideshare.net/AndrewWoody/automted-testing-with-visual-studio-2010">Automted testing with visual studio 2010</a></strong><object id="__sse5055561" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=automtedtestingwithvisualstudio2010-100825151618-phpapp01&amp;stripped_title=automted-testing-with-visual-studio-2010" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed name="__sse5055561" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=automtedtestingwithvisualstudio2010-100825151618-phpapp01&amp;stripped_title=automted-testing-with-visual-studio-2010" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 5px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/AndrewWoody">Andrew Woodward</a>.</div>
</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.21apps.com/sharepoint/slides-ui-testing-bpc10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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[Testing]]></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 &#8230; <a href="http://www.21apps.com/sharepoint/ui-testing-tip1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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>5</slash:comments>
		</item>
		<item>
		<title>SharePoint 2010 ECMAScript &#8211; &#8216;b&#8217; is null or not an object</title>
		<link>http://www.21apps.com/sharepoint/sp2010-b-is-null/</link>
		<comments>http://www.21apps.com/sharepoint/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]]></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: &#8230; <a href="http://www.21apps.com/sharepoint/sp2010-b-is-null/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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/sharepoint/sp2010-b-is-null/feed/</wfw:commentRss>
		<slash:comments>1</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[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 &#8230; <a href="http://www.21apps.com/sharepoint/call-for-common-code-can-we-unit-test-it/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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>Setting up SharePoint 2010 CI process with Team City</title>
		<link>http://www.21apps.com/sharepoint/setting-up-sharepoint-2010-ci-process-with-team-city/</link>
		<comments>http://www.21apps.com/sharepoint/setting-up-sharepoint-2010-ci-process-with-team-city/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 21:27:58 +0000</pubDate>
		<dc:creator>Andrew Woodward</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SharePoint]]></category>
		<category><![CDATA[21Scrum]]></category>
		<category><![CDATA[Continuous Integration]]></category>

		<guid isPermaLink="false">http://www.21apps.com/?p=1198</guid>
		<description><![CDATA[In this article and screen cast we will discuss the idea behind the CI process and focus on the technical tricks that we need to make in order to get this working for a SharePoint 2010 project using Team City &#8230; <a href="http://www.21apps.com/sharepoint/setting-up-sharepoint-2010-ci-process-with-team-city/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<blockquote><p>In this article and screen cast we will discuss the idea behind the CI process and focus on the technical tricks that we need to make in order to get this working for a SharePoint 2010 project using Team City and Subversion.</p></blockquote>
<p>One of the first things that you will want to do for any development project is setup your <a href="http://en.wikipedia.org/wiki/Continuous_Integration" target="_blank">Continuous Integration</a>process. The value of having a server automatically monitor your source code repository for changes and validating they work is immense</p>
<p>Its worth mentioning that doing Continuous Integration is not something you will want to leave until later in the project.  Waiting means the solution gets bigger and more complex which in turn make the setup more comples.   My recommendation:  Get this configured early, during Sprint 0  (i.e. before you write any real production code) if at all possible.</p>
<h3>The basic CI Process</h3>
<p>The diagram below shows the normal process that occurs.  </p>
<p>(1) a developer checks in some code changes to the source code repository.</p>
<p>(2) The CI server monitors the source code repository for any changes</p>
<p>When changes are detected the code is retrieved and the automated build is started.  This build will normally include running Unit, Integration and Build Verification tests.</p>
<p>(3) The success or failure of the automated build is reported back to the Team (including the developer).</p>
<p><em>In some teams breaking the build means the developer has a forfeit of some sort.  The idea is to encourage team work but also to discourage broken builds.</em></p>
<p><a href="http://www.21apps.com/wp-content/uploads/2010/02/image.png"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="Continuous Integration" src="http://www.21apps.com/wp-content/uploads/2010/02/image_thumb.png" border="0" alt="Continuous Integration" width="548" height="665" /></a> </p>
<h3>When the build breaks!</h3>
<p>A term I read recently, &#8216;Stop-the-Line&#8217;,  is used in Toyota manufacturing process where any problem results in the production line being stopped until the cause of the problem is found, resolved and ideally prevented from re-occurring.    </p>
<p>This should be the same when a build breaks; the whole Team should stop and help get the build working again.  It is not just a problem for the developer who last checked in &#8211; the whole team need the process and need the builds to be working.</p>
<h3>Setting Up in Sprint 0</h3>
<p>The actual process described above is a little into the development cycle, when the build is in place and when the team are working on production code.   Before this can happen there needs to be a process put in place.  I refer to this initial as getting the <strong>strawman</strong> solution done.</p>
<blockquote><p><em><strong>definition: Strawman</strong></em></p>
<p>In general, a strawman is an object, document, person, or argument that temporarily stands in for and is intended to be &#8220;knocked down&#8221; by something more substantial.    </p>
<p align="right">source: <a title="http://whatis.techtarget.com/wsearchResultsB/0,,sid9,00.html?query=strawman" href="http://whatis.techtarget.com/wsearchResultsB/0,,sid9,00.html?query=strawman" target="_blank">Whatis.com</a></p>
</blockquote>
<p align="left">The aim is to take some code, which will be replaced hence the Strawman term through the CI process and get the team build notifications working.   You should aim to prove the successful builds but also what happens when the build fails.  Did the team get notified?  and did they react?</p>
<h3>The Strawman Exercise</h3>
<p align="left">21apps is a small and geographically dispersed team,  we make extensive use of cloud based services for things like source control as they prove to be cost effective and flexible and our strawman  process tends to follow these steps:</p>
<p align="left">1) Create a repository for the project  (Hosted Subversion)</p>
<p align="left">2) Create the strawman project  (Simple &#8216;hello world&#8217; web part)</p>
<p align="left">3) Create a simple build script  &#8211; small steps mean a successful compile is our objective</p>
<p align="left">4) Create a automated build configuration on our CI server &#8211; we use <a href="http://www.jetbrains.com/teamcity/" target="_blank">Team City</a></p>
<p align="left">5) Prove the successful and failed builds</p>
<p align="left">In this post we are focusing on step (4) setting up Team City as our CI server. </p>
<p align="left">To make this easier I have provided a quick video walkthrough on what we have done for the early builds of <a href="http://www.21apps.com/sharepoint/introducing-project-aberdovey/" target="_blank">Project Aberdovey</a>- the process will be very similar for your SharePoint 2010 solutions.</p>
<p align="left"> </p>
<p align="left"><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=9655768&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=9655768&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><a href="http://vimeo.com/9655768">SharePoint 2010 &#8211; CI with TeamCity</a> from <a href="http://vimeo.com/user2441558">Andrew Woodward</a> on <a href="http://vimeo.com">Vimeo</a>.
</p>
<p align="left"> </p>
<h3>Video Spotlights</h3>
<p>Key areas that are highlighted in the video that you will enable you to build SharePoint 2010 projects in Team City.</p>
<p>If you are using MSBuild ensure you set the MSBuild version to Microsoft.Net Framework 3.5 and x64 run platform.</p>
<p align="left"><a href="http://www.21apps.com/wp-content/uploads/2010/02/image1.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://www.21apps.com/wp-content/uploads/2010/02/image_thumb1.png" border="0" alt="image" width="479" height="347" /></a></p>
<p align="left"> </p>
<p align="left">Force Team City to use MSBuild 4.0 as this is needed by adding the Environment Variable</p>
<p align="left"><span style="font-family: Courier New; font-size: small;">Name: MSBuild</span></p>
<p align="left"><span style="font-family: Courier New; font-size: small;">Reference Syntax: %env.MSBuild%</span></p>
<p align="left"><span style="font-family: Courier New; font-size: small;">Value: %system.DotNetFramework4.0_x86_Path%</span></p>
<p><a href="http://www.21apps.com/wp-content/uploads/2010/02/image2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" src="http://www.21apps.com/wp-content/uploads/2010/02/image_thumb2.png" border="0" alt="image" width="580" height="233" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.21apps.com/sharepoint/setting-up-sharepoint-2010-ci-process-with-team-city/feed/</wfw:commentRss>
		<slash:comments>13</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 &#8230; <a href="http://www.21apps.com/sharepoint/sharepoint-memory-leaks/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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/sharepoint/namespace-not-token-spis/</link>
		<comments>http://www.21apps.com/sharepoint/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]]></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 &#8230; <a href="http://www.21apps.com/sharepoint/namespace-not-token-spis/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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/sharepoint/namespace-not-token-spis/feed/</wfw:commentRss>
		<slash:comments>2</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 &#8230; <a href="http://www.21apps.com/sharepoint/interviewed-by-typemock/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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 &#8216;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 &#8230; <a href="http://www.21apps.com/agile/tdd-kata-by-example-video/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></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>15</slash:comments>
		</item>
	</channel>
</rss>

