<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-US"><title type="html">Francis K. Cheung</title><subtitle type="html">The journey of an agile programmer...</subtitle><id>http://blogs.msdn.com/francischeung/atom.xml</id><link rel="alternate" type="text/html" href="http://blogs.msdn.com/francischeung/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.msdn.com/francischeung/atom.xml" /><generator uri="http://communityserver.org" version="2.1.61025.2">Community Server</generator><updated>2008-06-16T17:04:50Z</updated><entry><title>SPG Continuous Integration builds not run on instance of SharePoint</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/francischeung/archive/2009/06/24/spg-continuous-integration-builds-not-run-on-instance-of-sharepoint.aspx" /><id>http://blogs.msdn.com/francischeung/archive/2009/06/24/spg-continuous-integration-builds-not-run-on-instance-of-sharepoint.aspx</id><published>2009-06-24T21:53:11Z</published><updated>2009-06-24T21:53:11Z</updated><content type="html">Our Continuous Integration builds are run on a build server that has the necessary SharePoint assemblies, but with no installed instance of SharePoint. Licensing issues aside, this causes an interesting problem when unit tests are developed on dev boxes that have SharePoint installed. Several services found in the SPG Partner Portal application access SPFarm.Local. Developers often fail to mock out this dependency in unit tests as this property is always available on boxes that have SharePoint installed....(&lt;a href="http://blogs.msdn.com/francischeung/archive/2009/06/24/spg-continuous-integration-builds-not-run-on-instance-of-sharepoint.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9801886" width="1" height="1"&gt;</content><author><name>fcheung</name><uri>http://blogs.msdn.com/members/fcheung.aspx</uri></author></entry><entry><title>Using Typemock Isolator for Integration Tests</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/francischeung/archive/2009/06/24/using-typemock-isolator-for-integration-tests.aspx" /><id>http://blogs.msdn.com/francischeung/archive/2009/06/24/using-typemock-isolator-for-integration-tests.aspx</id><published>2009-06-24T21:52:55Z</published><updated>2009-06-24T21:52:55Z</updated><content type="html">Yeah, I know. Typemock Isolator is great for unit testing against API’s that are hard to mock, but this last iteration, I found a new use for Typemock Isolator. I worked with our test team to develop a set of integration tests that are run by MSTest and simulate running our components in the context of a specific web app. Usually in SharePoint, this is done as “over the glass” tests that exercise the components app via some UI because it is difficult to setup the appropriate SFarm/SPWebApplication/SPSite/SPWeb...(&lt;a href="http://blogs.msdn.com/francischeung/archive/2009/06/24/using-typemock-isolator-for-integration-tests.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9801885" width="1" height="1"&gt;</content><author><name>fcheung</name><uri>http://blogs.msdn.com/members/fcheung.aspx</uri></author></entry><entry><title>What happened to my SPContext?</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/francischeung/archive/2009/06/24/what-happened-to-my-spcontext.aspx" /><id>http://blogs.msdn.com/francischeung/archive/2009/06/24/what-happened-to-my-spcontext.aspx</id><published>2009-06-24T21:52:35Z</published><updated>2009-06-24T21:52:35Z</updated><content type="html">This last iteration, we ran an interesting issue when services that we request through the SharePointServiceLocator depend on SPContext.Current. This seemed like a reasonable dependency assumption. We consume these services in feature receivers. They work fine when activating the feature via the SharePoint web UI, but don’t work when activating the feature via STSADM –o activatefeature command. Who knew SPContext isn’t available in this case? Not I. This is another example of the complexity of SharePoint...(&lt;a href="http://blogs.msdn.com/francischeung/archive/2009/06/24/what-happened-to-my-spcontext.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9801884" width="1" height="1"&gt;</content><author><name>fcheung</name><uri>http://blogs.msdn.com/members/fcheung.aspx</uri></author></entry><entry><title>Stack Overflow when building up SiteMap structure</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/francischeung/archive/2009/06/05/stack-overflow-when-building-up-sitemap-structure.aspx" /><id>http://blogs.msdn.com/francischeung/archive/2009/06/05/stack-overflow-when-building-up-sitemap-structure.aspx</id><published>2009-06-05T19:34:27Z</published><updated>2009-06-05T19:34:27Z</updated><content type="html">In iteration 10, we wrote HierarchicalConfigSiteMapProvider that builds up a tree of sitemap nodes based on xml retrieved from the hierarchical ConfigManager. Being a newbie with SiteMapProviders, I overwrote BuildSiteMap calling a simple recursive method that traverses the xml and builds corresponding sitemap nodes. All of a sudden I get a stack overflow exception. No problem, I thought. Probably a bug in my recursive method. Hmmm… Looks fine. :| Turns out, I was calling siteMapNode.ChildNodes.Add(myNewSiteMapNode)....(&lt;a href="http://blogs.msdn.com/francischeung/archive/2009/06/05/stack-overflow-when-building-up-sitemap-structure.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9701574" width="1" height="1"&gt;</content><author><name>fcheung</name><uri>http://blogs.msdn.com/members/fcheung.aspx</uri></author></entry><entry><title>Granularity of SharePoint Features and Solutions</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/francischeung/archive/2009/06/05/granularity-of-sharepoint-features-and-solutions.aspx" /><id>http://blogs.msdn.com/francischeung/archive/2009/06/05/granularity-of-sharepoint-features-and-solutions.aspx</id><published>2009-06-05T17:57:40Z</published><updated>2009-06-05T17:57:40Z</updated><content type="html">In our SPG v1 guidance we discussed packaging site elements into features. This is particularly important if you are using the Visual Studio extensions for WSS. We found that whenever you add a site element into a VSeWSS project, a new feature is created for the site element. This lead to an excessive number of features that were too fine grained. Our guidance is to combine features into chunks of functionality that are generally self contained. You may still have some feature dependencies, but far...(&lt;a href="http://blogs.msdn.com/francischeung/archive/2009/06/05/granularity-of-sharepoint-features-and-solutions.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9701425" width="1" height="1"&gt;</content><author><name>fcheung</name><uri>http://blogs.msdn.com/members/fcheung.aspx</uri></author></entry><entry><title>SPG v2 Iteration 10 Drop</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/francischeung/archive/2009/06/02/spg-v2-iteration-10-drop.aspx" /><id>http://blogs.msdn.com/francischeung/archive/2009/06/02/spg-v2-iteration-10-drop.aspx</id><published>2009-06-02T09:54:12Z</published><updated>2009-06-02T09:54:12Z</updated><content type="html">Iteration 10 is complete and the drop can be downloaded here . In iteration 10 we mainly concentrated on refactoring, code cleanup and reusable assets. We will continue refactoring and scrubbing the code in the remaining iterations but please take a look at what we've done so far and provide us feedback. Hierarchical configuration: the ability to set a value on an element in the site map and have that value accessible by child elements in the site map. (ConfigManager.cs) Global Navigation driven...(&lt;a href="http://blogs.msdn.com/francischeung/archive/2009/06/02/spg-v2-iteration-10-drop.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9683916" width="1" height="1"&gt;</content><author><name>fcheung</name><uri>http://blogs.msdn.com/members/fcheung.aspx</uri></author></entry><entry><title>SharePoint Development Guidance v2</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/francischeung/archive/2009/01/20/sharepoint-development-guidance-v2.aspx" /><id>http://blogs.msdn.com/francischeung/archive/2009/01/20/sharepoint-development-guidance-v2.aspx</id><published>2009-01-20T05:09:36Z</published><updated>2009-01-20T05:09:36Z</updated><content type="html">We are now full speed a head working on v2 of the p&amp;amp;p SharePoint Guidance. Version 1 focused on issues common to both WSS and MOSS development like unit testing, deployment, and upgrading. For version 2, we’re looking at the following topics: Performance and scalability MOSS caching ASP.NET cache SharePoint session state Data and services Consuming WCF services BDC integration Exposing custom services from SharePoint app Content driven apps ALM We’ll also be using Visual Studion extensions for...(&lt;a href="http://blogs.msdn.com/francischeung/archive/2009/01/20/sharepoint-development-guidance-v2.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9341339" width="1" height="1"&gt;</content><author><name>fcheung</name><uri>http://blogs.msdn.com/members/fcheung.aspx</uri></author></entry><entry><title>Sometimes Typemock Isolator can be too powerful</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/francischeung/archive/2009/01/19/sometimes-typemock-isolator-can-be-too-powerful.aspx" /><id>http://blogs.msdn.com/francischeung/archive/2009/01/19/sometimes-typemock-isolator-can-be-too-powerful.aspx</id><published>2009-01-19T20:36:42Z</published><updated>2009-01-19T20:36:42Z</updated><content type="html">A colleague made the comment regarding Typemock Isolator: “but be aware that having such a powerful mocking facility may reduce the effectiveness of your unit tests as design aids”. I’ve used Typemock Isolator and it allows you to test your business logic even if it is poorly factored. For example, let’s say you have some legacy code that creates an instance of a dependant service using the “new” operator. public class MyClass { //Constructor public void MyClass() { this.dependantServiceA = new DependantServiceA();...(&lt;a href="http://blogs.msdn.com/francischeung/archive/2009/01/19/sometimes-typemock-isolator-can-be-too-powerful.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9340410" width="1" height="1"&gt;</content><author><name>fcheung</name><uri>http://blogs.msdn.com/members/fcheung.aspx</uri></author></entry><entry><title>Trying to use Unit Tests as Integration Tests</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/francischeung/archive/2008/12/18/trying-to-use-unit-tests-as-integration-tests.aspx" /><id>http://blogs.msdn.com/francischeung/archive/2008/12/18/trying-to-use-unit-tests-as-integration-tests.aspx</id><published>2008-12-18T10:37:01Z</published><updated>2008-12-18T10:37:01Z</updated><content type="html">We shipped v1 of the SharePoint Guidance with a good set of unit tests. These unit tests paid for themselves several times over each time we refactored the code base. As an agile developer, this made me very happy. After we shipped, my project manager, wanted a set of integration tests that could be used to stress test the application, so he asked me if we could repurpose our unit tests to also run as integration tests. Crazy idea eh? Unit tests are great to assert the behavior of granular pieces...(&lt;a href="http://blogs.msdn.com/francischeung/archive/2008/12/18/trying-to-use-unit-tests-as-integration-tests.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9234945" width="1" height="1"&gt;</content><author><name>fcheung</name><uri>http://blogs.msdn.com/members/fcheung.aspx</uri></author></entry><entry><title>SHIPPED!!! SharePoint Guidance</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/francischeung/archive/2008/12/18/shipped-sharepoint-guidance.aspx" /><id>http://blogs.msdn.com/francischeung/archive/2008/12/18/shipped-sharepoint-guidance.aspx</id><published>2008-12-18T08:24:29Z</published><updated>2008-12-18T08:24:29Z</updated><content type="html">We’ve completed version 1 of the patterns &amp;amp; practices SharePoint Guidance . The major stories we covered in this release are: Architectural decisions about patterns, feature factoring, and packaging. Design tradeoffs for common decisions many developers encounter, such as when to use SharePoint lists or a database to store information. Implementation examples that are demonstrated in the Training Management application and in the QuickStarts. How to design for testability, create unit tests,...(&lt;a href="http://blogs.msdn.com/francischeung/archive/2008/12/18/shipped-sharepoint-guidance.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9234425" width="1" height="1"&gt;</content><author><name>fcheung</name><uri>http://blogs.msdn.com/members/fcheung.aspx</uri></author></entry><entry><title>Typemock ships Isolator for SharePoint</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/francischeung/archive/2008/11/25/typemock-ships-isolator-for-sharepoint.aspx" /><id>http://blogs.msdn.com/francischeung/archive/2008/11/25/typemock-ships-isolator-for-sharepoint.aspx</id><published>2008-11-25T23:05:00Z</published><updated>2008-11-25T23:05:00Z</updated><content type="html">Our friends at Typemock have made it much more affordable to unit test SharePoint applications. With an introductory price of $99, they have shipped Isolator for SharePoint which is basically the same the full Isolator product except that it will only "fake" APIs that are part of the SharePoint API. http://www.typemock.com/unit-testing-Microsoft-SharePoint.html Thanks Eli and Roy!...(&lt;a href="http://blogs.msdn.com/francischeung/archive/2008/11/25/typemock-ships-isolator-for-sharepoint.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=9142717" width="1" height="1"&gt;</content><author><name>fcheung</name><uri>http://blogs.msdn.com/members/fcheung.aspx</uri></author><category term="SharePoint unit test Typemock mock" scheme="http://blogs.msdn.com/francischeung/archive/tags/SharePoint+unit+test+Typemock+mock/default.aspx" /></entry><entry><title>Unit Testing SharePoint 2007 Applications</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/francischeung/archive/2008/08/22/unit-testing-sharepoint-2007-applications.aspx" /><id>http://blogs.msdn.com/francischeung/archive/2008/08/22/unit-testing-sharepoint-2007-applications.aspx</id><published>2008-08-22T18:58:18Z</published><updated>2008-08-22T18:58:18Z</updated><content type="html">When developing SharePoint applications, it is common to develop custom: ASP.NET Web Forms WebParts Event Receivers Workflow coding activities One of the first things we noticed when trying to unit test our business logic is that our code will heavily relied on elements of the SharePoint API. SPWeb SPItemEventProperties SPList A common approach to making code more testable is to identify and isolate services that a class needs to do its work, treat them as external dependencies, and passed them into...(&lt;a href="http://blogs.msdn.com/francischeung/archive/2008/08/22/unit-testing-sharepoint-2007-applications.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8888087" width="1" height="1"&gt;</content><author><name>fcheung</name><uri>http://blogs.msdn.com/members/fcheung.aspx</uri></author></entry><entry><title>SHIPPED!!! Composite Application Guidance for WPF June 2008</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/francischeung/archive/2008/07/17/shipped-composite-application-guidance-for-wpf-june-2008.aspx" /><id>http://blogs.msdn.com/francischeung/archive/2008/07/17/shipped-composite-application-guidance-for-wpf-june-2008.aspx</id><published>2008-07-17T04:01:41Z</published><updated>2008-07-17T04:01:41Z</updated><content type="html">Here is the landing page: http://msdn.microsoft.com/en-us/library/cc707819.aspx Here is the download page: http://www.microsoft.com/downloads/details.aspx?FamilyId=6DD3D0C1-D5B4-453B-B827-98E162E1BD8D&amp;amp;displaylang=en I didn't notice how much hard work went into this project because I was having so much fun. Pair programming with the likes of Bob, Julian, Ezequiel, Brian, and Adam was an amazing experience. Thanks to Bob Brumfield for his outstanding technical leadership. Many of the refinements...(&lt;a href="http://blogs.msdn.com/francischeung/archive/2008/07/17/shipped-composite-application-guidance-for-wpf-june-2008.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8741368" width="1" height="1"&gt;</content><author><name>fcheung</name><uri>http://blogs.msdn.com/members/fcheung.aspx</uri></author></entry><entry><title>ActiveAware Views and Commands</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/francischeung/archive/2008/07/16/activeaware-views-and-commands.aspx" /><id>http://blogs.msdn.com/francischeung/archive/2008/07/16/activeaware-views-and-commands.aspx</id><published>2008-07-16T18:46:35Z</published><updated>2008-07-16T18:46:35Z</updated><content type="html">It occurred to me after a recent advisory board call that we haven't done a good job of communicating the scenarios that prompted the development of ActiveAware views and commands. Let me describe this functionality in terms of the ability to &amp;quot;Save All&amp;quot; versus &amp;quot;Save Active&amp;quot;. Save All: The ability to &amp;quot;Save All&amp;quot; describes saving ALL elements of an application that have registered as &amp;quot;saveable&amp;quot;. My application could have orders, customers, inventory, and other...(&lt;a href="http://blogs.msdn.com/francischeung/archive/2008/07/16/activeaware-views-and-commands.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8739023" width="1" height="1"&gt;</content><author><name>fcheung</name><uri>http://blogs.msdn.com/members/fcheung.aspx</uri></author></entry><entry><title>Poor man's UI Composition</title><link rel="alternate" type="text/html" href="http://blogs.msdn.com/francischeung/archive/2008/06/16/poor-man-s-ui-composition.aspx" /><id>http://blogs.msdn.com/francischeung/archive/2008/06/16/poor-man-s-ui-composition.aspx</id><published>2008-06-16T19:04:50Z</published><updated>2008-06-16T19:04:50Z</updated><content type="html">I've consistently pushed for simplicity on the Prism project. This was evident when we worked on our first feature: UI composition (View from one module is composed of view(s) from other module(s)). In CAB, we developed Workspaces to provide this functionality. However WPF provided its own containment model. Being able to add arbitrary content to UI elements is core to WPF. Before we develop an elaborate solution for gluing cross module UI elements together, it was important to see what WPF provided...(&lt;a href="http://blogs.msdn.com/francischeung/archive/2008/06/16/poor-man-s-ui-composition.aspx"&gt;read more&lt;/a&gt;)&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=8605866" width="1" height="1"&gt;</content><author><name>fcheung</name><uri>http://blogs.msdn.com/members/fcheung.aspx</uri></author></entry></feed>