<?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; Test Driven Development</title>
	<atom:link href="http://www.21apps.com/tag/tdd/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>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>
		<item>
		<title>Applying DDD, TDD and Patterns to enable Reuse your SharePoint Code</title>
		<link>http://www.21apps.com/sharepoint/applying-ddd-tdd-and-patterns-to-enable-reuse-your-sharepoint-code/</link>
		<comments>http://www.21apps.com/sharepoint/applying-ddd-tdd-and-patterns-to-enable-reuse-your-sharepoint-code/#comments</comments>
		<pubDate>Sun, 04 Jan 2009 21:15:52 +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>

		<guid isPermaLink="false">http://www.21apps.com/?p=687</guid>
		<description><![CDATA[John W Powell has posted a great article on MSDN where he explains how he used Domain Driven Design (DDD), Test Driven Development (TDD) and design Patterns to create a framework for working with the SharePoint.
He goes into detail about the framework and the reasons for the final design.  I would have liked to have [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.msdn.com/johnwpowell/default.aspx" target="_blank">John W Powell</a> has posted a great <a href="http://blogs.msdn.com/johnwpowell/archive/2009/01/03/consume-sharepoint-web-services-with-wcf-using-the-repository-gateway-mapper-domain-model-and-factory-design-patterns.aspx" target="_blank">article</a> on MSDN where he explains how he used Domain Driven Design (DDD), Test Driven Development (TDD) and design Patterns to create a framework for working with the SharePoint.</p>
<p>He goes into detail about the framework and the reasons for the final design.  I would have liked to have a little more detail, code samples, from the iterations he went through to reach this design to help people better understand how the DDD and TDD are really about designing better software.   He does say himself, so I can&#8217;t really complain</p>
<blockquote><p>Now I&#8217;m pulling a &#8220;Julia Childs&#8221; on you. I already went through several iterations of TDD and refactoring to arrive at the implementation&#8230;</p></blockquote>
<p>It&#8217;s really encouraging to see more of this information being published that demonstrates it is possible to do good design in SharePoint projects using agile techniques.</p>
<p>I have a few small areas that I disagree with, first the approach taken seems to be more test-after, in the SharePointListRepository example early on he states that &#8220;Following TDD, we&#8217;ll create a unit test that will fail until we implement the repository&#8221;.   I have no issue with the writing of tests that fail and making them pass but TDD is about driving the design and John had already made the design choice before he implemented the test.   To be fair to John this may be more about the way he wrote the blog than the code.</p>
<p>The Second I may being ultra critical about the naming of the tests,  but he has two tests both named <strong>GetListsTest</strong> this makes it harder to understand where a test is failing.</p>
<p>Personally I like to adopt a naming convention that defined exactly what is being tested and the expected results, something like:</p>
<p>SharePointListsServiceGateway_GetLists_ReturnList</p>
<p>If your getting into Behaviour Driven Development (BDD) then the naming of tests takes on an even more meaningful role.</p>
<p>The third and more important is the use of &#8216;var&#8217; in the tests for the SharePointServiceUrl.  If you look at the tests <strong>GetServiceUriTest</strong> and <strong>GetServiceUrlEndsWithSlashTest </strong>the tests are identical, my feeling is that with the test GetServiceUriTest John was aiming to test the overloaded <strong>GetLists </strong>method that returns a Uri.   However the use of &#8216;var&#8217; means that Visual Studio and the compiler make the call that this is actually a call to the method that returns a string.  If you isolate the tests in this method only you will see that this code is not called, the full code coverage however it shows 100% coverage as another test is exercising this code &#8211; a warning that just because you have 100% code coverage doesn&#8217;t mean you&#8217;ve tested your code.</p>
<p>The forth and last observation is probably the most important.   The tests created are Unit Tests, although if is often debated what a Unit is, one things that a Unit Test should not be is an Integration Test &#8211; however the GetLists tests have a dependency on SharePoint.  If your environment does not have a SharePoint web application matching <a title="http://contoso.com/" href="http://contoso.com/">http://contoso.com/</a> these tests will fail.</p>
<p>I have probably been too hard on John here as the emphasis of the post was about the framework,  it would however be good to make the reader aware of these and the reason for skipping them.   With that said I am still made up that people are starting to put stuff out there to help us all improve the way we develop.</p>
<p>Way to go John!.</p>
<p>PS: John was happy for me to post the comments as he wants to spark the conversations.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.21apps.com/sharepoint/applying-ddd-tdd-and-patterns-to-enable-reuse-your-sharepoint-code/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
