Archives / 2006
  • Rethinking your business validation rules

    Last night Tom Hollander and co. announced the release of the December CTP of Enterprise Libraries 3.0 (on CodePlex no less!). I've been watching and waiting for this (even bugging Tom to get a "sneak peek") but it's reality now and something you can play with. After all, opening Christmas presents isn't the only thing geeks do over the holidays. Don't use this for production apps, but if you've got something going into production in the next 6 months, its something to consider.

    One of the main features they wanted to deliver (based on user feedback) was a validation engine. Something that would allow you to validate business entities with little effort. Last night I gave the validators a whirl to see how they worked. It's pretty slick and ends up being a nice cleanup of your domain from clutter (which is always a good thing).

    Let's say I have an Account class and the name of the account has some rules around it. Names are required and can only be between 5 and 8 characters. This is a simple example, but one you should get the idea from.

    First I'll write a set of quick tests for my Account class. Four tests, one creates a valid Account, two test the length bounds, and one creates an Account with a null name.

        6 [TestClass]

        7 public class AccountTests

        8 {

        9     private Account _account;


       11     [TestInitialize]

       12     public void SetUp()

       13     {

       14         _account = new Account();   

       15     }


       17     [TestMethod]

       18     public void CanCreateValidAccountWithName()

       19     {

       20         _account.AccountName = "C123456";

       21         Assert.AreEqual(true, _account.IsValid);

       22     }


       24     [TestMethod]

       25     public void AccountNameMustCannotBeLessThanFiveCharacters()

       26     {

       27         _account.AccountName = "A";

       28         Assert.AreEqual(false, _account.IsValid);

       29     }


       31     [TestMethod]

       32     public void AccountNameCannotExceedEightCharacters()

       33     {

       34         _account.AccountName = "123456789";

       35         Assert.AreEqual(false, _account.IsValid);

       36     }


       38     [TestMethod]

       39     public void AccountNameIsRequired()

       40     {

       41         Account account = new Account();

       42         account.AccountName = null;

       43         Assert.AreEqual(false, account.IsValid);

       44     }

       45 }

    Now we'll create the Account class in a more "traditional" sense, checking for business rules validation during the setter and setting a flag called IsValid along the way.

        3 public class Account

        4 {

        5     private string _accountName;

        6     private bool _isValid;


        8     public string AccountName

        9     {

       10         set

       11         {

       12             if(string.IsNullOrEmpty(value))

       13                 _isValid = false;

       14             else if(value.Length < 5)

       15                 _isValid = false;

       16             else if(value.Length > 8)

       17                 _isValid = false;

       18             else

       19             {

       20                 _accountName = value;

       21                 _isValid = true;

       22             }

       23         }

       24         get { return _accountName; }

       25     }


       27     public bool IsValid

       28     {

       29         get

       30         {

       31             return _isValid;

       32         }

       33     }

       34 }

    Great, our tests pass and all is good in the world. However our setter looks kind of ugly and could be improved. Maybe we could create some private methods called from our setter, or you could throw a BusinessRulesException but it's still ugly no matter how you refactor this.

    Enter the new hotness of the Validation Application Block of Enterprise Library 3.0. Rather than writing all those "if" statements and conditional checking, we can specify our validation through attributes decorated on the property. And our IsValid property can be changed to use the new ValidationFactory classes:

        6 public class Account

        7 {

        8     private string _accountName;


       10     [NullValidator]

       11     [StringLengthValidator(5, 8)]

       12     public string AccountName

       13     {

       14         set { _accountName = value; }

       15         get { return _accountName; }

       16     }


       18     public bool IsValid

       19     {

       20         get

       21         {

       22             IValidator<Account> validator = ValidationFactory.CreateValidator<Account>();

       23             ValidationResults results = validator.Validate(this);

       24             return results.IsValid;

       25         }

       26     }

       27 }

    Makes for reading your domain code much easier and it's a breeze to write. Also (at least IMHO) it makes for reading the intent of the business rules much easier. You can also create your own validators and there are a set of built-in ones in the December CTP drop (String Length, String Range, Date Range, Valid Number, etc. more coming later) so there's much more to it than this simple example but I find it all very slick and easy to use.

  • Ribbon UI Control Roundup for Developers

    After yesterdays post about my babbling about the Ribbon UI and Office 2007, I decided to go out and hunt down all the libraries and controls I could find that provide that UI experience for you, the developer. I've taken out a few hours, downloaded all the samples and demos I could and gave everything a test drive. For the demos and criteria (I'm very picky about having to do silly things like RTFM) I looked at how easy it was to add the control and apply the look and feel of Office 2007 to a simple Windows Form. Was there a designer? Documentation? Demos? How much code did I have to write? Any extra stuff that came easy or for free (like built-in icons, reading in menu structure from XML, etc.) added some brownie points, but not much as the focus was just getting an Office 2007 look and feel.

    For my trial samplings, I went completely commando and took a solution, added a WinForm project for each control, and went to town. If there wasn't anything obvious about how to add controls or get the Ribbon going, I would crack open the demo and, barring that, resort to actually reading something. I also had Word up and running and built a small sample with each library to mimic the Word UI by creating a tab for each section (Home, Insert, Page Layout, References, Mailings, Review, and View), groups for the first tab (Clipboard, Font, Paragraph, Styles, Editing) and button/menus for the first group (Paste, Cut, Copy, Format Painter). Building each demo should only take 10 minutes (no graphics, just setting properties and adding controls).

    Here's a rundown of the toolkits available out there.

    Elegant Ribbon

    A good looking control, implements all the requirements for the Ribbon and is 100% managed C# code. Install was simple and it came with a toolbox entry with some controls you can drop onto your forms. Very simple and intuitive. You could probably get up to speed on this very easily and it appears to implement all the features the real Ribbon does. Demo was quick to build and I didn't have to refer to the help or samples. You can add tabs and groups from the built-in context menu so it's pretty intuitive. Adding the Ribbon to the form also added their own FormFrameSkinner so the entire form took shape with the Office 2007 UI look and feel automatically. Very nice. Beta version only right now.


    A nice control and one of the more lightweight but compatible and powerful ones out there. Install couldn't add controls to Visual Studio (but Elegant Ribbon could?) so you have to add them manually. Once you do this you can add a Ribbon to the form. This was fine and I could right-click on a group (they call it a "Chunk") and add controls or new chunks. Overall not bad, but it didn't create the Jewel which Elegant did. If I did some more digging I could probably find out how to do this but it didn't look obvious to the controls that I could add or properties I could set. The only problem I saw was when I reloaded my sample, it couldn't figure out how to build the designer and crashed not understanding a variable called "ChunkStrip". Creating a new form and adding the Ribbon didn't have any problems. Commercial and available for purchase. Eval version is available.


    Nice implementation. Only for Delphi and C++ Builder. Since I don't have either installed, I couldn't try it out the library but the demo looked like it could do the job and I gave a quick once-over on the SDK documentation and it looks pretty simple.

    XtraBars Suite

    Part of the big gigantic entity known as DevExpress. I do have XtraBars (or DevExpress or something) laying around here but I haven't installed it. If it's anything like the XtraGrid then this is probably the cadillac of Ribbon controls but it comes at a price. I've been working with the XtraGrid for months and I still don't know how to do much with it other than replace a DataGrid. There are just a billion options, designers, editors, skins, themes, and all that so I'm sure that's been packaged into the XtraBars as well. I did run the demo and it looks good so if you're serious about building apps using the Office UI and have lots of time to kill learning something, this would be your best bet.

    BCG Control Bar Pro

    I've used BCG before and their suite is nice. It's all written in C++ but I'm not sure if they've moved over to the managed world yet for this control. They have a (ugh) MFC demo version that looked and behaved well exceptionally well. The thing I've always found about BCG is that their demos are not only the look and feel of the app, but some functionality. For example their Ribbon demo is Word and comes with all the icons, buttons, and graphics as the real deal but also when you click on things like the File Open button or Save toolbar, it brings up a dialog. It's a nice touch that they take more time than just building a Hello World sample but an actual demo (even if it is a shell). As for the library itself, after installing this library there were no Ribbon controls avaialble so I'm assuming they haven't released that part yet but only the demo.

    Janus UI Controls

    These guys claim to have a Ribbon component, but unless I'm missing something obvious, I can't find it on the site.

    DevComponents Ribbon Control

    Simple install and worked first time. Added it's own toolbox with a variety of controls (including a bunch that were not Ribbon related but things like Visual Studio 2005 style tabs, nice). Dropped a Ribbon control on a new form and then added some additional controls. Not completely intuitive about adding groups. The other controls like Elegant and SandRibbon would add tab groups, here you drag the group onto the tab which means you have to dock it and do some alignment (or maybe there's some container control you have to add first). No Jewel added automatically and I didn't see a control for it, so not sure if that's supported. Lots of really annoying nag screens everytime you add a control to your form so negative points for that.

    Toolkit Pro 2006

    This is from the CodeJock guys and they usually produce good stuff. The library is listed as C++/MFC (like BCG Control Bar) so it's MFC only and not a WYSIWYG type environment. Like BCG, you have to build a MFC app (using the template they provide or modifying your own MFC app) and hook in the Ribbon through resource files and source code. Sorry but I stopped doing that development years ago when C# let me focus on my domain rather than writing code to wire up UI events (and MFC is bloatware to begin with). Anyways, again the demos look good but if you're not familiar with MFC or C++, be afraid, be very afraid. If you do like to hurt yourself, this toolkit or the BCG one (if I could find the Ribbon functionality) are fine.

    Bottom line

    If you're serious about the Office UI and want power (as in BullDog hover-board power) then check out DevExpress. I don't think you'll be disappointed. If you're building a small app or something freeware, give Elegant UI a whirl. Even as a beta, it's quite good, easy to use, and looks just as powerful as most of the other offerings. Best of all, it's the quickest to get up and running with a Ribbon from the libraries I tried out. Most of the other ones, if you gave it an hour with any one of them, you would probably "discover" all the ways to manipulate the Ribbon (except DevExpress which would probably require a week). I'm impatient so only gave it the 10-minute litmus test but if I had to make a corporate decision rather than personal one, I would probably spend a day with a few of my favorites.

    Please feel free to add any I've missed.

  • Being a responsible open source developer

    First off, let's start this post by saying I think there are a few key points in computer history where things turned. The introduction of the GUI (even though both Apple and Microsoft just build on what Xerox did); the Internet; Object Oriented Languages; Microsoft Bob. Well, maybe not the last one but the others are valid and there are lots of others gems out there.

    I've been following the Office 2007 UI for quite some time, ever since I got my hands on early dog food alphas from the Office team. While some might not call it innovation, it just makes sense to me and I think it's a well designed and thought out piece of work. Yes, there are those that are not going to get it and require gobs of training and scream and kick and moan and want their beloved File menu and toolbar back. There is the other group where we embrace it and actually like it. I'll be the first to bitch and complain when I'm building presentations where the freakin' buttons are as I'm still getting used to it, but in the end that's it. I'll get used to it, just give it time. I like the look and think it's a good way to go and frankly, Microsoft made that decision long ago and like or not, we have to adapt and live with it (or not, but that's a different blog post).

    Skip ahead a few hundred blog posts and I came across Jensen Harris' entry about licensing the Office 2007 UI. Yes, a 120+ document about how to build the UI is a bit much and frankly I want to see component developers build controls that help me adhere to that standard. As an application developer, I really don't want to build an Office 2007 UI any more than I want to build my own implementation of the Windows Menu System or Toolbar. After all, that's what component developers do and that's why we buy their stuff. So awesome move on Microsoft's part to publish this, make it royalty free for those that want to build stuff. There is a lot of controversy over Jensen's blog post though, as people are questioning what exactly Microsoft is licensing (a concept? that didn't work for the recycle bin did it now) with some people calling Microsoft arrogant and others say they're brilliant. It'll be interesting how that conversation shapes out (and the comments on the post are quite in-depth, I expect this to hit Slashdot any minute now if it hasn't already).

    The licensing does bring up a bit of a pickle. The royalty-free license is restricted to products that directly compete with Word, Excel, Powerpoint, etc. So what does a product like Open Office, that cannot obtain the royalty-free license? And more importantly what if they purchase a copy of an Office 2007 UI component, say from Infragistics, and use it in the product? Is that a violation of the license or not. Licensing is always messy so I'll leave that to those guys to figure out.

    Anyways, back to some of the converging elements of what brings me to write this post.

    A long time ago on a computer far, far, away I gave RSS Bandit a try for reading my RSS feeds. It was a nice product and worked well but after some time, I abandoned RSS Bandit. It was a huge memory hog (which may be fixed these days) but more importantly, the developer kept revamping the UI by using free copies of commercial UI libraries. Three times he flipped out the UI and I thought (as did others) that getting burnt 3 times would be enough and you would stick to something free, open source, or native. Sorry, but if you're providing a free, open source tool, you can't force your users to be bound to a commercial library.

    As I understand it (and this view may be flawed) Dare Obasanjo, the author of RSS Bandit, received a free copy of the UI component for use in the project. Not unheard of on an open source project. Vendors see it as free advertising and it is. However doing this is tying the open source communities hands. We don't have a free copy of the software like Dare does and even if we did (if the UI component was say licensed for RSS Bandit) having the title heavily dependent on a tool that may or may not be there in the future isn't the open source thinking mentality. Imagine if DasBlog built it's foundation on some proprietary messaging system or database you had to buy in order to make modifications for? Where would it be today? Anyways, Dare and his recent post about what he was proposing for the next RSS UI is something that caught the attention of Mike Dimmick. His comment was what Mike called a misuse of the Ribbon concept, and I agree. I looked at the screenshots Dare posted and while they are prototype, they're far from what I think the Office UI is but rather a rather poor emulation of them. In addition, as some of the comments on Dares blog show, RSS Bandit might not be an appropriate application for the Ribbon concept.

    It is confusing as Dare posts later that Microsoft is releasing several new applications this year, all with varying user interface concepts. IE7, Office 2007, Windows Media Player 11. All from Microsoft, all with different interfaces. Even in the Office space, Word; Excel; and Powerpoint; share the Ribbon but other tools like Publisher, InfoPath, or SharePoint Designer do not. What gives? I think Jensen answered this as those products were not the "core" Office products so would not use the concept of the Ribbon. In any case, how do you go from one interface (File Menu, toolbars) to something like the choices we have now? Not an easy switch. If we as developers think the users are going to push back on Office 2007, then we'll be staying far away from that UI as much as we can if we want to keep our users happy. I don't believe in the concept that just because there's new hotness out there, that we should all flock to it, no matter how cool it may be.

    As application developers, we make choices. Sometimes bright, sometimes not so bright. However if we consider ourselves professional, we have a commitment to that professionalism and that's one of providing our customers (yes, even free open source weekend projects have customers) a product worth of its download. If we're dependent on a library or another tool, make sure that you have some plan to abstract yourself away from change. Sure, maybe the cool 2007 UI is the new hotness today but we as developers can, with a bit of forethought, build systems where the UI is swappable or at least "easier" to replace (I've done it many times). Patterns like Model-View-Presenter help with this and think about you can shift gears should you need or want to. What's cool today is cold tomorrow and painting yourself in a corner isn't going to win you any prizes.

    I for one welcome our Microsoft UI overlords and will be looking to incorporate the Ribbon concept in WinForm apps I build where appropriate, hopefully with the help of some free libraries out there but if not, and where I can, I'll use what commercial tools there are to present what I think will be a better user experience for you. I hope other open source and free tool developers out there follow suit.

  • It's not me, its you

    Yes, you as in you and not me. It's you, kind and gentle reader, that's been named Times person of the year. Every year around this time, Time magazine picks out some influential person or persons to be the "Person of the Year". Someone (or something) that has made a difference.

    This year brings about the community thinking so Time copped out and picked "You" as the person of the year. "You" being a collective term that refers to basically anyone with a computer and an Internet connection. Someone who visits sites, reads blogs, uploads videos to YouTube, crushes Elves by bashing their skulls in an online game, and generally carries on like we all do in our online world of knowledge, sharing, and camaraderie.

    Congrats to everyone reading this blog because you're You (according to Time magazine). You are now in the hallowed halls of such dignitaries as Adolf Hitler and the Ayatollah Khomeini. Amazing what happens to you on a Sunday afternoon reading some geeks blog huh?

  • The install that lasted a lifetime

    I don't know what the softies are smoking these days, but the guys (or gals) that put together the service packs need some serious optimization lessons. I downloaded Visual Studio Service Pack 1 yesterday, all 400+ megabytes of it. Sure, it says it fixes over 2200 problems so it has to be big right? Then came the install which involved the proverbial double-clicking on the file and the subsequent waiting. And waiting. And waiting. And waiting.

    Okay, I'm not running the WOPR here but it's a fairly good system. 2Ghz Core 2 Duo processor, 2GB RAM, etc. so I expect at least a little skip to my step. No so when running this crazy installer. First it had to "optimize" and "configure" my install experience, which took about 15 minutes. Then it had to install the actual update. All the time there was little disk activity, the biggest bottleneck on any system, so it's anyones guess what the system is doing.

    Finally after it ran through multiple "configurations" and updated my install of Team Suite, it was done. 1 1/2 hours later. That's just plain insane for a service pack. Even SP2 for Windows XP installed quicker than that. The Visual Studio guys (and Microsoft in general) need to take some lessons from iterative development and release little patches along the way. This big bang approach really sucks as I dread the day I have repave my machine and install VS2005 again.

    A couple of tips to try to keep the time down (as I've heard some people taking upwards of 3 hours for the process). Turn off everything, and I do mean "everything". If you're running a local SQL server shut down those services. Turn off any utilities that's frivolous like FolderShare and whatnot as you won't need them during the update. Shutdown messenger and kill off any extras you have running in your system tray. Also I recommend just running the service pack and nothing else. Don't try to read email or blogs during the update and maybe it'll go a little quicker for you.

  • SharePoint Security Webcast followup

    Thanks to everyone who turned out for the security webcast today on SharePoint. We had about 60-70 people on the webcast and I had a fun time giving it. A large part of the webcast was around the plugin authentication framework and leveraging the ASP.NET membership providers for using forms based authentication with SharePoint 2007. Unfortunately I didn't get to all the slides (40+ slides in 60 minutes) so if there's anything you're looking for more clarification or depth on, just yell.

    As a followup, here's the additional resource links I mentioned during the webcast or will be useful for you with regards to security and SharePoint:

    The webcast recording should be online in 24-48 hours so I'll post the link once it's available.

    And as I mentioned feel fee to bug me via email if you have any specific questions or scenarios you're trying to figure out. I have a few emails already from the webcast today that I'm following up on so watch for some replies to those and possibly some additional fallout blog postings that I'll share.

    kick it on
  • Compacting Virtual Hard Disks with VPC 2007

    As I'm putting together the final touches on tomorrow's SharePoint security webcast (you should still be able to register, after all I'm not having everyone over to my house... well, not quite), I noticed my SharePoint VHD file (the virtual hard disk format used by Virtual PC) has got quite large. This is due to the fact that I uninstalled Beta 2TR and re-installed the RTM bits (along with some other re-installs). Virtual PC doesn't reclaim the space when you delete items in the VM so it never really shrinks. This was a fairly laborious process under 2004 and required a few steps (as outlined here).

    Virtual Disk Wizard

    In 2007 it seems it's become much easier. Shut down the VM, run Virtual Disk Wizard on an existing disk, select Compact and you're done. Reclaimed all my space instantly with it (but took about 20 minutes on a 2Ghz Core 2 Duo). No mess, no fuss.

  • Got Security?

    As part of the Security on the Brain series of webcasts, I'm presenting an MSDN webcast this Wednesday called "Security - End to End in SharePoint". This is a 1 hour webcast on all aspects of security with SharePoint 2007 covering:

    • How to configure authentication
    • How to manage permissions bottom to top
    • How to securely configure a web farm

    This session describes the end-to-end security architecture in SharePoint, including Windows authentication, pluggable forms and Web SSO authentication, groups using SharePoint, system-wide and fine-grained authorization control, developer control over identity and permissions, administrative security options, and upgrade considerations. This session will also cover integration with Active Directory® Federation Services.

    You can still register for the webcast which starts at 1PM EST here. See you there!

  • MSDN community content - the right way to go, almost

    Quite some time ago I found out MSDN was moving towards a community content driven approach. A wiki style approach to the vast tome of knowledge known to us as the MSDN Library. This was a good move and I wanted to see it blast off as soon as possible. However the implementation has been somewhat lackluster.

    When I found out about MSDNWiki I was excited. The PHP and mySQL community have had a feature with their online documentation where users contribute information about each of the topics. Items like bugs, workarounds, examples, and further explanation of the topic are scattered throughout the original documentation. It's an absolutely wonderful environment because not only do you get the syntactical expressions of how to call say ctype_alnum in PHP, but you also get a tip that it could behave strangely depending on the type you pass it. Brilliant.

    Here's an example of the user defined types in mySQL from the community:

    User Comments

    Posted by Joey Bartlett on April 14 2006 7:54am
    These are very useful. You can use them for ranks.
    SET @pos=0;
    SELECT @pos:=@pos+1,name FROM players ORDER BY score DESC;

    This is the way community content should be. Only last week I was reading someone's blog that they went to the SharePoint SDK online only to find 3 or 4 properties with the bare bones, auto-generated documentation that provided nothing for them (or others).

    However the implementation of MSDN community content falls a little short. Sure, users can go online and add content to some areas in the documentation. Some. Community content in MSDN documentation isn't about items that have content, it's about the content itself. Don't give me a mechanism to find entries that have content added to them because that's not how we use documentation. We use it by going to the class that we need help on. If there's content for that particular topic, great. So my suggestion is just open up all topics to community content. I've read through various junctions that "many other developer sets will add this feature over the next few weeks and months". What are we waiting for? If Microsoft is serious about engaging the community and have us supplement their documentation with real-world experience, tips and tricks, and information that's better than a skim of the XML comments in their source code, then we need to be engaged; fully, madly, deeply.

    In addition, I personally prefer to use my local help as the primary source but in this day and age surely Microsoft can figure a way so that when I use my local help it can, in addition, supplement each help topic with comments from the online community? Am I asking for too much here? I don't think so. Each help topic, local or otherwise, needs to have a section at the bottom of it where anyone (maybe via your Windows Live login) can author content. A simple snippet of code, a simple tip or advice on the method or property in question. If I'm disconnected then just display the help content for me sans community content. This is neither rocket nor science. 

    Why can't my world be like this someday:


    We could get this today without Microsoft's help although I'm not sure I want to go down that path (or if I legally could do it). Someone could setup a web site with a simple app where you create an account (for identification purposes, basic stuff like email and name) and use that account to author content. Someone else could decompile the CHM files into their separate bits and writing a small utility, inject a link to the online site in order to pull down user contributed content and insert it into a new CHM. Additionaly, using IFrames, the online site could combine the MSDN and contributed content to form an experience like what the mySQL and PHP documentation sites do now. Like I said, this is just off the top of my head and not a solution by any means and there may be issues with republishing Microsoft content; not all documentation is in CHM format; blah; blah; blah; blah.

    Wouldn't it be a wonderful world if we looked up the documentation for Microsoft.SharePoint.Help.HCLockAction and actually found contributed content from users who have done something with this enumeration? Or an example of what you would use it for? Or something other than the auto-generated docs spit out from code comments that tells us nothing because the product team was focused on delivering the product (which is what they should be doing).

    Now that is real community content. I can only wish we move towards that model someday. Nudge, nudge, wink, wink, say no more, say no more.

  • Nothing but SharePoint MVPness

    If you're looking for the best SharePoint info then look no further. The Newsgator folks have put together an OPML with all of us SharePoint MVPs in it. Very nice to simply subscribe to this and you'll get the entire gang in one feed. Check it out here.

  • Visual Studio for Database Professionals on MSDN

    Just saw that the Visual Studio for Database Professionals is on MSDN now. It RTMed earlier this week but you can download the DVD image now. Also there is the MSDN Library to accompany it and for those without a Team Suite license, a trial version is available. I'll be doing some more posts on this later as I'm doing a demo next week of it and it's cool capabilities for the DataGuy (or DataGirl) in you.

    Also I found a little tip that might help you in avoiding to download the 3.2GB version. If you have a copy of Team Suite installed (not a specific flavour like Developer, Test, etc.) then you can download the file marked "Trial" (the 20MB one). When this version is installed over top of a copy of Team Suite, it becomes a full copy. Why you can do this and avoid the 3.2GB download of a DVD image is beyond me, but then I'm not into the whole marketing thing.

  • MSBuild, NAnt, NUnit, MSTest, and frustration

    Oh bother. Visual Studio 2003 and Cruise Control.NET. Simple and elegant. A basic NAnt script to build the solution and you're good to go. Run NUnit, output goes to a format CC can understand and Bob's yer uncle. Let me quantify this. Our cruise server has a subversion client (command line) and the .NET 1.1 SDK. Visual Studio isn't installed because, duh, it's a server and cruise just needs something to build the system with.

    Enter Visual Studio 2005. I just recently setup CI for our 2005 projects but it's just plain ugly, in so many ways. First there was trying to get the system to build using MSBuild. That was fine because you can simply enter this:

    msbuild /t:rebuild solutionname.sln

    (or whatever target you want like Debug or Release)

    Like I said, if that's all it was no problem but it gets real ugly real fast.

    First there's VSTS unit test projects. The team is all equipped with Visual Studio Team Suite. An expensive proposition, but one made long ago by someone wiser than me. No problem though. We're not really using the Test Manager much, there are no automated web tests, so we just write unit tests (and run them with Jamie Cansdales excellent TestDriven.NET). However when MSBuild gets ahold of a solution that contains a VS unit test project it needs some additional set of assemblies (assemblies buried in the GAC_MSIL and other places). The snippet in the ccnet.config file to get MSBuild going was pretty straight forward:

        <buildArgs>/noconsolelogger /p:Configuration=AutomatedBuild /v:diag</buildArgs>
        <logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>

    Through brute force (run MSBuild, figure out what assembly it needs, go find it, lather, rinse, repeat) I was able to get a 2005 solution (with unit test projects) to compile. However actually running the tests is another story. Again brute force reigned supreme here as I trodded through an hour or two of running MSTest.exe to try to coax a couple hundred unit tests to run. The cc.config entry for getting some unit tests looks something like this:

        <executable>C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\MSTest.exe</executable>
        <buildArgs>/testcontainer:Source\Tests\UnitTests\bin\AutomatedBuild\UnitTests.dll /runconfig:localtestrun.Testrunconfig /resultsfile:testResults.trx</buildArgs>

    Remember that I said this sever did not have Visual Studio installed. For the VS2005 solutions, I just installed the .NET SDK 2.0 and that was good enough. Although MSTest.exe isn't included, I snagged the file (and it's crazy set of additional DLLs scattered all over the hard drive) from another system and stuck it where the EXE was so it would be happy. 

    No dice on running MSTest against a unit test project. It started down the path of running the test, but then hit a crazy COM error (CLSID not registered) and that was enough for me. No way I'm going to track down all the stupid COM registry settings for Visual Studio 2005. And what the hell was this? COM? I thought we got rid of that about 3 compilers ago?

    So I was stuck to installing a full Team Suite on the server. Okay, I'll bite. I mean, I don't need everything so it'll be okay (I keep telling myself as I watch a million registry entries fill up). A few hours later and I'm staring at my command prompt again and type in my MSTest.exe command. And a dialog box pops up. Yup, a modal dialog box that tells me something is wrong (I don't remember the specifics but it wasn't very informative).

    Visual Studio was installed fine and I could compile and run and build the solution I was trying to, but testing from the command line with MSTest.exe was a no-go. No matter how hard I tried, how much I cleaned up, or how many virgins I sacrificed it just won't go. And there's another problem. With 2003 and our NUnit tests, we go some nice stats. Timings, informative messages, all that good stuff. With MSTest we get nothing (other than x number of tests ran and maybe a failure, but I couldn't get that far to see if it would give the details of the failure). On top of that, the MSBuild logger bites and produces about 10,000 lines of gobbly-gook that isn't very useful. Yes, I could spend my time writing new xslt to make it pretty, trim out the "Everything was okay" lines that fill up the MSBuild task logger but I think that's not value-added at my rates.

    Here's a sample email I got from the build which gives you an idea of how useless a CC.NET/MSBuild/MSTest combo is:

    Project: PROJECTNAME
    Date of build: 12/8/2006 8:08:30 AM
    Running time: 00:00:55
    Integration Request: intervalTrigger triggered a build (ForceBuild)
    Errors (1)
    D:\ccnet\projects\PROJECTNAME\Source\Reports\ServerReports\ServerReports.rptproj (2,1): error MSB4041: The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="" to the &lt;Project&gt; element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format.
    Warnings (1)
    Source\Reports\ServerReports\ServerReports.rptproj (,): warning MSB4122: Scanning project dependencies for project "Source\Reports\ServerReports\ServerReports.rptproj" failed. The default XML namespace of the project must be the MSBuild XML namespace. If the project is authored in the MSBuild 2003 format, please add xmlns="" to the &lt;Project&gt; element. If the project has been authored in the old 1.0 or 1.2 format, please convert it to MSBuild 2003 format. D:\ccnet\projects\BRMS\Source\Reports\ServerReports\ServerReports.rptproj
    Tests run: 0, Failures: 0, Not run: 0, Time: 0 seconds
    No Tests Run
    This project doesn't have any tests
    Modifications since last build (0)

    It's ugly. Really ugly. MSBuild produces a ton of crazy output. Writing a new MSBuild file is no walk in the park and even for someone like me that knows NAnt quite well, I'm still wrapping my head around how MSBuild does stuff. I had to create a special configuration inside of Visual Studio to omit our Report project because MSBuild can't build them (hence the target AutomatedBuild above which is not the same configuration that our developers use and something I don't like doing because that's one point of a CI server, consistent builds for everyone).

    From the output above, Cruise said the build was okay but there's an error message that came out of the MSBuild logger (our report project). This is a 2005 project so the information makes no sense (I belive it's a bug that's logged but who knows when it might get fixed). And I really can't integrate the MSTest output into the email because, well, there is none. There's a hundred tests or so in this project but the logger doesn't produce anything. 

    Additionaly, there are some project types MSBuild can't handle and again, it takes a rocket scientist to create an MSBuild file (even using something cool like MSBuild Sidekick) that can call another MSBuild task and exclude certain projects. This certainly isn't as easy as it was in 2003 where you just created an exclusion list (we excluded our client app as there was no extra license for the grid control and a modal dialog came up when the trial version was even looked at by the compiler).

    Okay, this is mostly a rant but there's some wisdom here. Continuous Integration does not need to be this hard. CruiseControl.NET is an excellent tool and very flexible with new tools and integrating output from those tools. However when those tools require a million registry settings and even more DLLs (put in very specific places, trust me, you can't just toss them in the GAC and call it a day) and dump gobs of XML that no mere mortal (well maybe DonXml could) would be able to translate, it's just wrong. And as for the built-in Team Build that you could us, that's equally as useless as a) you can't schedule builds to trigger off of code checkins and b) again it requires a full Team Suite client to be installed on the server. Worst case scenario when I first started setting up CC.NET servers it took 4 hours. Now I can get it done in an hour (which includes testing the build of the first project). I've already spent a good day on just trying to get something to compile. It's compiling now but the output is crap and no running of tests and thats just not good enough for me. You can get MSBuild and (maybe) MSTest running with CruiseControl.NET. It's not impossible. If you install the full client and your projects are "just right" it'll work but the output isn't that hot and you'll watch your server CPU slam when compiles happen.

    My advice, avoid trying to combine MSBuild, MSTest, and CruiseControl and stick to NAnt, and NUnit (using MSBuild if you have to when building 2005 solutions).

    Needless to say I'm looking at one option right now. Dumping the install of VS2005 on the server, changing all our unit tests back to NUnit and using NAnt to do everything (and just calling MSBuild as an exec task for VS2005 projects). I still need to run 2003 projects so our CI server is going to look like a Frankenstein monster by the time I'm done, building VS2003 and VS2005 projects, running NUnit, MSBuild, NAnt, Simian, FxCop and whatever else we have in our mix. Even given that, using NAnt the output will be simpler (and integrate well with CC.NET), test output will be useful and informative, and I don't need to install a $15,000 piece of software on a server that has the distinct possibility to pop-up a modal dialog someday when it can't find some registry key.

    Grrr. Argh.

  • Settling in for the holidays

    And finally getting caught up!!!

    Oh man, it's been a roller-coaster ride the past while but I think the worst is over (and the best is yet to come). Vista launches, SharePoint RTMs, new VMs, two sprints completed, new ScrumMaster duties on YAP [yet another project], new laptop, dogs and cats living together... mass hysteria! Tonight I'm finally taking a breather, just to get back on track this weekend with a bunch of stuff like posting crazy entries around everything that's been building in my own backlog.

    A couple of things as I'm sifting through the rubble. I broke down and bought a new laptop. My Presario 4000 was good (it was aimed as a desktop replacement) and a year and a half ago it was. Fast, heavy, but impressive. Most impressive. Now it's all about Core 2 Duo and that so I snagged a Inspiron 9400 from Dell and couldn't be happier. It's an inch larger all around, but half as thin; 3lbs lighter; 100db quieter; and about the same price as I paid for my Compaq. 4-5 days of setting up and installing software and tools and I think it's good to go. I've already given one presentation on using NetTiers and CodeSmith with it (which was a bit of a joke trying to get used to the new keyboard so lots of typo's in the demo).

    Secondly I saw that JetBrains has released their Omea Pro product for free now. I was using the free Reader but now have updated to the Pro. It's everything (mail, rss, newsgroups, tasks, etc.) all in one package and very well done. I gave up on RSS Bandit as it was just chewing up memory like there's no tommorow and Omea lets me flag things say in newsgroup threads so I don't have to read every thread out there. The uber cool thing? They're going open source so we'll get to see how the guys who created ReSharper write code. Very cool learning experience and a very cool tool that will hopefully grow when the community gets its hands on it (I would like to see a WPF version come out of that). Also there's a 2.5 EAP of ReSharper out you can grab, although it's a little buggy (as all EAPs have been with these guys) but looks like it's going to be killer when it releases.

    BTW, if you really only want to subscribe to one blog to find cool (geek) stuff out there check out Jason Haley's Interesting Finds. He's recently (the last month or two) added short comments to the blog entries so it's a great feed to look at and keep on top of cool stuff he finds (most of which I consider cool as well) without having to subscribe to everyone on the planet.

  • Still alive and kicking... in Edmonton

    Just wanted to let you know I haven't dropped off the face of the planet, it's just been a crazy couple of weeks after returning from DevConnections in Vegas. I'm on and offline so posts are spotty. I'm also up here in Edmonton, Alberta for the first Vista/Office 2007 launch event. This is the first launch event for Vista, Office 2007 (client and server) and Exchange 2007. Funny how the first event is Canadian (go Canada eh!) as the U.S. launch is in January.

    Anyways, I'm at the experts booth today at the event so if you're there, stop by and ask questions and make me work for my lunch. We'll also have some computers setup so we'll see if we can get a demo or two going. It should be a blast.

    Last night we had the VIP event at Brewsters here in Edmonton. A great turnout from the various UG leaders, local MVPs, and softies. I met up with local Access MVPs Tony Toews (and finally found out how to pronounce his last name) and Albert Kallal, a MVP that shares a last name with Superman and bears an uncanny physical resemblance to BillG.

    My fellow plumber John "The Pimp" Bristowe (sporting the latest cool swag, the Developer Night in Canada t-shirt) is giving most of the dev sessions today and is on the road with the event. He was there last night (along with my other Plumber/MVP James Kovacs). John was emcee for the night, handing out the usual t-shirt swag and other goodies from the MS Warehouse and telling us again how big the one he almost caught was. It's going to be a long day today with a full day of sessions, a reception tonight and a 3 hour drive home to Calgary in the snow.


    Catchup blogs in the queue:

    • Code and resource links from DevConnections. Just have to zip up the source and get it online, blog post is done.
    • SharePoint Forums and Knowledgebase web parts updates including 2007 (RTM) compatibility. Aiming to get this out in the next week
    • Scrum retrospectives from two iterations on a few projects, should be fun for some discussion and learning
    • Launch event (with pics) and last nights VIP event (with more pics). I'll also be at the launch event and VIP reception the night before in Calgary next week.
    • A couple of other small (new) SharePoint tools for developers

    So much time and so little to do. Wait a minute. Strike that. Reverse it.

  • SharePoint, RTW

    Joel Oleson, a senior product manager on Office SharePoint Server, announced on the SharePoint Team blog the RTW (Release to Web) version of WSS and Office SharePoint Server 2007 (Standard and Enteprise editions). These are available for download so you can start using WSS immediately in a production environment (this is the final version) and install eval versions of MOSS if you so desire. Joel even posted the product keys for installation if you need them and where to download the files. Check out his post here.

    Jeff Teper, Mr. BigWig himself (the corporate vice president of SharePoint Server), also has a post here describing the journey and how important MOSS is to the even bigger guy, BillG. Congrats guys, it's been a long and winding road but we're finally there (or here, depending on which way you're looking at it).

    Now back to my DevConnections post and other SharePoint-y stuff.

  • 21 flavors and nothing on

    Confused over Office 2007 capabilities and SharePoint? Some of us are, but hopefully we can make some things a little clearer with this.

    Okay, brace yourselves. Now that Office 2007 has RTM (released to manufacturing) and will be available for download for business customers on November 16th (some versions are now available on MSDN downloads) there's the question of what version does what (as it pertains to SharePoint).

    As of right now, there are 8 different SKUs for Office. They are:

    • Basic
    • Home & Student
    • Standard
    • Small Business
    • Professional
    • Ultimate
    • Professional Plus
    • Enterprise

    What's even more confusing is what can you do with each one (and more importantly what you can't do). Still even more confusing (I'll never understand Microsoft Marketing) is that Enterprise (the top of the line SKU) doesn't include Outlook with the Business Contact Manager (a pretty neat feature). You only get the standard Outlook client. The next version downscale from Enterprise that includes the contact manager is Ultimate (Professional Plus doesn't have it either). Rather strange as Pro Plus is like Enterprise but without OneNote or Groove, but doesn't include the contact manager. Again, I'll never understand the marketing guys.

    One of the cooler new features of Office 2007 is the Document Information Panel (DIP). This is the grown up version of the File Properties dialog box you get with 2003 but has so much more like workflow and customization. It basically presents whatever metadata your document contains in a nice InfoPath-like form at the top of document. The Document Information Panel helps address a major challenge facing organizations: ensuring that documents are tagged with the appropriate metadata to make them easy to find, discover, and manage over their entire lifecycle. 

    In the 2007 edition of Word, Excel, and Powerpoint, the properties in the DIP can be automatically synchronized with the backend system (SharePoint) so things list values are pulled down, synced, and kept up to date. And in Word the properties can sync with the document content itself. Additionally the Information Panel can also respect (and kickoff) workflows hooked up to its fields so it's a pretty powerful tool overall.

    The Document Information Panel is completely customizable and you can even build your own. You can check out this Channel 9 video on creating your own custom DIPs (don't you just love that acronym?) here.

    As the panel is pretty much an InfoPath form (behind the scenes) and a local InfoPath installation is required to see this gem as well as the right version of Office. Yup, you heard me right. You need either Ultimate, Professional Plus, or Enterprise to get this goody. The new run-of-the-mill Professional (which you think would be for oh, say, professionals) version just doesn't have it. Sucks to be a pro now eh? We all have to be Pro+ now.

    Of course, you always (in any flavor) have the Office "Jewel" (gak I really hate that term) which lets you access the "old-style" document properites like so:

    However there's no workflow here, dropdown lists are limited and some properties won't (read: can't) show up here. Values will make it back to SharePoint but it's as basic as it gets here and pretty much what you get in 2003.

    There's a matrix of what's what in each version here on Microsoft which should help muddle through the confusion. There's also an update of the "Good, Better, Best" whitepaper (2003 version here) on 2007 and integration features coming soon from Lawrence Liu (whose blog you should subscribe to as he has lots of great SharePoint goodies).

    You'll still be able to create new documents, open them, checkin/out, etc. with 2007 and SharePoint but as you slip down the scale in flavors (and regress back to the 2003 version) you'll continue to loose functionality and integration but the basics will always be there.

  • Back on Terra Firma

    Finally back in Calgary. What a horrible experience. Okay, I'm not a world traveler. I've been to a dozen or so cities in North America over the past few years speaking and presenting so I'm not a newb, but I'm also not a pro. However I do know when an airline service sucks. The last 24 hours has been just that. Suckage. Huge suckage with no hope of redemption. All courtesy of America West, the worst airline I've ever been on.

    Take off

    First off, the last week was great. Thanks to everyone that came out to DevConnections as it was a blast. I'm hoping to get out to Orlando for the Spring 2007 one (ping me if you're looking for a specific topic that interests you as I'm just putting together my abstracts now). Sorry for the lack of technical content blogs as I really didn't get too much time to see anyones presentations or spend much time at the conference itself (however I will post notes, resources, links, and code from my presentations in the next few days). Rather most of my time was soaking in Vegas and all the craziness it encompasses (like the Venetian below, absolutely spectacular)


    Oh yeah, the airline story.

    It started way back with the departure from Calgary, but that's so long ago now. However Sunday has been just reliving that experience ten-fold. First our flight out was to be at 11:59pm Sunday night. We did call them to try to rebook, and as God is my witness I've always been able to pay a $100 rebooking fee (or no fee for that matter) yet these bozos wanted $400 for each ticket to rebook for an earlier flight. No way. Yeah, midnight is a truly stupid time to fly but in retrospect when I booked the flight it was the only direct flight from Vegas to Calgary so I thought it would be okay. Red eye, empty airplane, lots of sleep, no big deal. That thought changed when we got to the airport at 9:30pm and saw a line longer than the exodus itself from Egypt. Apparently America West only has one line, for all flights. Nice.

    An hour in the ticketing line to check our bags in and then carry those bags over to another area with another line. Oh, this is efficiency at it's finest. Luckily that line was short (about 20 people) and we just dropped off our bags, hoping they would arrive with us in Canada. The security line however wasn't as short and that was another 45 minutes of listening to how they're short of bins so shoes have to go on the conveyer belt. Sure, since 9/11 security is hyped up and all that jazz but get a clue Vegans, having 8 different check-ins all merge into one line is just not cool.

    Finally we made it through the security checkpoint only to find out that they now wanted to "check our documentation" for all passengers on the flight. So another gigantic line with the clock ticking away at when our flight might actually take off. What was even more frustrating is that they said (finally) if you have a "DOCS OK" printed on your ticket (which we did back at the initial checkin) you didn't have to do the double-check. Thanks for telling us that 20 minutes after you make us line up for the check in the first place. And what the hell is with this extra doc check? I mean, we've been through ticketing, we've been through security. If you haven't got it right by then, an extra check isn't going to help much (other than make people peeved at the airlines, like I am).

    Okay, we're on board. Flight is full so no chance to upgrade to first class but then given the fact they wanted $400 each to change our fights, I would have hazard to guess they would probably want more for an upgrade (even though they advertise you can do it for $50). Then we wait.

    And wait.

    And wait even more.

    The crew is coming over from another flight so we have to wait for that now.

    15 minutes.


    The crew arrives but now there's some checklists they have to go through and it'll only be a "few more minutes".


    Now there's some ventilation thing that has to be checked by maintenance.


    The lights go out and the video starts playing telling how we're all going to die and when we do, make sure you use the seat cushion as a floatation device. Actually, at this point I'm going to use the pilot as a floatation device as I'm sure he has a big enough head.

    The flight finally took off and it seemed to go well. Until about 15 minutes this side of Calgary. Then we hit a bad spot of turbulence.

    You know when you're on a roller coaster and you take that first dip down the big hill towards the winding bend? Yeah, it was like that. Only worse.

    I'm sure the plane basically flipped 90 degrees on its side, the started to drop down. It only lasted a few seconds, but that was enough to warrant screams and gasps from the more awake people behind us. Yes, screams as in "We're all going to die" sounds. Not something that you want to hear on a plane. My heart was pumping and the adrenaline was churning but for me, until we slip into a flat spin and I see John Candy in a devil suit sitting next to me, I just shrug it off. The pilot came on immediately to tell us everything was fine and then proceeded to tell us that every 5 minutes until we landed. Close, but no cigar but still it was something to perk you up at 4 in the morning.

    Like I said, I'm not a world traveler but in the times I have traveled I've never see a more incompetent collection of buffoons running a circus like the ones at America West. Bottom line, I will never, ever, ever, never, ever fly with these morons again. You couldn't pay me to step on their planes again.

    Worst airline (and flight), ever.

    Anyways, goodbye Vegas. It's been fun. Next time I'll fly Canadian.

    End of the strip

    You can check out my Flickr set here to see all the pics I took down there. Enjoy!

  • DevConnections - Day 3 - Sessions, sessions, sessions

    Just a quick note as I'm trying to catch up on the blogging this week. My sessions are done as of yesterday and I'll have links to various resources as I get the blog entries done over the next few days.

    I just wanted to mention that the Community Technology Preview release for Visual Studio 2005 Extensions for Windows SharePoint Services is out. This is the grown-up version of the Web Part templates for 2003 that would create a Hello World Web Part, but it is so much more than that. This is a 1.0 release and there are some restrictions using it (for example you have to have a zone in order to have a data view web part rather than just plopping it on a page). You can download the CTP here. There is a bit of a chicken and egg problem in that the tool doesn't work quite right with Beta 2 or Beta 2 TR, but at least you can check out the Visual Studio interation.

    Mindsharp Guys

    Thanks for the great feedback on the session here in Vegas as the comments were much appreciated and help me shape better value for you guys in the future. The only thing with the feedback is that I got some negative feedback because I didn't have slides, and the feedback was that there was nowhere to take notes. Yell at me if you want, but there are blank pages in the book for notes. I don't believe that there's much value in having slides with regurgitated content from a demo. The value in the demo is from the demo itself and generally slides that have bullet points really need a lot of context behind them for them to make sense if you look at them days or weeks later. I'm not saying slides are no good and to each his own, but I'm just finding that in past presentations I've done, the slides had little value in actually being a reference. So I'm currently slideless in my presentations and probably need to rethink this to find a good balance between no slides and slides with gobs of text on them. Anyways, the whole presentations without slides is an entire blog entry that I'll think about as I'm sure everyone has an opinion about it.

    Also based on the feedback that some of you provided in my sessions I am going to be doing a series of blog entries on small bits and pieces of things that I would go over in the session. For example there may be a small thing that I demo'd for 10 minutes but it's worth a full blog entry that would go through it in-depth. This makes sense to me as you have to cram so much into an hour presentation, but a blog entry should provide a lot more value as a follow-up. So watch for these SharePoint 2007 entries in coming weeks.

    BTW, if you're in Vegas you just have to drop by the Bellagio and see the fountain show. It runs fairly frequently and is set to music (different music each time it seems) and really impressive. Check it out but here's a pic of it from last night:


    Todays Gambling Debt: -$200. Bad luck at the machines.

  • DevConnections - Day 2 - The Twelve Days of Vegas

    Okay, there are only 4 days for the conference but if were around for another 8 this is what it might be like:

    On the twelfth day of Vegas,
    my vendor gave to me
    Twelve ugly mouse pads,
    Eleven tins of breath mints,
    Ten Windows stress toys,
    Nine network cables, 
    Eight USB hubs,
    Seven drinking vessels,
    Six CD holders,
    Five Channel 9 guys,
    Four crappy t-shirts,
    Three DVDs,
    Two laser pointers,
    And a stylish new laptop bag!

    Taking a break

    Enjoy the conference while you're here.

  • DevConnections - Day 1 - Brush with greatness

    A funny thing happend on the way from the speakers room today. Julie Lerman said "Oh Bil, you're the perfect person". Well, I never really considered myself perfect but who am I to argue. What she meant was that I was perfect for some interview hooligans that was going on at the entrance to DevConnections. Greg Proops is a comedian who's claim to fame is the very funny show Whose Line is it Anyway? Greg and crew were on-site at DevConnections interviewing geeks and nerds and asking questions like "What would you do to fix Microsoft". Oh god. Let's sit down and go get some more video tape. I interviewed with Greg (well he was doing the interviewing but I wasn't being the adle-minded geek so I had to just go off on whatever tangent came to me, this was being caught on film you know).

    I have no idea what they're doing with the tape or where it will show up (and if they respect ratings they won't put my mug online anytime soon) but it was a fun gig. I would post the picture I got of me and Greg standing and looking silly but they took a polariod and for the likes of me I can't find a scanner around this place, so that will have to wait. I had my digital there with me but for whatever reason they wouldn't take the shot with my camera. The nerve of some high-priced actor eh? Last time I'm watching his show (feel free to boycot the show as well and tell him I told you so, that'll teach him from not taking a picture with my camera).


    As for the conference, I have to admit I didn't spend much time around the floor today. I was trying to get out to the exhibitor booths and say hi to a few people (Bamboo, CorasWorks, Quest, etc.) and I will do that over the next day or so (promise guys!) but it was a lazy-try-to-enjoy-sin-city day for us. I'm just finishing up my code for tommorows session on Events with SharePoint and will post the code samples after the morning session. No slides as I think they're silly so a few notes written in Notepad that I'll flash on the screen and code, code, code. Sorry for anyone who's looking to buff out their powerpoint deck collection as you won't get any from me this week. 

    Tonight a walk along the strip to the Bellagio where we caught some of the fountain show, did some more gambling, and watched the street dealers hand out portable porn to people where you can get an hour with Jody and Buffy for $99. Wonder if that includes a shiatsu massage? I guess anything is possible in Vegas. No pictures as I was too dazed from yesterdays late night to remember it but I'll catch a bunch for you later and create a new Flickr set called "Las Vegas" for those that need it. 

    And what's up with Vegas? Two quirks for the day. I can't seem to get a lime. Anywhere. Ever. Lemons are plentiful, but limes seem to be an alien organism that doesn't exist here. At least everywhere I try to eat. The other thing is everything is so damn big here so if you order, order less or else you'll just be wasting most of your meal.


    So last of the non-technical content, tommorow it's presentations and techno-babble for everyone!

    Todays Gambling Debt: -$5.00: Lost $80 on slots but then won $75 back again.

  • DevConnections - Day 0 - Viva Rock Vegas!

    Hey kids, what time is it? Why it's "Live vicariously through Bil's Blog in Vegas" time. Yes, Fear and Loathing finally hits the Vegas trail and we're here in DevConnections at Mandalay Bay for a week of fun, frolicking, gambling our life away, jumping out of planes wearing flashing-Elvis suits, and giving a presentation or two at the conference.

    Yesterday started off with a bit of a cough and a snort. We woke up around 3AM to catch a 7AM flight out of Calgary. This was a huge mistake, not only because I live an hour from the airport but because of how airport time works in Canada. At 5:30 they open up customs and security area, so until then there's no way to check in as we have to be strip searched and all our water confiscated before entering the evil United States of America (bad, bad, naughty Canadian water!). However there's also another rule (or more of a guideline) that you should be at the airport 2 hours ahead of your flight for checkin. This proves to be a set of business rules that conflict with each other, something I thought I would avoid on a trip like this. The solution, as far as the Calgary Airport Authority is concerned, is to not check people in at the flight counters until after 5:30. Great. The backup was huge and we spent the better part of Sunday morning in lines waiting to be processed. In any case we basically walked right onto the plane as we shuffled through checkin (US Airways, get some freakin' computer checkin consoles), customs, and security. Mental note to self: Don't fly at 7 in the morning again. Ever.

    We hopped onto the flight and after sitting through an excruciating 3 hours of playing Cranium Trivia on the overhead projector we made it to Arizona for a stop over. Two things with the flight to Phoenix. First was a Katherine Hepburn clone in the seat behind us. All through the flight as they played Cranium on board (which was a cool thing) she would bark out the question, along with an answer (usually wrong, or rather *always* wrong) then some silly story about how old she was and that her brain didn't work so well. You think? Nice try Grandma Dynamite, but please keep the comments to yourself. Second was the connecting flight. We were trying to see where the flight was at and was greeted by this:

    BSOD at Arizona airport

    How appropriate. Julie Lerman commented a few days ago how they had to "re-boot" the airplane, now we're getting error dialogs at the airports. Luckily our flight was on another monitor, but too bad for the poor schmucks on the flights were you couldn't get information. And this was on *every* monitor (rightly so as it was a server problem). Well I am going to a Microsoft-centric conference. Wonder if the airline departure screen would have done this if it was SharePoint (don't answer that, it could be worse). So another 45 minute flight and we were in Sin City.

    Las Vegas airport. You will never find a more wretched hive of scum and villainy. And slot machines! At the airport! OMFG. That was just weird with a capital "W". Rather than taking a cab or shuttle we opted for a limo. When in Vegas, do like the Vegans. So after a 10 minute wait it was a 10 minute ride for $60. Not bad considering I'll probably blow that much in 10 minutes on the casino floor. What was weird (with a small "w") was that as the luggage was coming off the rack, Jenn commented that it was vibrating. Yeah, probably somewhere between Calgary and Barstowe my electric toothbrush had gone off and was vibrating ever since. Time for a new battery.

    I was completely horrified and devastated to learn that CSI (the original cool Vegas one, not one of the crappy rip-off ones) isn't actually filmed in Vegas. Most of the filming takes place in California with 2nd unit shooting in Vegas (sometimes). So no Gus Grissom for me. That alone was almost enough to send me packing, good thing they have 24 hour buffets here to tide me over.

    The room at Mandalay Bay is great except we're not looking down the strip, which I had hoped for, and no amount of screaming or complaining or flashing my MVP badge would help. Instead it's a beautiful view of the Nevada mountains and the airport. It's quiet though except for when the fighter jets take off for Area 51, but you don't notice it much (probably all the ding-ding coming from the casino drowns it out). As for the conference, well, it's huge (I'm worn out just walking to pick up my speaker stuff) so that's another blog.


    Todays Gambling Debt: +$300 (Thanks to the slot machines!)

    P.S. Sorry for the poor quality of the pics, I'm missing my image software and working with a new camera so trying to get used to it.

  • Picture Perfect and Ready for Vegas

    We're just finishing up the packing and all that jazz to leave for Vegas and DevConnections. As is my tradition, I'll be snapping 1.65 billion photos (1 for every dollar Google paid for YouTube) of people there, silly conferences, concealed lizards, logging chains, and various keynotes with Bil generally making a fool out of himself as he pretends to know what he's doing. All while exposing myself on the wub-wub-web. Watch for 2-3 entries a day over the next week wtih lots of pictures of Elvis, Mort, and Celine (and maybe a few Guthries and Hanselmans thrown in for good measure).

    Its funny as I don't consider myself a good photographer at all. Yeah, I think I have some idea of what constitutes good design (otherwise all those years in Art College was a waste) and I did take some photography courses back in my day so I can drop a few f-stops of my own in a conversation. Yet I don't consider my pictures that good, compared to ones that take my breath away from most people on Flickr.

    In any case, twice now my pics have been gobbled up by a group called Schmap. Schmap makes interactive guides that let you virtually move around cities, looking at attractions and sites. They grab pictures from lunks like me who offer them up via a Creative Commons license. That's what CC is all about, sharing for sharing sake and not for profit. They don't charge for the guides (but I'm sure they might make money from advertising) and they don't pay the people for their photographs, but I don't care. It's fun to see my pics published and I'm glad it might help people so they can see what I thought was interesting wherever I went. The previous time they included a picture of mine was for their Calgary guide so now it's the Orlando one. Sure, Schmap isn't National Geographic but hey, it's fun and free. You can see my pics from Orlando and the last DevConnections that are being included in their Florida guide here (sorry, just touristy pictures as I guess they didn't consider images of geeks to be Schmap-worthy).

    So it's off to Vegas tommorow and snapshots galore. Who knows, maybe I'll see a note from them when they publish a Vegas guide.

  • Tag Cloud for WSS 2007

    Found an interesting article over at a fairly new site, Windows SharePoint Services (WSS) V3 Search ( It has a free solution that allows you to add tag clouds to WSS.

    This blog (Community Server) uses a tag cloud. It's the big glob of text that shows how popular different tags are. Each "tag" is given a weight, based on some value. For this blog, it's the number of posts I tag with that subject so looking at the blog you can see I post mostly about "SharePoint" and the least number of posts are tagged "Website". It's very common these days and helps you hone in on the most popular stuff (whether it's blog entries, news items, whatever).

    The guys on have put together a nice little package for 2007. It's a tag cloud and a web part so you can get a tag cloud setup on your site. My only wish is that they package it up as a solution file so you can just deploy it, rather than doing everything manually. In any case, check it out and see how you might use it. Hook it up to your WSS blog? Tie it into a document library? Or attach it to a Links list so people can see the most popular links.

    You can find the web part here. It's released under a Creative Commons License and free to use.

  • Refactoring to Anti-Patterns

    We all know the idea of refactoring to patterns is good. In fact that's generally how I refactor. I see a code smell (say you have a loop that is doing too many things) and refactor to a pattern like Split Loop in order to fix the smell. How about refactoring to Anti-patterns? Or just plain detecting Anti-patterns in unit tests. That's what James Carr is up to here.

    Patterns are everywhere and people have been putting togther catalogs of patterns and making them available to everyone (usually through something like a Wiki). Examples can be found here, here, and here. As an off-shoot of pattern catalogs, there are also Anti-Patterns. These are the alternate universe evil version of patterns (yes, just like the evil Spock) and I'm sure you've written them (I know I have). There's a category of Anti-Patterns here and a great site about Anti-Patterns here (including information about Anti-Pattern books).

    TDD has patterns, or rather we refactor our code (an exercise in TDD) to patterns. Much like how I described the Split Loop pattern. You see something that smells bad, and think of a way to make it better. Applying a pattern to it is like taking a template idea (one that's been proven time and time again) and adjust it for the situation. Think of patterns as recipes as in baking. They're not rules but rather guidelines as to how to do something. Like baking you might add a dash of this or a hint of that to spice things up. With patterns it's the same thing and you adapt and make small corrections in applying a pattern to your style.

    However we can also look at code and see Anti-Patterns. The evil under-doings of things done poorly. Things like the cut and past programming (how many times do you see this?) or the Golden Hammer pattern (where everything is a nail even if it looks like something else and you apply one technology to make it work, can someone say DataSets everywhere?) are examples of development Anti-Patterns.

    In TDD there are also Anti-Patterns that crop up. This might be the result of getting to deep into trying to write a piece of code to test and forgetting about what you're really accomplishing. The Mockery or Excessive Setup Anti-Pattern touches on this. Imagine mocking a factory that mocks several calls to each of several factory methods, which returns several mocks, each with several exceptions... Even reading that makes my head spin. And the end goal? Assert.AreEqual(true, businessObject.Value). Craziness!

    James has put together a collection of his own (and others) TDD Anti-Patterns. The discussion has been going on in the TDD mailing list for awhile so here's the collection of them. James is looking for some feedback on this so please look at contributing. It might become another catalog resource that we can all use. It'll be great to see this expand as examples are produced complete with refactorings to get yourself out of this TDD Hell.

    No, I don't suggest you refactor "to" Anti-Patterns. That was just a title for this blog entry. Rather check out the list and either see if you can contribute to it or maybe use it to find your own code smells in TDD code you've written. You can check out his list here.

  • My Sessions for next weeks SharePoint Connections in Vegas

    Next week I'm presenting at SharePoint Connections, part of the DevConnections group of conferences going on in Vegas. This is a 4 day conference that includes SharePoint, ASP.NET, SQL, .NET Development, etc. Here are my sessions I'm doing:

    HDV206: The Main Event: What Wonderful Things We Can Do with Events
    Microsoft Office SharePoint Server 2007 provides developers with an enormous amount of flexibility when it comes to responding to events. The new system has events into everything, far surpassing what is currently available in 2003. Events now can be hooked into lists and there are many more events that can be programmed against. In this session, we’ll take a look across most of them and demonstrate how you can leverage them to provide the best bang for your development time.

    HDV407: The Secret of My Success: Inside the Business Data Catalog
    The Business Data Catalog (BDC) feature of Microsoft Office SharePoint Servers 2007 provides an easy way to integrate business data from backend applications, such as SAP or Siebel, with your corporate portal to provide rich solutions for end users without writing any code. We’ll dissect what makes the BDC tick, how to hook it into things like workflow, leverage new features like the timer functions and work distribution model, and then tie the whole thing into backend systems with little effort.

    HDV208: Toys: An In-depth Look at the Best Tools You Can Have in Your Developer Toolkit for SharePoint
    Give us the tools, and we will finish the job. There are many tools available for developers when it comes to SharePoint but what should you have in your toolkit? This session explores and demos not only what’s available and how to install them, but how to incorporate them in your day-to-day work with SharePoint. You’ll build your own personalized toolkit that works for you and understand what tool to use for the right job. This covers mostly free and open source tools but also touches on some commercial solutions where needed.

    Hope to see you there!

  • A funny thing happend on the way to the upgrade...

    Yesterday I got some message about needing an update through Windows Update so I did. Then I noticed it kindly re-installed IE7 for me. I had already installed it, but maybe I grabbed it too soon so was running a beta or something. Whatever. Go ahead.

    Today I cannot click on links in any application other than my browsers (IE7/FF). Nice.

    Links that previously worked (previously as in yesterday) in Outlook or Omea Reader now create a crazy dialog to appear. For example I get an email and hover over the link in Outlook. The link looks fine, but when I click on it I get a dialog telling me it doesn't know how to open XXXXX.aspx... where XXXXX.aspx is the name of the link but without the protocol or server prefix. In other words, all links are now showing up as the filename, but nothing else. So of course it has no idea how to open an aspx page.

    What's even more baffling is that I can right click on the link and copy it to the clipboard and everything is there. Pastes fine into a browser. I just can't click on them anymore.

    This is a royal PITA as I have to shuffle off to DevConnections next week with a few presentations and don't have time to re-pave. Luckily all my demos are in VMs so I won't need my desktop, but bumer anyways. And I just repaved this machine about a month ago. I'll probably try uninstalling IE7 and going back to IE6 or something (I never really liked IE7 anyways) but who knows what else that will break. How's that for an upgrade?


    Update: Someone else has the same problem so at least I know I'm not alone in the universe. I did uninstall IE7 and went back to IE6 but I'm still having the problem so there must be some setting somewhere in the glob of binary goo called the registry that I can change. Sucks to be me.

  • Tyler Butler... SharePoint Style!

    Tyler Butler isn't a mythical enigma created by The Narrator and played by Brad Pitt in Fight Club. He's a program manager on the Web Content Management team. These are the guys who are bringing all the CMS stuff into SharePoint and making it an ECM that plays well with in our 2007 SharePoint world.

    Tyler's own personal site,, is powered by GeekLog. This is a PHP based content management system (much like Drupal, Wordpress and others) and quite nice to work with. Tyler has done a great job with his site but now is dipping his feet into SharePoint with his own pet project. Converting into a SharePoint site. This is going to be done via master pages, some clever code, and a lot of time.

    So if you're looking to see how you might move from one web site platform (DotNetNuke, Drupal, RYO-ASP.NET, whatever) to SharePoint, follow Tyler on his journey. You can read his first entry here on planning and basic branding is up and there are many more to come.

  • The Programming Manifesto... brilliant!

    If you're the type that prints out the Agile Manifesto and slaps it on your cubicle to evangelise to anyone who walks by, then head on over to Jeremy Miller has put together what he calls The Programming Manifesto and it's simply brilliant.

    It's simple, hits the points that need to be talked about, and is backed by a lot of common sense and goodness that everyone should have embedded into their noggin' at birth. It's not complete (although I'm can't think off the top of my head what complete would look like here) and I'm sure it will evolve (hopefully not into something big and ugly) but this is a great set of ideas to start with. Like Jeremy said, you might agree or disagree with some (or all) of these but it's something to go from. Why not create your own or adopt what you see here. I see maybe this evolving into "The Developers Manifesto" and perhaps a different one called "The Architects Manifesto", but that might be overkill.

    In any case, a good read for any developer trying to "get it". Check it out here.

  • TestDriven.NET 2.0 RTM, what are you waiting for?

    In this crazy age of monthly (and sometimes weekly) CTP builds, I see that Jamie Cansdale released the RTM version of his highly successful (and arguably the best damn add-in for Visual Studio hands down) of his TestDriven.NET tool. The screenshots kick the monkeys butt and I'm excited over some of the integration he's pulled off (with Reflector and other tools) and how the product just keeps getting better.

    I personally bought a copy and recommend any developer worth his or her TDD salt to do so. Writing and testing code has never been easier. He's also got a deal going with the guys over at TypeMock with integration (and there's some bundling of both products to save some simoleans). I only wish he would include NMock2 support as I'm kind of hooked on that lately and don't need the Cadillac that TypeMock is.

    Funny thing, when I was spell checking this post in Live Writer, here's what it suggested for TestDriven.NET:


    In any case, go check it out and you won't be disappointed.

  • 41 times around the Sun is a charm

    Yes, today I turn the big "4-1". I guess it's bigger than turning the big "4-0" but it doesn't feel like it (although turning 40 didn't seem like it either). I'm not really sure what a 41 year old man looks like, but many people comment I don't look 40 (or 41 if you ask me that question today). Guess it's that baby face I still (kinda) keep or my girlish figure but if you cut me open and count the rings, there's 41 of them today.

    As my Birthday present, the powers that be decided they would dump 10cm of snow in our backyard. It's a winter wonderland out there today while only yesterday (and I do mean yesterday in the literal sense) we were wearing light jackets and wandering around free and alive. Today it's big heavy coats and sweaters and boots that take decades to tie up. We're having a new fence put in the back (135 feet across the back, we have a 1/4 acre backyard) so while it's not only expensive it's a lot of work. Luckily for the lazy person that I am, you can fix this quite easily. Hire someone. They came out and put the posts in which need to set and while that was all going on, a crazy dude with a bobcat turned our weed ridden backyard into a flat, dirt paradise. I was commenting yesterday that we could probably build a go-kart track back there (yes, it's THAT big) but then there's the resale value issue, so that idea was nixed. Now however with the dumping of the Christmas cocaine all over, I'm not so sure about the fence and less sure about the sod we were going to plant. There is hope though, as this is Calgary. In Calgary the running joke is that if you don't like the weather, wait 5 minutes. By next weekend all the snow might be gone and it'll be construction as usual.

    Also, since this is the 41st year of my existence on this planet I thought change would be good so I'm trying out Live Writer. Live Writer is a client side blogging tool. I've been very happy with BlogJet, buying a copy last year, and it's served me well. However as some people have mentioned, BlogJet hasn't really been updated much and I think on of the key things with software is agility. The ability to adapt to the community. BlogJet has the features you would want in a tool. Offline editing, WYSIWG look, inserting images, automatically uploading files via FTP, spell checking, retrieving old posts, etc. Sadly it falls short in the extensibility arena as there is none.

    Enter Windows Live Writer, a free client tool that Microsoft put together to fill the niche for bloggers. While a little late on the market, it certainly is impressive. First off, it just feels better and looks more pleasing. However get past the glam and it's all about the features. OOTB it's a great tool and handles all of the basics needed for blogging. Categories are available and whatever properties your blogging engine supports are there. The editor is nice and lets you edit in the look and feel of your blog, pulling down the styles directly from your blog site so it feels much more at home than BlogJet does.

    Where it really shines is the plugins. The API is open so anyone can write them and they're pretty easy to pull together. There are dozens of plugins out there now that you can see here. I'm using the Flickr one as well as one that let's me insert a file via FTP and an email link one. They're simple and sit in a task pane to the right while you're blogging. Just click on it and the plugin takes over, inserting whatever HTML it needs and performs whatever tasks it does. For the blogger that needs to cut down on the heavy lifting while writing a blog post, this is key and well received.

    Another thing is tagging. You can insert tags like ones to, Technorati, and such but also design your own. Once I get some time I'm going to see how to configure one for DotNetKicks and SharePointKicks (or if you've already done it please let me know the format). That's slick as I don't have to do silly things like save a draft of my post, retrieve the URL, hunt down the snippet I need and reformat it to use the blog entry address. That's what I'm doing now and it's a PITA. With tag insertion you just pick the provider and when the entry is posted, it'll substitute keywords with your entry. One-click posting, that's the way it should be.

    Best of all, Live Writer is free!

    So goodbye BlogJet, hello Live Writer. Let's see what you can do.

  • Please help us keep SharePointKicks alive!

    Okay, I know I haven’t posted a lot of SharePoint content lately and I won’t go into the million and one excuses for it but I wanted to reach out and see if I could get a little help keeping our SharePointKicks site alive and, well, kicking.

    While there have been articles posted recently, there’s not much making it to the site. I am personally going around and trying to find time to hunt down those choice morsels to post to the site and they are out there, however we still need your help. Please continue to post article links to the site to keep it fresh and growing. If you write a SharePoint cool blog, kick it. If you see a cool SharePoint blog, kick it.

    Remember you can add your own little piece of Kick it code to your postings with this snippet:

    <a href="[URL]">
    <img src="[URL]" border="0" />

    Which creates this image (with a dynamic counter) on your post:

    Just place it at the bottom of your post, replacing [URL] in the HTML with the actual link to the post you’re kicking.

    I would really like to start posting a “Most Popular SharePoint Stories of the Week” entry based on your submissions. Gavin Joyce, who runs all the *kicks sites, has one going for DotNetKicks (see example here) so I figure I’ll reciprocate. Each week I’ll do a similar posting, using the most popular stories listed that week on SharePointKicks. Of course, we need your submissions to keep that task going so please help out.

    Also remember to help out with DotNetKicks by submitting your .NET stories and the recently released SecurityKicks for all kinds of security goodness (run by my fellow plumber James Kovacs). Your login to one of the sites is good for them all. It’s kind of like a Disney Park Pass, only cheaper and the lines are a lot shorter.

    Thanks for the help! Without you guys, the SharePoint community, keeping SharePointKicks alive and humming it’ll fast become a ghost town. Also if you have ideas for improvements please send them along as there’s always something better out there.

  • Simplifing the Scrum prioritization process, part deux

    It never ceases to amaze me that as freakingly smart I think I am, how stupid I appear when someone like Ron Jeffries steps into the conversation. He suggested an easier approach to prioritization that Kent Beck and Ward Cunningham taught him:

    1. Write the ten items, one per card, on ten cards.
    2. Pick a card and put it on the table.
    3. Pick another card, and put it to the left of the first card, if it's higher priority, to the right if less.
    4. Pick another card. Position it to the right or left, or in between the preceding two.
    5. Repeat until all cards are down.
    6. Look at the cards pairwise, switching their positions until you're happy.

    No muss, no fuss, no wear and tear on your calculator. Works in a group, too.


    Just to note that the matrix approach I posted about doesn’t really scale very well. As you get 50 backlog items you’re now comparing over 2000 individual items so maybe just looking at each item and doing something like the excercise above works better in this case.

  • Using a simplified Analytic Hierarchy Process with Scrum

    I was having a discussion tonight with Mrs. Geek and we were chatting about prioritizing and estimating in projects. Yeah, it’s an odd relationship when you talk about this at home but then that’s what makes her Mrs. Geek. Anyways, she’s very scope focused and has done estimating and management on mega-projects but was never exposed to Scrum. I was trying to explain how Scrum works from a prioritization perspective and we got into this conversation.

    As we got into it I explained how Scrum generally worked with prioritizing features. Not a lot of info is out there on *how* to prioritize, just that it’s part of the process. The Product Owner (PO) is meant to prioritize this list, however a lot of times while they may know what’s important to them, if it’s one person doing the prioritization you might miss some different perspectives.

    Most people practicing Scrum say the PO does know his thing and will do the prioritization correctly, however a lot of times when new teams are adopting Scrum they may not have an approach other than something very traditional. For example Dmitri Zimine has a blog entry here on how to prioritize the work, but his technique is like most might think. Put the list up on a wall and assign values to each item (1–9, a-z, whatever). This is fine and produces a list but it’s hard to say if this is prioritzed very well or not.

    Also there are many examples out there that show Product Backlog items like “Setup development environment” or “Provide Extract from Database to External Sources”. How is a Product Owner who has little or no knowledge of say the IT infrastructure or their processes supposed to prioritize this? To an IT guy, this is most important (and required to say do other things like oh, test the application) but for others that are more business oriented they might see this as low priority.

    So let’s start with the traditional approach. Put together a list of items (our Product Backlog) and having the Product Owner prioritize it. Here’s our prioritized list:

    PriorityBacklog Item
    1Setup Development Environment
    2Ability to sign up for memberships
    3Ability to use credit cards to pay for memberships
    4Notify members with membership data
    5Generate receipts and certificates
    6Authoring environment for articles
    7Web site look and feel and initial navigation
    8Display sponsors and links to web sites
    9Organize and sort articles
    10Library catalog for articles

    Our PO thinks that the ability to organize and sort articles isn’t that important and more importantly is the ability to notify members with membership data (perhaps to publish a newsletter). We’re not sure based on these items what some of this means, or the method they went through to arrive at this order but we have to go with it as that’s what the customer wants right? I find the process to create this list to be flawed. While it’s great that the PO has put together the priorities, he does so by only looking one dimensionally at the values. Also whether they knew it or not, they’re probably not really looking at the entire list each time they try to prioritize each item.

    For example, once you’ve gone through the first 5 items in our list you have their weights setup and assigned. Subconsciously I think you now dismiss those items for future planning. Sure, you’ve weighed those items against others (like Membership to Authoring) but when it comes to prioritizing Authoring, you ignore the inverse comparison of Authoring to Membership as you’ve already prioritized Membership. That’s cheating the process a bit and not giving the Authoring feature a fair chance. It only has to compare to what the left over items are and we know that inverse comparisons are not always just as simple as the opposite of what you’ve already looked at.

    Enter a technique called the Analytic Hierarchy Process (AHP). This is an organization approach that focuses on the relative importance of objects to each other. This will take us from looking at our Backlog in one dimension to looking at it in two, and the outcome is a more well defined set of numbers that tells us what the priorities really are. In a nutshell, it does so by comparing each item to another item, then adding up the values for each item to arrive at a weight (or ranking, priority, whatever you want to call it).

    Now, as Scrum is a simple process unto itself I wasn’t too happy when I read through the various explanations on AHP. Edwardo Miranda has a great white paper called “Improving Subjective Estimates Using Paired Comparisons” on how the process works. However once I saw those crazy mathematic symbols explaining the calculations behind it, my blurry college and university years came rushing back and I almost blacked out. James McCaffrey has a short MSDN article on using the process which didn’t get into as deep as Edwardo’s explanation, but I still thought it was too complex for Scrum.

    Like I said, this whole conversation started tonight as we were talking about project estimates and priorities. Then it hit me that you could take the uber-simple process of tossing items into a list but apply AHP to it to get something a step above, but not as freaky as learning thermo dynamics or theoretical physics again. We went through this process while discussing the subject tonight so let’s take a look at how we can come up with a better list of priorities than what we have above.

    Break out Excel (or do it on a white board for that matter) and set up your items as rows and columns in a matrix. Something like this (I’m using numbers for each item in the top row so it’s easier to read here, but you might want to use the full names set at an angle in your spreadsheet):

      Feature Name12345678910
    1Setup Development Environment0         
    2Ability to sign up for memberships 0        
    3Ability to use credit cards to pay for memberships  0       
    4Notify members with membership data   0      
    5Generate receipts and certificates    0     
    6Authoring environment for articles     0    
    7Web site look and feel and initial navigation      0   
    8Display sponsors and links to web sites       0  
    9Organize and sort articles        0 
    10Library catalog for articles         0

    The order isn’t important here so it can just be your raw Product Backlog. Now go to each cell and compare the Feature to the other Feature in each column along the row (comparing the same item is redundant so it’s ignored and indicated here with 0). For example we’ll start with Setup Development Environment (Item #1). Is it more important, less important, or just as important as the ability to sign up for memberships (Item #2).

    Give it 1 if it’s less important, 5 if it’s the same, and 10 if it’s more important. I find the 1–5–10 combo to be easy to use and remember. It’s either obvious it’s the same or more/less important. While you can assign say a number from 1–10, it starts creating long winded discussions like “Should it be a 6 or a 7?”. That’s detrimental to the exercise and you really don’t want to go down that rat hole.

    A couple of things to note as you go through the items. You can compare Features from any angle you want. Sometimes it might be the business value, other times it might be risk or cost or whatever. You have to decide what’s best for the overall product. Also make it simple but don’t spend more than a couple of minutes for each item. Don’t try to keep track in your head of what the last compare was as it might taint what you’re really trying to compare against. Just focus on each item to each item then move on. Plain and simple.

    Once you’ve done the first comparison, do the next column over and keep going to the end. Then start the next row and repeat the process. You’ll end up with a grid that looks like this:

      Feature Name12345678910
    1Setup Development Environment011111010101010
    2Ability to sign up for memberships10051051010101010
    3Ability to use credit cards to pay for memberships10501051010101010
    4Notify members with membership data10510511111
    5Generate receipts and certificates10105100510101010
    6Authoring environment for articles5101010100101055
    7Web site look and feel and initial navigation10111110511
    8Display sponsors and links to web sites1055105510055
    9Organize and sort articles10555101101005
    10Library catalog for articles10510101051010100

    Looks good and yes, it does take some time. For 10 items, you’re doing 90 comparisons but don’t cheat. Do the actual comparison. Think about if it’s really more or less important (or the same) and be honest. Just like you do an estimate on a task, think about it from whatever angle that makes sense. It does give you perspective on things and lets you look at your list in a different light.  The heart of the application, the core functionality that’s most important will bubble up eventually. For example in our scenario here, the PO felt that item #2 (sign up for memberships) was more important than item #4 (notifying members with membership data) but about the same as using credit cards for membership. Maybe that was a revenue decision, maybe it was functionality. Doesn’t matter as long as there was some thought behind it. Also try not to look at the other values. You won’t be doing yourself any service if you just replicate the inverse of the other values as that’s no different than doing a one-dimensional list. If you’re capturing it in Excel, just hide the first row when you move onto the next.

    Now that you’re done, add up the values across the columns. This is our weight for each Feature. Now sort the list based on the value for that total and you’ll have your prioritized list. It’s that simple. Here’s our result from this exercise:

    2Ability to sign up for memberships1005105101010101080
    3Ability to use credit cards to pay for memberships1050105101010101080
    5Generate receipts and certificates1010510051010101080
    10Library catalog for articles1051010105101010080
    6Authoring environment for articles510101010010105575
    9Organize and sort articles1055510110100561
    8Display sponsors and links to web sites105510551005560
    1Setup Development Environment01111101010101054
    4Notify members with membership data1051051111126
    7Web site look and feel and initial navigation1011111051122

    The “OR” column is our original ranking we did just by looking at all the items and coming up with the priorities. The “R” column is the weights calculated by adding up all the item to item compares.

    Notice that after going through this, we find out that the all-important Setup Development Environment Feature is way down on the priority list, the Library Catalog for Articles that was the least important item now is somewhere in the middle, and the look and feel (when all is said and done) really is the least important item and should be done last. These are valid numbers as the PO went through and decided, on an item by item basis, what was important at the time.

    Now this isn’t to say that this is gold. For example, we may need to setup the development environment in order to deliver the ability to sign up for memberships. This is where I belie the entire team, not just the PO, should prioritize the items (unless the PO really knows everything, which is rare). The PO should be telling the team why something is important while the team works out what’s risky or perhaps required for some items to be delivered.

    A little negotiation goes a long way, but the main thing is that you get to see what’s really important here and why. Along with the why, you get to see the what. There are a lot of things that are 80 here but when you compare one item to the next, there are subtle differences. This will help when you have all those #1 items to deliver in Sprint 1 and don’t know which one to start on first.

    Okay, this is a mythical example using made up values and such, but it really does work. It provides you a better weighting of what’s important and does put some pseudo-science behind it. As I said, AHP in it’s traditional form can be complex and what I’ve presented here is a simple version of it. In trying to keep with the tradition of Scrum being simple, I hope this echos that. You can, as you see fit, add layers to this process (or choose not to adopt it at all). For example, you can take those weights and apply them to estimates (costs) in your system to figure out what the best bang for the buck is (thanks to Mike Cohn for that tip).

    Use what works for you but when you’re done the idea is that you might end up with a more accurate view of the prioritized world before you begin your Sprint.

    P.S. Completely unrelated (but I found it while I was checking some references for this article) I noticed Mountain Goat Software, the site Mike Cohn runs got a major face lift. Looks a lot nicer now and easier to navigate. Check it out here as there’s lots of great articles and resources there on Scrum.

  • Get into some Microsoft e-Learning with Howard and Glenn

    Lately I’ve been making Redmond my second home, working with the e-Learning folks on SharePoint stuff. Two cats that I dig are Howard Dierking and Glenn Block. They both are product planners for courses, exams, etc. but don’t let the title “Product Planner” (which really isn’t all that exciting is it?) fool you. These dudes are both hard core developers and really know their stuff. It’s very refreshing talking to them as I can chat them up about Domain Driven Design and whatnot, without having their heads spin around and explode like most people I meet.

    So if you’re interested in how the whole e-Learning thing works with Microsoft, what these guys do, or just want to check out another couple of ex-developers-gone-crazy-who-want-to-take-over-the-planet, visit Howard and Glenns blogs. Hopefully they’ll live up to the reputation I’m making them out to be.

  • Free Community Edition of SharePoint Explorer

    The guys over at Dot Net Factory have announced that they’re released a free community edition of their SharePoint navigation tool. This is a plugin for your browser that lets you navigate sites more easily. The blurb from the website:

    The Dot Net Factory’s SharePoint Explorer is an IE add-in providing end-users and administrators the richest possible SharePoint usage and navigation experience for all SharePoint 2003 and 2007 versions. SharePoint Explorer provides a friendly tree-based interface allowing novice and expert users alike to see all SharePoint sites and content at a glance while providing right-click menus for all common functions.

    Key Features

    • Installed on your PC to work with any number of SharePoint servers and sites
    • Visualizes all SharePoint Areas, sites, Document Libraries, and Lists to any depth
    • Navigate to any location in a single click
    • Quick search of any site
    • Context sensitive right-click menus provide instant access to almost every function
    • Items counts display for Document Libraries and Lists
    • My Outlook functionality providing quick access to Outlook while working with SharePoint
    • Add alternate credentials for accessing different sites with different user accounts

    Software Requirements

    • Internet Explorer 6 or higher
    • .NET Framework 2.0 or greater
    • Access to any 2003 or 2007 version of SharePoint

    It fully supports 2003 *and* 2007 versions of SharePoint so something to check out. You can find the download here.


  • MVP day today, Architecture forum on Wednesday, launch next month

    Spent most of the day hanging out with other MVPs in Calgary (including one that came in from Medicine Hat of all places) at Microsoft Canada. We had a regional event where all the little MVPs got together and talked. It was fun and we got to find out some more info about the upcoming 2007 Microsoft Launch Event which I’m sure you’re all registered for. If not, then please do as it’s going to be huge (Vista, Office 2007, and Exchange 2007). I’m personally going to try to get out to Edmonton and Calgary for the launch events and pontificate about SharePoint, Office, and whatever else I can dream up.

    On Wednesday I’m a panelist at the Alberta Architect Forum at the Metropolitan Centre (333 4th Avenue S.W.) here in Calgary. I’ll be speaking along with my fellow Plumber James Kovacs (with Microsquishy John Bristowe in tow) on SOA in the real world. We’ll muddle through various aspects of Service Oriented Architecture and make some short presentations and try to bring up a lively discussion. There’s events going on all day about SOA and Architecture in general so I highly recommend checking it out.

  • Scrum Tools Roundup

    Working this weekend on some new SharePoint stuff which you’ll see in a few weeks but thought I would pull together a list of tools to help people with Scrum. These are tools that help you plan iterations, keep track of your updates, and generally make life easier for the ScrumMaster or those working on Scrum projects. Not to say a plain old whiteboard with post-it notes or Microsoft Excel won’t do the trick, but these tools take you a little bit farther and help you keep track of things holistically.

    Some are open source, others are not so check them out if you’re looking for something extra to add to your Scrum process. Where noted, I’ve given some suggestions about using these tools where I’ve already taken a look at them for you, but please make up your own mind with your own eval if you’re serious about a product (especially one that costs $$$).

    Java server based artifact tracking system, highly customizable. Distributed under a BSD/Apache style license.

    Double Chocco Latte
    Sounds more like a special at Starbucks but this is a package that provides basic project management capabilties, time tracking on tasks, call tracking, online document storage, statistical reports, and a lot more. PHP based, supports both Apache and IIS, MySQL or SQL Server (and others), web based client. Distributed under the GNU General Public License (GPL).

    This is a commercial product that provides program, project, and iteration management and fully embraces the Scrum process through requirements planning, release planning, and iteration planning and tracking. Trial version can be downloaded and run locally. Runs under ASP.NET and IIS with a SQL backend. I’ve given VersionOne a test-drive in the past and it’s complete and a good, solid product. The only thing is that it’s got a LOT of options so if you’re looking for something simple, this isn’t the tool.

    GNATS is traditionally a bug tracking tool, but according to Jeff Sutherland it’s Scrum-ready (whatever that means). Licensed under the GNU General Public License (GPL).

    Select Scope Manager
    A commercial web-based package that provides planning capabilties to all aspects of Scrum and XP projects. Evaluation version available to download from site. I’ve worked with some Select products in the past and they’re not bad, but not very customizable.

    XP Plan-it
    This is a hosted solution so you only need download the client and retrieve data from their servers. Commercial package but doesn’t seem to be anywhere you can download anything or even see the product. I would stay away from this one.

    This is an interesting tool and very simple in appearance. It basically provides an electronic version of story cards and does some tracking (like your velocity). It’s simple but maybe too simple and personally I felt the interface seemed like an old VB app that someone threw together. Still, I think it works.

    TWiki XP Tracker Plugin
    Here’s a bit of a switch and not a stand-alone tool but a plugin for a wiki system (TWiki). It provides custom templates and helps you track information on XP projects. While not really Scrum related, it does let you track stories and releases so you might have to modify it in order to fully use it for Scrum (Scrum != XP). TWiki is released under the GPL and is Perl based (blech) so as long as you can run Perl you can run TWiki.

    This is an open source Perl based system built for Linux and Solaris running Apache 1.3 or higher. They claim it will work on other platforms, but YMMV.

    Another web based project that’s distributed under the GNU General Public License (GPL). Uses PHP and MySQL so running under Linux, Windows, or Mac should be fine. The demo doesn’t render under IE7 so I couldn’t check it out for you. 

    Probably the grand-daddy of the open source projects of this type, XPlanner is distributed under the GNU Library or Lesser General Public License (LGPL) and free. Requires Apace Tomcat to run so expect to spend a little time setting this up on Windows (but it does run as I’ve done it). Lots of options, pretty stable, respects Scrum and XP and how they work, and very simple to use. Actively being worked on and many open source projects use it for their own planning (Hibernate, JUnit, Log4J, Struts, etc.) so updates are pretty frequent.

    A professional looking product that touts features to support all aspects of Scrum. Support single or multiple teams working on the same or different projects. Client based but has a Web Client as well for some members of the team (say your PO that doesn’t need to get down and dirty with Sprint Backlog Items). Requires a trial license but you can get a copy for free just by requesting it. Nice piece of software that is backed by support forums, a wiki, and an API for extending it’s capabilities.

    An interesting project that offers the ability to cover all aspects of Scrum (and then some). Very customizable down to custom fields you can display and use in reports. Client/Server based but features a plug-in for Eclipse if you have it in your environment. Guest accounts are unlimited and free (so POs and non-core team members can just use it to view the status of a Sprint). Downloadable trial but the full version will set you back some Scrum bucks.

    I really like this tool, but maybe because it’s .NET web-based. It’s simple to use and setup and cost-effective for teams. While it doesn’t feature as many screens as other products, what it does supports Scrum and Agile projects with simple inputs and direct reports and charts. Nothing fancy but then neither is Scrum. Free trial avaiable and demo available online and you can download a 1–user pack completely fully featured and free (but with no support) so it’s great if you’re doing little one-man projects and you just want something to keep track of your progress and work. Supports SQL Server and MySQL but requires IIS and ASP.NET so it’s Windows only.

    Lots of features for this commercial package, but not a lot of customization available so you can’t completely tailor it to your process. Requires Windows, Linux, or MacOSX platforms to run on (with Java 1.4.2 or higher and Apache Tomcat 4.1 or higher) or you can let them host your projects for you (for a fee of course). Simple interface makes it easy to enter information and covers all the aspects of Scrum planning including test case tracking and typical burndown charts.

    Enteprise level hosted project solution. Tons of features and lots of customization available (even for an online hosted system). Met these guys in Calgary during Agile World a couple of years ago and back then the product was impressive, so I can only imagine what they’ve improved on. Free demo online to check out and setup a project to see if it works for you.

    Scrum for Team System
    Saving my personal fav til last. We’re using this on a few projects now and it rocks. An add-in guidance package for Microsoft Team System, it fully covers Scrum and lets you get work done fast. No customizable available but it works without it. Co-developed with Ken Schwaber so it reflects how Scrum needs to be done. Let’s users create their own views but comes with a dozen or so that are quite sufficient. Supports single team or multiple team projects and is currently being updated to version 2.0 where it’ll have more flexibility. If you have Team System in place and are struggling with the MSF for Agile package then take a look at this, you won’t be disappointed.

    Bottom Line
    If you’re a one-man shop, I suggest you check out TargetProcess as it can be setup in a few minutes on a server or your own development desktop. If you already have Team System in-place, take a look at Scrum for Team System. If you have nothing but could run say Tomcat, then XPlanner might be the way to go as it’s simple but works well. Give a couple a test drive and see what’s best for you.


  • Time is fleeting, madness takes its toll

    We wrapped up taping the latest episode of Plumbers @ Work, our Canadian developer podcast that I do with John Bristowe and James Kovacs, on Wednesday. At the taping after bitching about how long it’s taking for the shows to get online, I was informed that our previous episode had made it up to the site (I’m always the last to know). As John is making up for the lapses we’ve had in the past by being the crazy midnight podcast editor that he is, Wednesdays episode has been cut and bagged and is now online as well. Thanks John!


  • How to Shoot Yourself in the Foot using Any Microsoft Product or Technology

    This guide is offered as a public service announcement to help you wade through the myriad of products and technologies made by Microsoft for those in this dilemma.

    You shoot yourself in the foot.

    You shoot yourself in the foot because there are no options to do anything else.

    Microsoft Help
    You try to shoot only to discover your gun doesn’t work. After searching for the topic the answer that’s given is “Have you tried turning it off and back on again?”.

    You can create a complex formula to calculate trajectory, angle, and bullet speed only to find out that you’ve created a circular reference.

    You put together a presentation about how you’re going to shoot yourself in the foot but can’t click on the trigger to start the slideshow because it’s too small.

    The spel chek on amunition prevents you frum pulling the triger.

    You try to shoot yourself in the foot but realize that FrontPage has completed reformatted the gun and removed the bullets.

    You fill the gun with too many bullets and find that this action has caused the gun to become corrupted.

    As you try to shoot yourself in the foot your gun re-levels its resources and allocates the bullets for another user.

    You send yourself an email with an attachment on how to shoot youself in the foot only to find Outlook blocked access to the following potentially unsafe attachments: ShootFoot.exe.

    Microsoft Bob
    You can’t find your the gun from all the papers stacked up on the desk and the dog keeps barking at you.

    You ask Clippy how to shoot yourself in the foot but he offers to write a letter about the pros and cons of gun control for you instead.

    SQL Server
    SELECT [Bullets] FROM [Gun] LEFT JOIN [Foot] ON [Leg] WHERE [Gun].[Bullets] > 0

    Windows XP
    You’ve tried to shoot yourself in the foot too many times and changed out the bullets twice so Windows prevents you from continuing and shuts down.

    Windows ME
    You decide to not even bother trying because it just isn’t worth it and wish you were in a better place.

    Windows Vista
    You try to shoot yourself in the foot, but it looks too darn pretty. Then your foot explodes.

    Visual Studio Team System
    As you try to shoot yourself in the foot the compiler warns you of too many code violations and that the connection to the Team Server is down and doesn’t allow you to pull the trigger.

    XBox 360
    Your gun overheats and locks up before you have a chance to pull the trigger.

    SharePoint 2003
    You get through 5 steps into the process, but then your foot tells you an error has occured.

    SharePoint 2007
    You try to shoot yourself in the foot but can’t find it because your foot has been security trimmed and you don’t have the right permissions.

    Internet Explorer
    Your gun is incompatible with your bullets and the trigger is disabled because you’re not in the right zone.

    Feel free to add your own or improve on my pathetic attempt at humour.

  • Getting started with Scrum

    Mike Cohn over at Mountain Goat Software has been in the Agile software development river since 1993. He's the author of the most excellent book Agile Estimating and Planning and really knows his stuff.

    For those wanting to greenfield Scrum at your organization, he's got an excellent powerpoint slide deck to start from. It talks about what Scrum is and highlights the key things that you can use to show benefit to management. Mike encourages people to download the presentation and run with it, making adjustments as you need to adapt it your environment. The killer thing about this is the presentation is available under the Creative Commons Attribution 2.5 License. This is excellent for the Scrum community as we can go off a base from a respected source. I encourage everyone to join the bandwagon and help promote this by making it work for you. Scrum isn't a silver bullet, but it just plain works. You can grab the slide deck from here. Also available is a French version generously translated by Claude Aubry.

    The Scrum Process

    To add some icing on the cake, there's some great pictures of the Scrum process that Mike has made available of the process itself which really sums it up. These are great for decks or just print them out as a poster to hang in your team area to let everyone know the simplicity of the process. You can check out the picture files, also released under the CC license, here.

    Watch for the Scrum tatoos coming soon to a blog near you.

  • The "real" browser war

    We were finishing up our taping for the latest episode of Plumbers At Work, and the issue of IE7 (just recently released) vs. Firefox came up. The first thing that came out was of course the “browser wars” statement and that it’s still going on. Actually, I have  bit of a different take on what the war actually is and who’s winning.

    Let’s face it. A web browser is neither rocket nor science. It sends a request to an address via a protocol, chatter goes on back and forth, and the end result is a stream of ASCII character that are rendered in a format. That’s it. Sure, there are ActiveX controls and Flash and JavaScript and all that goo, but really we’re just talking about parsing and displaying here. So there’s really not a heck of a lot you can improve on with that model. I mean, other than following some standard about what an HTML tag looks like (to which I use the term “standard” loosely as nobody can really agree on this), there’s not really a way to build a better mouse trap here. The operations are so very basic in structure and the pattern is the same whether you have a cool looking mammal as your mascot or not.

    So what’s the war really about? Market share? Nah. That’s just attrition. Microsoft has a Googolplex (no, not Googleplex) of deployed systems out there and every one of the them ships with this thing called Internet Explorer. It’s the default browser, and other than you, me, and a few thousand of us geek boys (and girls) the average 40 year old virgin who plugs in his latest acquisition from Best Buy doesn't know there are other choices. Certainly when you boot up XP you don’t get a “Would you like to use Internet Explorer as your web browser, or go surfing on the net to find another one?”. I know what my grandpappy would say (assuming I could even get him to use this new-fangled gadget called a computer). “Surf for something I already have? Poppycock.”

    The masses out there with their out-of-the-box-stock Dell PC have no clue how to find things on the net, let alone install an application that they download. Yes, there are internet and computer savvy people, and those that use computers in their daily lives (whether they like it or not) but the vast majority just doesn’t know there are choices. Or where to find them. Or how to use them. So you really can’t ask Firefox, Opera, or Bob’s Budget Web Browser to try to take the lions share of these peoples lives with something that isn’t any different on the surface to them. A browser is a browser is a browser. If it ain’t broke, don’t fix it they’ll tell you.

    I think the true war (if there is even one) is the functionality the application provides. Like I said, it doesn’t take a computer scientist to write code to stream down a bunch of bytes from a connection and display it in a format most people agree on. What really makes the shell of the application we call a web browser useful is in the extensibility it provides. For guys like us. The geeks. The ones that build things to make other peoples lives better.

    I’ve looked at both sides of the coin and Firefox is the clear winner here. Just starting to look at how to build a tool bar button for IE takes you into dozens of registry hives, GUIDs, class IDs, etc. and that’s not even getting to the point where  you have to build a COM object and optionally some scripts to make this actually thing do anything. And that’s just a button. Imagine anything more than that? There’s also menu bars, and explorer bars, and custom download managers, and each one of them requires at least this much (if not more) investment in learning. There’s lots of documentation on IE and building extensions so you can start in the MSDN library like here, however it falls short and for the guy who wants to build something useful for someone and it becomes too much of an investment in time. I don’t want to read an entire manual on Plumbing just to stop a dripping tap, but that’s what IE extensions feel like.

    Then I took a look at Firefox and how to build their extensions. It was well documented and had a great page to get started here (with a download of the Hello World extension if you just wanted to skip to the good part). I found that to be pretty straight forward and simple. A single page describing what I had to do and an example I could follow and download. IE on the other hand? 12 or so pages of topics, with dozens of links to all kinds of snippets and the documentation overall was less than stellar. For example, to add an entry to the standard context menu there’s a few instructions (again registry changes) but when you read it, it refers to things like scripts and assemblies as if I know where that came from. So where are those and how do I build them (or deploy them, or pass values to them, etc.). Like I said, pretty skimpy. Firefox extensions use standards like JavaScript and CSS and binds it together with a simple text file (a manifest). Einstien said “Everything should be made as simple as possible, but not simpler”. Easy ways that everyone knows about to get things done. Standards good, screwing around in the registry… bad. Some naysayers will claim “Well COM is a standard too you know” and of course those guys could just rattle off COM interfaces in their sleep. Uhhh, yeah. Okay. Grant you, to setup the development environment to write a Firefox extension requires a bit of work. On the IE side, everything is there if you have Visual Studio already installed. So I’ll hand it to IE for that, however this is something that is either a) automated or b) only done once. So really does it matter in the grand scheme of things?

    Finally after your built your uber-widget, there’s deployment. Write an MSI and package up COM stuff, write some custom code to create all those registry entries (or perhaps if your installer supports it, add them yourself or run a .reg file) however none of this is very safe and almost any IE add-in I’ve installed required me to reboot the computer. Yeah, you heard me. The computer. The big box that makes things go. Not the browser, but the entire operating system. Has to do with that wonderful “COM” thing that IE needs. If we could build native .NET addins by creating oh, say, a single .NET assembly and xcopy deploy it to a folder that would be a step forward and what I would consider a real improvement to IE. Or even let the user download it and maybe create a bootstrapper to install it for you via the browser. I mean, if we’re going to compare apples to apples here and Firefox to IE, then why can’t IE deploy extensions like Firefox does? I go to the Firefox addon site, see something new like a CSS validator, or an addon that lets me download videos I’m watching in my browser, and I click on “Install Now” and poof, Bob’s yer uncle (okay, sometimes you *do* have to restart the browser). What’s preventing us from doing this in IE with IE extensions?

    Oh yeah. COM. Registry access. Goo. Got it.

    I look at the Firefox addon site. There are tons-o-addons. True, you might filter out 60 or 70% of them and call them crap but then there’s some real gems there. Useful things that make people productive while browsing web pages, which is all the web browser does. If I can be more productive like being able to snag news clippings or validate my CSS on a page (without having to launch other tools/windows) then more time for me to play Xbox games (or whatever it is you’d rather be doing).

    So this is my take on the real browser war. It’s in the extensions and not the snazzy features you might add to the base system. C’mon. Tabbed browsing? If that’s really got you picking one tool over another, you might want to re-evaluate your priorities. I look at the “new” features of IE7. Tabbed browsing; RSS feeds; better performance; blah; blah; blah. Nothing exciting here, move along folks. If IE (Microsoft) built up a community of addons like Firefox has, you’d see a real battle going on. Instead we have an underdog that’s superior in some ways with a lot of potential, and the front runner that is not enabling people to be more productive but rather adding flash and flair to something that really can’t be improved upon, retrieving and rendering content. Communities are not Sea Monkeys and don’t grow up instantly. There’s no Field of Dreams approach you can take here. However if you give them the tools, the can build it for you. Just look at what Firefox Addons site has done for Firefox. True, the browser might be a little leaner than IE (or others) but the sweet spot is the aftermarket and what’s happening right now everyday.

    What’s really the golden ticket is the stuff beneath the layers. You know, like an onion. Peel back IE and you get Goo. Peel back Firefox you get a world of possibilities that’s expanding every day.

  • Viewing new SharePoint 2007 sites with IE7

    Just a little tip as I finally crossed over to the dark side and installed the latest version of IE7. When you’re viewing a SharePoint 2007 site (WSS or MOSS, doesn’t matter) you’ll get a warning message from IE saying that an ActiveX control is causing problems on the site. This control is named “name.dll” and is the person smart tag that shows presence information. Just add your site to the trusted site list and the error goes away.

    The message doesn’t come up in IE6 (unless maybe you have ActiveX controls disabled or some kind of uber-high security setting) so it might be new for those visiting 2007 sites with IE7 (it was for me).

    And while I’m on the presence information bandwagon, here’s a couple of blog entries that discuss how to use it in your own Web Parts:

    Thanks to Dustin for the tip!

    P.S. I’m also taking the plunge on a scratch desktop now and finally trying out Vista. It’ll be a few days until that gets installed as I go back to juggling all the cats I have in the air right now.

  • 3 hours of SharePoint goodness

    Or as someone in the audience called it, SorePoint (but then, they haven’t done it 2007 style yet).

    Last nights presentation to the .NET Calgary User Group went well. We had about 40 or so people come out and get some free pizza and swag and spend 3 hours with me rambling on about SharePoint 2007 (yes I know, there is no product called SharePoint 2007). I gave a brief overview of Microsoft Office SharePoint Server (MOSS) but the focus of the presentation was on Windows SharePoint Service 3.0.

    We covered the basics, some architecture changes from 2.0, and got into Web Parts, Content Types, Features, Site Columns, Event Receivers, and touched briefly on Master Pages and various other goodies. The first hour was mostly talking and doing some basic stuff in the UI. The second half was mostly code and writing and deploying new features. I still had two code projects I didn’t get to, so I’ll leave that for a future session. All in all, lots to take in and lots of think about.

    I used a few tools during the demo and made reference to a couple of web sites for more information so here’s the links:

    There were a lot of great questions and some things I’m following up (like sequence of events when receivers are triggered) as well as a way to enumerate through what receivers are attached to what list/library/feature instances (which might result in a feature of itself). Stay tuned for lots more 2007 goodness in the coming weeks.

    Note to self (and anyone else listening). I had to recently rebuild my system (and I was smart enough to Ghost it so I don’t spend another day rebuilding it again, Thanks Jenn!) and of course had to re-install a million programs. I use BlogJet as my tool to post to the site and in setting it up, the current version doesn’t support Community Server correctly. The default location that comes up is “/MetaBlog.ashx” but it should be “/blogs/MetaBlog.ashx” to work. Just something to keep in mind when using BlogJet and Community Server.

  • SharePoint 2007 Developer Demo tonight

    Tonight I'm giving a fairly long session (two sessions actually) on SharePoint 2007 development for the .NET Calgary User Group. This is the soup to nuts presentation on SharePoint development. No powerpoints, just code. If you're in Calgary and want to catch it, you can find more information here on the user group site.

    As this is a public presentation, I will be wearing pants.

    See you there!

  • Bring back Jaimie

    There have been a few MVP efforts over the years that I find silly. Various petitions about VB6, mass emails on unit testing, etc. There are few community “rallies” I get behind, but this is one of them.

    In the recent MVP cycle (4 of them every year) Jaimie Cansdale was not re-awarded his MVP status (thanks Roy!). Okay, so what? Jaimie is the author of the most useful and popular add-in for Visual Studio, TestDriven.NET. This bothers me. Both as an MVP and a daily user of TestDriven.NET. It's a fantastic tool and it's one of those rare tools that's on my list of "install always and everywhere". I totally disagree with MS on this and think they made a mistake.

    They cite that his contributions were not sufficient to re-award him his designation he previously held. The MVP program is about recognition and contribution based on the last years efforts (you don’t get awarded for future work, just what you did in the past). So what happened with Jaimie’s contributions? First, he figured out how to get his free tools to run on the free versions of Visual Studio. This, according to Microsoft, is a violation of the license. They don’t want add-ins to run on their free platform, only the ones they charge for (which I don’t agree with either). Second, he offered up his tools for free but he now offers a commercial version.

    This isn’t like another MVP whose award was recently revoked by Microsoft. In that case, he was selling adware in his tools but I’m not sure of all the details. In the case of Jaimie, his commercial version is just that. A commercial version of a tool that you can choose to purchase (in order to support the author). Or not. He’s not holding a gun to anyones head. You decide if you want to support someone. It would be like me setting up a PayPal account for anyone who’s used my software to drop a quarter in the bucket so I can pay for websites and whatnot. It’s the decision of an author to do this kind of thing. Of course a commercial version of a tool takes on additional responsibility like support, but Jaimie was ready for that and that’s what you get when you purchase his tool. Or you just keep using the community edition. Your choice.

    The fact that Jaimie figured out how to get free tools running with the free IDE and made it available to everyone, is stellar. While I understand MS took a position that they didn't want people building addins for the express SKUs, I think it's wrong to chastise people for it. If Roland Weiget and his excellent GhostDoc tool had the same exposure that TD.NET did, would he be facing a cease and desist notice from Microsoft?

    Microsoft cites that Jaimie voilated the “MVP Code of Conduct”. I’m with Frans on this as I want to ask my lead what the hell this means? While we are bound by NDA to certain things and we’re not allowed to say post source code or confidential files to the general public, I’ve never in my brief 4 years of being an MVP heard of any official (or non-official) “code of conduct”. Maybe I’ve been living in an MVP cave?

    It's sad that MS takes this approach with people that make contributions to the community like Jaimie has. Bad decision on Microsofts part and I'm sure this isn't the last we've heard of it.


    Two things. First, I just bought a copy of the Professional edition of TestDriven.NET to support Jaimie. I've been using the free version but for $95 bucks, you can't go wrong. The software works with NUNit *and* VSTS and is a godsend for debugging tests and making it quick and easy for developers to do TDD. Second, I have yet to find any license agreement or statement that you cannot write add-ins for the Express editions of the Visual Studio products. While they don't provide the extensibility dlls for you to write add-ins, I don't see anything that says you're not allowed to write them (as long as you don't redistribute Microsoft dlls which isn't what Jaimie did). So if anyone knows where it explicity states you cannot do this, let me know as I'm curious. This is one of the reason that other people are saying caused Jaimie not to recieve his re-award.

    Finally, I may be off in my beliefs. After reading countless other comments on this subject Frans said it best. The MVP award is about contributions to the community you make on your own dime, not necessarily a cool tool or book you've written. However IMHO Jaimies contributions earn him the award, but I'm not Microsoft so it's not my call, just my opinion.

  • A sound of thunder

    I’m down in Redmond for the next few days hanging out at the mothership doing some SharePointy stuff so I’ll be offline from email (or email responses will be werrry slow) for a bit. I’ve got about 6 blog entries that I’ve been building for the past few weeks so hopefully I’ll find time to complete them. One is on using NetTiers with output from the Smart Client Software Factory, and another is on Scrum and out progress in our current iteration. And while all this is going on, some asshat in North Korea is popping off nukes for testing purposes. Fun stuff on both sides of the ocean.

  • Don't belive the web, it's evil!

    I was doing my morning rounds the other day and stumbled across this site. I think I’ve been here before, but decided to plug in my name and blog to see what kind of an embarassment I could muster up before leaving for work. Here’s my results:


    Something wasn’t right as I know I’m on Technorati as I can go and do a search and get back a few thousand hits. The other numbers were okay. 8000 or so ego points on Google and similar amounts on Yahoo (personally I think they’re both being run out of Bill Gates basement) and some on MSN and (I don’t do much over there).

    However I knew this was a bogus site when I plugged in Scott Hanselmans name and blog and got this:


    While I might like to think I’m uber-cool, Scott is in a whole other category of coolness (one that he owns himself) so there’s no way on God’s green Earth that our Google scores would be this close (although Scott breaks the needle on which is understandable). I may be good, but I’m not that good.

    Don’t believe everything you read on the web.


  • New SharePointy MVPs for October

    The MVP cycle is every October and April (mine next one is in April 2007). Here’s the new MVPs in SharePointLand this round:



    And here are the renewed MVPs, going to be bugging you for another year:



    Congrats to everyone!

  • SharePoint 2007 presentation in Calgary

    I’ll be speaking October 17th at the Calgary .NET User Group on SharePoint 2007 development. This will go through the new features, master pages, customization, the Web Part framework, creating cross-site queries, binding lists to the new SPGridView control and hosting ASP.NET User Controls. We’ll also build some extensible field types (in code) and deploy them, making WSS a fully-featured application development platform.

    Three hours of Bil rambling on about SharePoint. About as much fun as sitting through a Ben Affleck movie, but we’ll try to do better.

    If you’re in Calgary feel free to signup for the event. You can get more information at the user group site here.

  • Here comes RTM!

    So Office 2007 has been out both in beta and technical refresh form, and will be on it’s way to release in the next few weeks. It’ll hit the retail channels early in 2007 and you can expect to see it hit the MSDN downloads probably mid November/early December.

    There will not be a new release between now and then, so the TR version is as close to a release version as you’ll get. This is not to say Microsoft isn’t going to be doing any tweeks before release, but don’t expect any Earth shattering changes.

    You do have some time to keep working with the TR though. All of the technical refresh client products (Word, Excel, Access, etc.) will expire March 15, 2007. The SharePoint stuff and server products will expire May 31, 2007.

    As for upgrading, you can upgrade the Beta2TR version of any server product to the retail release, but you’ll need to uninstall the client apps first.

    So get ready for retail and watch for it soon!

  • My Personal Web of Confusion

    I have a bunch of sites that I run and regularily maintain and sometimes it's not only confusing but hard to keep up. These are non-specific project sites, but contain (or should/would contain) tips and tricks, info, tools, downloads, and other goodies as I try to organize my Life 1.0 contributions to the world (both SharePoint and non). So in creating this monstrosity, I've built (as I like to call it) my own "Web of Confusion". Here's the rundown:

    There are a dozen or so "other" sites that are individual projects (3 projects I manage on CodePlex) that I haven't included here but probably will add to the individual sites somewhere. Like any art, this is still a work-in-progress. I need to get more articles online on the SharePoint sites, update my personal site to the latest version of DotNetNuke, and start posting cool WSS v3 stuff. If you run your own WSS v3 site, let me know and I'll you to the my list of WSS v3 demo sites (there are 3 so far).

    Why am I using DNN for my personal site and not WSS v3? Not sure and things may change. Once my hosting provider (and the software) hits RTM, that might change. It would certainly fix my problem with my personal blog as I detest the way the DNN blog module works. After then I'll probably switch my home page over to WSS and spin off a subdomain for DNN development as I have some DNN modules and skins in waiting right now.

    Anyways, no Earth shattering SharePoint news today. Just thought I would toss my info out there for anyone who's interested. And let me know if there's anything in particular you're looking for, beit a DNN module, a SharePoint/.NET 2.0 Web Part, a theme, a tool, a skin, whatever. I'm always game for new challenges and have a few hundred toys in my toybox I have yet to share.

  • Excellent example of MOSS 2007 in action

    If you're looking for an excellent example (maybe the first public site) built on Microsoft Office SharePoint Server 2007, then check out the 2007 European SharePoint Conference site here.

    This is an excellent example of what you can accomplish with MOSS. It uses an online InfoPath form (served up via Forms Services), variations for 3 different languages (French, English, and German), and master pages and styles for the look and feel.

    Well done guys!

  • Join the Windows XP club... for 5 more years or so

    If you’re a developer today writing .NET apps, you’re either writing them with Visual Studio 2003 or 2005. I don’t know what the actual numbers are out there, but for those writing apps with VS2003, forget about developing on Windows Vista when it ships. You won’t be able to run your precious IDE. Visual Studio 2003 is not supported on Vista. Does it mean it wont run? Maybe, I’m not sure, but the “official” word (and what’s flying around the blog-o-sphere these days) is that it won’t be supported. Also if you’re running VS2005, you’ll need to install SP1 (which just went public recently).

    To me this means I’ll be running Windows XP for another 5 years until the next OS comes along. It works, the kinks are pretty much out of it now, all my hardware works with it, and I can develop apps using VS2005 and 2003 along with .NET 3.0 (God, I still hate that name) on it. I’m sure MS will at least consider correcting this (especially since almost every feed I read is discussing this problem). I mean, how freakin’ hard is it to support 2003 on the Vista Platform? Don’t answer that, and I swear I’ll ostracise the next blogger who uses “first-class” with anything and Microsoft, that saying is getting so overused.

    Is Visual Studio 2003 really that “legacy”?

    What really kills me about all this, is that your good old VB6 IDE will run fine and be supported. VB6! I thought we killed that thing off when we had the chance. While I understand Microsoft is focusing their efforts on supporting VS2005, I would think you generally have a few good brain cells to know that most people haven’t switched over/upgraded yet and it’s not going to happen overnight for some (most?) apps. So why wouldn’t you support the masses?

    Or am I that out of tune with the universe and everyone has silently moved to VS2005 and this isn’t an issue.

    If that’s the case, why is everyone blogging  about this?

  • Enabling anonymous access in SharePoint 2007

    Even though Microsoft has done a great job on improving the user interface in SharePoint 2007, some things are still buried and require a little “black magic” to get done. In this entry I’ll show you how to enable anonymous access on your site.

    First, you need to enable anonymous on the IIS web site (called a Web Application in SharePoint land). This can be done by:

    • Launching Internet Information Services Manager from the Start -> Administration Tools menu
    • Select the web site, right click and select Properties
    • Click on the Directory Security tab
    • Click on Edit in the Authentication and access control section

    Instead we’ll do it SharePoint style using the Central Administration section:

    • First get to your portal. Then under “My Links” look for “Central Administration” and select it.
    • In the Central Administration site select “Application Management” either in the Quick Launch or across the top tabs
    • Select “Authentication Providers” in the “Application Security” section
    • Click on the “Default” zone (or whatever zone you want to enable anonymous access for)
    • Under “Anonymous Access” click the check box to enable it and click “Save”

    NOTE: Make sure the “Web Application” in the menu at the top right is your portal/site and not the admin site.

    You can confirm that anonymous access is enabled by going back into the IIS console and checking the Directory Security properties.

    Now the second part is to enable anonymous access in the site.

    • Return to your sites home page and navigate to the site settings page. In MOSS, this is under Site ActionsSite SettingsModify All Site Settings. In WSS it’s under Site ActionsSite Settings.
    • Under the “Users and Permissions” section click on “Advanced permissions”
    • On the “Settings” drop down menu (on the toolbar) select “Anonymous Access”
    • Select the option you want anonymous users to have (full access or documents and lists only)

    Now users without logging in will get whatever option you allowed them.

    A couple of notes about anonymous access:

    • You will need to set up the 2nd part for all sites unless you have permission inheritance turned on
    • If you don’t see the “Anonymous Access” menu option in the “Settings” menu, it might not be turned on in Central Admin/IIS. You can manually navigate to “_layouts/setanon.aspx” if you want, but the options will be grayed out if it hasn’t been enabled in IIS
    • You must do both setups to enable anonymous access for users, one in IIS and the other in each site

    Hope that helps!

  • How the web could be

    The phrase always comes up. “Blame Hanselman”. Scott Hanselman is the bane of new technology, gadgets, and tools for me. Like a lemming, he mentions something cool and we all flock to it. Today he was rambling on about a new reader from the NY Times (written using WPF) that is the cat’s meow. I’m not one to normally read the times as I find it bloated and boring, but figured it was WPF and Scott’s blog entry on it looked interesting.


    This really is the killer app for WPF, as it not only has everything but it’s brilliantly done. So many times paper publications have tried to make electronic versions of themselves and just basically failed. Others will convert their paper copies to something like a PDF file, but for whatever reason, the fonts/images just don’t look that great. Take a look at the image above. Even in the size the image is now (500px wide) you can still read the text (and that’s at the second lowest setting).

    The layout is simple yet functional. The designers didn’t take the “one-resolution-fits-all” approach. As you resize the reader window, it moves elements around and fits them in smartly (for example, the newspaper sections wrap as the window changes size. However, everything stays relative so you’re not hunting around for a button or function that vanished off the page because you sized the screen too small. Too many developers omit little things like this when they build software. The NY Times guys got it right.

    As for the features, you can search, change the font size, save the article (only in Times Reader format), email an excerpt (with links to the reader for those that don’t have it), and even create ink notes (if you have a tablet). Very slick.

    The app is updating and you can just click on the update icon to download newer content. Like I said, I don’t read the Times so not sure if they post multiple issues during the day or if this app is fast becoming a more “live” version of the newspaper. People always say newspapers and magazines are so outdated because they report the news but then have to print and distribute. This removes that problem.

    Okay, it’s not the first time a newspaper or magazine put their content into a reader (like I said, some have tried and failed) but I think it’s the first in using the Windows Presentation Foundation so there’s a cool factor here. And it’s well done. That says a lot.

    However, just imagine if your favourite RSS reader delivered it’s content this way? Some newsreaders offer a “newspaper-like” view (Omea reader can do this, and I think FeedDemon can) which reformats RSS feeds into this style (and sucks in any photos in a blog entry to supplement the article). I don’t see why an RSS reader can’t be like this all the time as it’s a very user-friendly experience and would make reading feeds that much more fun everyday.

    While I know the WPF is not for the web, with the advent of Atlas coming and web apps getting all AJAXy on us, why not have a web like this? Why can’t we have rich-web apps like the New York Times reader online? Sure this implementation is a client application, but the UI is so thin it could easily be done as an AJAX/Atlas website. The next step is to have the choice or a seamless transition from one to the other. Why can’t your browser be a shell for rich-client ClickOnce apps instead of a HTML rendering engine. I would like to see more apps built this way (both web and client) where appropriate.

    I agree with Scott that the NY Times should have made this a ClickOnce app so it would always be current but other than that, this is a freakin’ cool demonstration of the Windows Presentation Foundation and how it can deliver a simple, yet effective solution.

    You can download the NY Times Reader application from here (registration required, free to those who are breathing with an email address)


  • Buying a laptop that doesn't explode

    I guess I have one rule when I’m buying hardware. It shouldn’t explode on me (unless it was designed to).

    I’m struggling with buying a new laptop. I have a nice Compaq Presario R4000 that I’ve enjoyed for a year or so and it’s okay spec wise. AMD Athlon 64 processor (3500+), 2.2Ghz, 2GB of RAM. However it’s a big of a dog for doing daily development. I tried doing development on a desktop and sync up things via an external USB drive but it’s just too painful. Paths are wrong, sometimes things don’t work, software not the same, websites or services are not all there, VMs have to be reconfigured, etc.

    So now I’m looking at a dual-core system. Dell and Toshiba have some okay laptops but lately everything is just blowing up on people. I mean Apple, Dell, Panasonic, and Toshiba have all done recalls on their systems. There are also reports of ThinkPads blowing sky high. Doesn’t give me a warm fuzzy. The one option that I saw via a review by someone was an ASUS A6Jc-. Looks nice and at least they haven’t started turning into ash piles.

    Any suggestions?

  • Presentation of BDC to NYC SharePoint Group online

    Matt sent me a note saying that they’ve posted the web cast I did for the New York City SharePoint Users Group a couple of weeks ago on the BDC on their site. You can watch the 30 minute session here. It covers walking through some of Todd Baginski’s BDC generator tool, and showing results in SharePoint. With only 30 minutes, its hard to get into things like building custom search tabs, sucking in data from a web service, and other BDC goodness. I’ll get into all that at DevConnections in November as I have a 75 minute session I’m presenting on the BDC.

    You know, I really have to improve my speaking skills. Either I was nervous, on drugs grown in my homemade crystal meth lab, or really need to listen to myself more often. Lots of “ums” thrown in as I was speaking so I apologize to listeners. I really do know what I’m talking about (at least I hope I do) and have done enough of these that I should know better. Although I’m doing these web casts with a cell phone on one ear with one hand and typing with the another. I probably should invest in a headset.

    And no, I wasn’t wearing any pants during the web cast.

  • WSSv3 setup this weekend

    Now that my web hosting company, Webhost4life, has got their act together I’m going to be upgrading some of my sites to WSSv3. This will include my SharePoint dev site with all the application templates. Not sure if I’ll spin up an extra site or what I’ll do, but my main vanity site (currently running on DotNetNuke 4) will get a SharePoint facelift along with a few others. If you’re trying to access them this weekend, they may go offline as domain and sub-domain names swap around. Then it’ll be time to start uploading custom web parts and really going to town.

  • First iteration done as in dinner

    Well, 30 days later and our first sprint is done. We finished ahead of schedule at about 2pm the day before the sprint “officially” ended with one task remaining that the QA guy had to do. It was a fun ride and challenging. The entire team (sans me) had to deal with the following new technologies:

    As well as adapt to the Scrum process as they were mostly used to waterfall-esqe approaches (BDUF, highly detailed specs, etc.). I think everyone adapted pretty well. We had some churn the first couple of weeks as the plumbing got settled, we got used to using Team System (as a team) without clobbering each others work. Here’s the burndown from the iteration:


    Things were a little goofy. First off I entered all the features into the Product Backlog, but then another guy (while I was enjoying the backwoods of B.C.) entered the same set and deleted my initial ones. Then we forgot to enter the initial estimates for the sprint. Finally we had entered the estimates but then had entered them in hours and Scrum for Team System uses days for the product backlog items. So that explains the false start (I’m still trying to manipulate the original warehouse database to correct that).

    The other three gaps were caused by over estimation. On the 28th of August, we introduced a data layer using NetTiers and a few simple tables. That knocked two tasks that were pegged at 14 hours each down to nothing in a day. On the 11th of September we did the same thing for the next set of data we needed to store. Finally on the 18th of September we realized there were 3 or 4 tasks that were estimated at about 8–10 hours but they were really just rolled up in another screen, so that was knocked off in a day.

    Not the prettiest sprint burndown chart out there, but it’s real numbers.

    As for our Sprint Review, that was almost a huge guffaw. Our review with the customers was yesterday at 10am. We had stopped development and put out a release for final QA testing by noon the day before. Everything worked fine. The QA guy and some devs were working until about 9pm that night either just admiring what we did or were adding little things we wanted to put into the system (but we weren’t going to show this) and all was well. Then at 7:30 the next morning, our QA came in and couldn’t run the app. By the time 9am rolled around and we were checking the release to go over the demo, nothing worked. We tried on every machine and still no dice.

    At 9:30 we reset the database and I thought we had done something horrible because the app wouldn’t even launch. Man, we were sweating bullets. Finally we determined that something happened with the proxy server on the network, so launching our ClickOnce app was failing and the exception handler couldn’t deal with it (for whatever reason). The network guys push stuff out all the time but apps for this customer never were this complicated, so nothing ever was affected. Anyways, to get the demo up and running we commented out some handling and it ran fine.

    As we were really cramped for time and didn’t have time to start up the laptop to demo the system, I didn’t want to chance having that fail so we grabbed the one dev’s desktop (a Dell Dimension E521), his keyboard and mouse and screen (luckily it was a LCD and not a CRT) and hauled ass across the street to the building where we did the review.

    At the end of the day, the customer was happy with what we did. There were a few suggestions and ideas that we’ll add to the next sprint. We spent an hour and a half going over the backlog items for the next sprint and ended up with a nice list to deliver the first release at the end of October. That burndown will be more of a slope than a bumpy ride, but the team had fun and we delivered working software which was the key thing.

    One more note. We couldn’t figure out why when we were going through the product that a list of values were not coming back from a corporate web service. A different list we used was being populated from that same service, but the one list of numbers we wanted wasn’t. Later that day I found out that one of the devs in the other building had deleted that web service method because he thought it was a duplicate. Luckily, our system was built using Smart Web References (part of the Smart Client Software Factory) and will simply return us the list of values and a success/failure value of the web service call. This isn’t exposed to the user, but at least the app didn’t hit and unhandled exception during the demo. Thanks Les!

  • Ahoy! You scurvy SharePointers

    Yes, just like your favorite MVP, International Talk Like a Pirate Day comes but once a year and it's today, September 19th. So go ahead, wander around your offices like a blubbering peg-leg idiot and feel free to slip in a few "argghhs,"  "mateys," and "shiver me source code" comments to anyone who looks like a land-lubber.

  • Spend an hour searching with SharePoint and Robert Bogue

    Robert Bogue has been around in the SharePoint sphere for sometime now and is just starting to put together screen casts (web casts, whatever you want to call them) for SharePoint.

    The first in his screen casts is based on a live presentation he’s been giving for the past year and a half. It explains all the ins and outs of SharePoint search. It’s based on 2003 but the principles apply to 2007 (and I’m sure he’ll update it for 2007 hint, hint). So he’s offering up his SharePoint Advisor presentation, repackaged into a web cast. All free as in beer, which is always good.

    You can check out his blog entry here and watch the screen cast here.

    Watch for more screen casts from the entire SharePoint MVP community (and other SharePointHeads out there) over the next few months (including yours truly) as we discover what we can do with this wonderful technology ;)

  • Omea is the new FeedDemon

    I seem to be doing software service announcements lately, but I’m just levelling out my 3rd party tools and whatnot on my laptop as I spend a Sunday afternoon catching up on podcasts and coding stuff in the background (I’m just too A.D.D. to be doing one thing at a time).

    Recently I’ve been struggling with my RSS feeds, newsgroups, and email. Basically I’ve been trying to find a good set of tools/add-ins to manage email, RSS feeds, newsgroup postings, and (to a lesser extent) bookmarks). I mean here we are in the information age, but there’s so much information out there. So many inputs coming in, and trying to sort it all out with tools. I’ve installed and tried out various tools and tool combos which went through a folly of tools:

    • RSS Bandit for RSS feeds
    • RSS Bandit for newsgroup posts
    • Outlook 2003 + Newshound for newsgroup posts
    • Outlook 2003 + IntraVnews for RSS feeds
    • FeedDemon for RSS feeds
    • Outlook 2007 for RSS feeds
    • Outlook 2007 + Newshound for newsgroup posts

    I think I’ve finally found the sweet spot. Thanks to Andrew Connell who uses Omea reader, I decided to give it a try. It’s by the guys from JetBrains who make ReSharper, IntelliJ, and a whole bunch of cool tools. AC uses the notify feature of it to read newsgroups, and be notified when someone replies to a thread (usually one he replies to). This is a great feature of the tool because in this day, we’re trying to sift through hundreds of posts a day in a half dozen SharePoint newsgroups. No easy feat even for a super-human MVP like myself.


    I downloaded the tool, imported my OPML and found it to be slick. It lets me categorize the content as there are many blog entries I keep as a knowledge base. It’s fast and downloads/updates in the background and doesn’t require a gob of memory (one of the problems with RSS Bandit). And the notify feature just rocks.

    So I’m now hooked on JetBrains Omea Reader for RSS feeds and newsgroups and Outlook will just be fine for email. Omea can handle your mail as well, but I think I’ll stick with Outlook for now.

    Anyways, enough with the tools. Time to get back to writing tests. Red. Green. Refactor. It’s a great Sunday!

  • Joel on Team System

    Just listening to Joel Semeniuk on the latest podcast of .NET Rocks! as they talk about Team System. As a Scrum-junkie, I really love the fact that Microsoft did something right with Team System when they left the system open. It opened the door for people like Conchango to put out their very excellent Scrum for Team System set of process templates. As Joel mentions in the podcast, for a developer who’s savvy with Team System but doensn’t know about Scrum the plugin lets you understand Scrum a little better, and vice-versa for the Scrum guy who doesn’t know Team System. It works for both types of developers which is nice. If you’re trying to struggle with Team System, or you’re trying to get Scrum working with the MSF Agile template MS ships then you might want to take a look at Scrum for Team System. It’s very slick (and free!).

  • Beta 2 Technical Refresh fever

    It’s B2TR fever this week as Microsoft released the technical refresh. Of course it’s got a lot of people scratching their heads about installing, but there are also a lot of new cool features there. Be sure to keep an eye on the SharePoint blogs (SharePointKicks is an excellent source for this) as many people are posting screencasts, walkthroughs, and all that good stuff for installing and upgrading the TR.

    Also the SDK for Office Server has been updated and is avaiable. It also includes a download with samples. These samples include Business Data Catalog metadata samples, Custom Single Sign-On Provider, SampleWebService, and Custom Filter Web Parts. You can grab both new downloads from Microsoft here.

  • Newshound on Outlook 2007 Beta 2 TR

    Just downloaded the latest version of Newshound, an add-in for Microsoft Outlook that lets you read and reply to usenet newsgroups in your Outlook client. They’ve updated it to work with Outlook 2007 and I just tried it with the Technical Refresh released yesterday. Here’s the results:


    Works great and the thread in newsgroups seems to be working much better than last time! Finally getting some traction with having to deal with email, newsgroups, and RSS feeds (although I’ve switched over to FeedDemon for my RSS feeds as RSS Bandit was just a memory pig and Outlook 2007 doesn’t update the RSS properly).

    So if you’re looking for an integrated solution, give Newshound a try!

  • More 2007 Technical Refresh links

    Just a quickie this morning. Seems people find it difficult to locate download links. Maybe I’m just Google-gifted or something. Here are the software development kit links for the Office 2007 technical refresh:

    There’s no update to the SharePoint Server (MOSS) SDK yet as the last link is still from May 22nd but I’ll post an update once it goes online.

  • Ken Schwaber introduction to Scrum video on Google Tech Talks

    Ken Schwaber is the co-founder of the Agile process called Scrum (which BTW is not an acronym) recently gave a talk which has been put online via a serivce called Google Tech Talk.

    It’s an hour long presentation but gives you an excellent introduction to Scrum (if you’re not already familar with it) including the interesting history behind it. If you don’t know what Scrum is and are interested (or haven’t heard Ken talk as he’s a great speaker IMHO), you can check it out here.

    Nothing like getting the facts straight from the horses mouth (so to speak).

  • Microsoft Office SharePoint Server 2007 Beta 2 Technical Refresh - Thursday

    Wow, that’s a big blog title to say three times fast (or one time slowly).

    Anyways, after the public beta release of MOSS back during the TechEd days, you can grab the latest bits for what Microsoft calls a “Technical Refresh” as of tommorow morning (Thursday, 9AM PST). It’s not another full-fledged beta, it’s an update to it and corrects various issues, adds some new things, and “refreshes” your beta 2 install here and there (including cosmetic changes).

    The news is out on the various websites with some reviews and additional info about the release:

    The update is available for the entire Office 2007 stack, but of course I’m a biased blogger and this entry only talks about Office SharePoint Server (MOSS) and Windows SharePoint Services v3.

    Like I said, it’s a technical refresh but it does improve things. At the same time however, it might break other things. For example, some of the BDC entries might be “off” and require reconfiguration. There are other areas that have changed that might break things you have in place. While this is a technical refresh, Microsoft is providing an upgrade path from Beta 2 to release so installing this is optional, but recommended. Why? It’s more stable and there are more features and generally it’s creeping closer and closer to a release candidate flavour.

    Now for the zinger. As has been mentioned around the blog-o-sphere, installing the TR is not going to be a “ClickOnce” type scenario. There are some vital steps you have to take, otherwise you may invalidate the install or (worse case) corrupt your data. Of course always backup your data before you try this. Also, when/if you do download the bits and start your install remember…


    Yes, I know. We as developers, architects, and internet gurus laugh at the mere thought of documentation however if you have to read one doc (besides your kids report card) in your life, make it this one. If you don’t, you’ll be travelling a path I cannot follow (or help you as will most other people).

    The two key facts to highlight for your install that I want to mention here (besides backup and RTFM) are:

    • Shut down the Search Services before you upgrade
    • As I mentioned, there’s the potential to corrupt data during the upgrade if the Search Service is still running. So go into your Services in your Administration screen and shut it down. There, now wasn’t that easy?
    • Install all the Beta 2 products and language packs before you upgrade
    • You know the saying “Once you go black…”. Same thing here. Once you install B2TR you won’t be able to install any additional products or language packs. So make sure you have everything installed in your VPC, Server, etc. before you upgrade.

    Also if you’re upgrading a Beta 2 standard installation, there’s a workaround required so again, crack open that README and just do it.

    In a nutshell (and this is by no means a replacement for the documentation) here’s the sequence you’ll go through to upgrade from Beta 2 to Beta 2 TR:

    • Turn off WSS Search and Disable OSS Search
    • Install the update to Windows Workflow Foundation (.NET 3.0)
    • Install the WSS patch
    • Install the MOSS patch (if upgrade MOSS)
    • Restart forms services and workflows
    • Restart the Search Services

    Watch the blogs for detailed instructions, gotchas, workarounds, screenshots, etc. from the various SharePoint bloggers (including myself). If you do run into problems of course just yell. We’re always here to listen and try to help (or make crazy fish jokes like the one about the walrus, the nurse, and the prostitute, your choice).

  • Getting ready for B2TR and SharePoint Comparisons

    A bit of a mish-mash this morning as the caffeine hits the veins and all of my cylinders start firing.

    First there’s a quick post about the upcoming Beta 2 Technical Refresh for Office 2007 (which includes MOSS/Windows SharePoint Services) from the SharePoint team. It’s basically a RTFM post and it is important. As Lawrence pointed out in his own post, the upgrade is not just simply a double-click of an EXE. There are some steps you have to manually do before and after the install to ensure a fully upgraded version. So keep an eye out for these and I’ll post more info when the update is released to the wild.

    The second thing is a nice summary that MS put together on the differences between 2003 and the various flavours of 2007. It’s in the form of an excel spreadsheet and really sums up what’s changed. Something to keep handy when you’re scrambling to explain what the differences are to those high-priced execs. You can download it here.

  • Exposing business objects to the UI

    I've been working the past few months with the Composite UI Application Block (CAB) and the Smart Client Software Factory (SCSF). They're all great but the documentation throws me for a loop sometimes.

    In an entry called "Map Business Entities into User Interface Elements" it suggests creating a mapper class and using it to convert some business object into a UI one. This makes sense however the implementation and references cause my head to hurt.

    In a typical MVP pattern, you have the Model (your business object), the View (the UI), and the Presenter (a go-between guy). The presenter knows about both the view and the model. It needs to inform the model to update based on messages recieved from the view, and tell the view about changes in the model. Neither the model or the view have any knowledge of each other.

    Introduce the mapper which knows about the Model and the View. This is the other side of the equation so when given a business object, the mapper will spit out a drop down list, a grid control, or whatever UI element is appropriate to display something from the business layer (say a list of customers).

    In the example Microsoft provides via the guidance package, the view has a method that accepts a business object which then calls the mapper to translate it into a ListViewItem. The view then updates its UI control (a ListView control) by adding list items to it created by the mapper.

    However this means that you're exposing you business objects to the user interface, which creates a coupling between the UI and the business layer (at least from a deployment perspective). If you don't do it this way you have to have the presenter (which should know about domain objects so that's ok) update the view but what is it going to update it with? Certainly not a ListViewItem which will make the presenter dependent on the windows form control assemblies.

    Without creating a intermediate object (like a CustomerDTO with nothing but getters/setters) are we really bound to have the UI reference the business layer and is the documentation here really a best practice for exposing business objects to the UI? How do you guys do it?

  • Hello <<NAME>>

    As the Ricky Bobby of the SharePoint world (too bad Matt, it’s sticking now even if nobody gets it) I receive a lot of weird emails.

    And then there was this:

    Hi <<NAME>>,

    My name is [REMOVED], and I'm a recruiter with [REMOVED].  

    I came across your resume in our system, and I thought I'd try to touch base because I wanted to talk with you in regards to a high profile project that I'm working on in [REMOVED] that seems to fit fairly well with your skill set. 

    I'd love to get a better understanding of your career ambitions and availability. Is there a number I can reach you at, and a 10 minute time slot that you could open up for me?  If it's more convenient, please don't hesitate to contact me directly.  You can reach me via email or at [REMOVED]. 

    Thanks very much <<NAME>> -- I'm looking forward to speaking with you!


    (Note: the [REMOVED] part is information about who sent it with phone numbers and such. I’ve blanked it out to protect the village idiot who sent me this in the first place.)

    My geek-to-be promptly told me to send this message back to the firm:

    Hi <<NAME>>,

    Thank you for your personal interest in my career, however at this time I am currently working for a company that is better versed in using mail merge techniques.

    Thanks very much <<NAME>>

    Bil Simser


  • Titles and Reflections

    Last nights webcast went pretty well with the NYC SharePoint User Group (say that three times fast). There was a great turnout (over 60 peeps including Scot Hillier, Box Fox and other SharePoint luminites) and there were some good questions and hopefully equally good answers. Compressing the BDC into a 20 minute session is like fitting Rosie O'donnell into a tutu. Ugly. However it went pretty good and I hope everyone got introduced to what's a very cool part of MOSS 2007.

    Shout outs to the entire group and especially Matt from CorasWorks and his minions for making everything work smoothly. Matt introduced me as the Ricky Bobby of the SharePoint world. While that may be true (although I probably share that distinction with Todd Bleeker) I always thought of myself more as the Weird Al Yankovic of the SharePoint world. Anyways, I believe they captured the web cast and will hopefully be putting it online for all to cry over.

    Finally (off-topic), I had an errand to do today and wandered outside to get there. The weather here in Calgary is still short-sleeve'ish so it was a nice walk. I noticed I passed by 3 statues commemorating dead people. All people who died in the service of their country. Now I'm all for honoring people and such, but when are we going to see statues of people who died of natural causes rather than those who went down in a flaming plane?

    One can dream.

  • NYC SharePoint User Group Presentation on BDC Tommorow

    It’s a hot time in the cool city tommorow. Well, it’ll be hot here in Calgary and I don’t know the weather in New York but anyways I’ll be doing a webcast for the NYC SharePoint User Group tommorow (Wednesday). The webcast is on the BDC and while I only have a half-hour to present, we’ll run through some samples in the BDC, how to create and use Content Types defined in the BDC and a little coding sample calling the BDC services to programmitically “make stuff happen”.

    If you’re signed up then great (they tell me there’s about 60 people coming already), otherwise see if you can get in by visiting the NYC SharePoint User Group Portal here. The meeting starts at 5:30pm EST at the MS office in New York. This is the first in their “MVP Series” that they’re presenting so hopefully I won’t screw it up too badly for you guys that follow ;)

    This is a Live Meeting presenation and I’m not sure if they record the demo or if I’ll be able to, but hopefully we can put it online for anyone else to suck down and kick back with after the fact. After all, they only have so many sandwiches they can muster up at the user group meeting.

    See you then!

  • TDD validation... NetTiers Style

    Let’s face it. At the end of the day, even the most purist of us object-oriented bigots know the real truth. Objects need data to work. Yes, behaviour defines an object and all that OOD popycock but I mean, a Customer domain object still needs a name, telephone number, and address in order to be of any value in an Enterprise system right? Sure there are “business rules” we want to write but all the unit tests in the world are not going to get around the fact that objects need data and sometimes that data needs to be saved (or retrieved, or both).

    The problem we all face, sooner or later, is how do I get data from some datasource (for the sake of the argument here, let’s say a database) into (and out of) my object? There are really two ways to go about it and for the purpose of this article, let’s avoid the O/R mapping ramble. So that leaves us plucking data from properties exposed in a business object and shuffling it off to parts unknown to be stored somewhere. Service objects and Repositories and Mappers and Translators and all kinds of other things having intimate knowledge of the types and properties of domain objects. On the flipside of this, there’s a pattern called ActiveRecord that follows the principle that an object would communicate with an outside service and publish it’s properties for persistence (or the other way round loading data from a data source). Neither of these situations is really pleasant but it’s a bear we deal with when we have to shut down machines and expect that information to be there tommorow.

    The latest version of a set of CodeSmith templates called NetTiers provides us with an interesting way to look at our domain (and getting it to/from a database). CodeSmith is a code generation tool and using the NetTiers templates, it creates a n-tier set of classes (about 90 of them from a simple database) that allow you to do cool stuff like this:


    This is all neatly wrapped up in a transaction (if the database supports it and/or you configure it to use transactions) and all dynamically generated based on tables and columns in a database. It’s all very slick and NetTiers can create an entire app (minus the front-end) for you in less than 10 seconds. So what’s this got to do with TDD?

    Imagine we’re starting an application and we’re going to be building it using TDD. We have some requirements and we’re ready to start writing tests. Given a requirement that a Customer name can not exceed 50 characters we might write a test like this:

    namespace NetTiersTDD.UnitTests



        public class CustomerFixture




            public void CustomerNameShouldNotExceed50Characters()


                Customer customer = new Customer();

                customer.Name = "X".PadLeft(51);




    This is fine and a good start. So now we create our business entity to support the test:

    namespace NetTiersTDD.Entities


        public class Customer


            private string _name;

            public string Name


                set { _name = value; }




    Great. Our unit test compiles but out test fails (which is good, remember Red-Green-Refactor). Now let’s make the test pass in our business entity:

    namespace NetTiersTDD.Entities


        public class Customer


            private string _name;

            public string Name




                    if(value.Length > 50)

                        throw new ApplicationException();

                    _name = value;





    Fantastic. So this can be typical when doing something like these checks. There are other checks you might do and the general idea is around failing fast so you would throw an exception when some validation fails on your business entity (you don’t want to find out your domain object is invalid several layers or operations down the stack).

    Fast forward about 3 days and you find yourself slugging through requirements like this (and others) and your classes start buffing up and out. More domain logic, lots of tests, goodness. However, you might notice something happening with some of your tests. Take a look at our Customer test now:

    namespace NetTiersTDD.UnitTests



        public class CustomerFixture




            public void CustomerNameShouldNotExceed50Characters()


                Customer customer = new Customer();

                customer.Name = "X".PadLeft(51);





            public void CustomerAddressShouldNotExceed255Characters()


                Customer customer = new Customer();

                customer.Address = "X".PadLeft(256);





            public void CustomerAgeShouldNotExceed65()


                Customer customer = new Customer();

                customer.Age = 66;




    (note: I’m using ApplicationException here but you would probably have a specific exception for different validations)

    Lots of exceptions being thrown because well, it’s a business rule violation. By design, we don’t want to make our domain object invalid by any means so we throw an exception when setting a property that’s invalid. This will immediately let us know something is wrong and, if we had a UI, we could inform the user of the error (maybe with a Message Box telling him that a field is too long or required or whatever). This is fine and dandy but makes me queasy. I mean, exceptions are expensive. Imagine I had an import routine that brought in crappy (un-validated) data from an Excel spreadsheet and created 1,000 domain objects in a collection. That’s a heck of a lot of exceptions.

    An alternative is to post-validate an object. That’s a valid approach. Let whatever information come into the system (from a user or that crappy spreadsheet) and validate the object after the fact. Then I can do something like check an IsValid property (or the return value from a method called Validate()) and act accordingly. I’m still not letting my domain object get out of control because the unit of work hasn’t completed until I validate the object so we’re good to go. This is okay but now we need a Validate method, some way to retrieve the validity of our business object, some way to set the rules for various properties, and other “helper” methods. Some astute readers will jump up and say “I know, let’s decorate properties with attributes and use reflection in a standard method to validate a setter”. Cool and nice out-of-the-box thinking and certainly something you could do (and something that might start to drift into AOP territory but that’s a whole ‘nuther can o’ worms that I won’t get into either).

    So other than reflection, I now have to write a bevy of code to handle validation, invalid state, modify changes to properties (or maybe respond to them) and lots of other little niggly bits. If I was being paid by the line then maybe I want to do this. And hey, if I build a framework we can use it everywhere in the organization so it’s an investment. Yes, this is again a valid thing to do but my motto is don’t write something that can be created by a tool for you (and works). Using the validation framework generated from NetTiers, we can get all this (and more) for a pretty insignificant cost. On top of that, we have a DAL written for us that we don’t have to worry about and can use later when we need to persist our business entities (and what application doesn’t do that?).

    Again Bil, what the heck does this have to do with TDD?

    Like I said, NetTiers (via CodeSmith) will generate billions of lines of code for you with the single click of a button. Buried in that code are some base classes that NetTiers will use with your business entities (gen’d from your tables based on it’s columns and constraints) and buried deeper down than that are some pretty cool utilities and classes that you can use to write less code (but get more accomplished). I’m all for something that works and let’s me write less code to get more done and that’s what I can get from NetTiers.

    Let’s go back to our Customer class and try some NetTeirsTDD. First thing is you need NetTiers to generate you it’s artifacts. This involves creating a database and a table. Yeah, I know. TDD. Database. The TDD guys are saying “Oh man, he’s got it all wrong”. Just walk with me on this okay?

    Create a new database and add a simple table to it. Here’s the one I used:


    The table is called Ernie with ID and Title columns. The name and columns really don’t matter so you can call it Temp, Balloon, Mayonaise, or Wurstie for what it’s worth. Just call it something that won’t be one of your business objects because hey, we’re doing TDD and we don’t create business objects until we need them right? The temp table (and resulting generated code) is so you have a starting point (and a framework to leverage, which is what we’re getting to).

    Now run CodeSmith using the NetTiers templates. In the latest version (2.0) of the template, you’ll need to set a few things:

    • Point it at your datasource via the ChooseSourceDatabase property
    • Set IncludeUnitTest to True (this will create a unit test project)
    • Set LaunchVisualStudio to True
    • Set GenerateWebLibrary and GenerateWebSite to False
    • Set ViewReport to False (or leave it on if you want, your choice)

    Once those options are set hit Generate. In about 10 seconds you’ll have about 60 classes, 4 projects, and the basis for your starter solution.

    Finally let’s get into some TDD. Go to the opened instance of Visual Studio with the solution that was created for you. The unit test project that you created will already have references to the various other projects (including a raft of unit tests to test persistence of your Ernie class). Let’s go back and start our Customer test again, except we’ll do things a little differently.

    First let’s modify the test that we originally wrote. Instead of expecting an exception, we’ll use an IsValid boolean property:

    namespace NetTiersTDD.UnitTests



        public class CustomerFixture



            public void CustomerNameShouldNotExceed50Characters()


                Customer customer = new Customer();

                customer.Name = "X".PadLeft(51);

                Assert.AreEqual(false, customer.IsValid);




    Looks harmless and something we might do. IsValid will return true or false if the customer object is valid (and in this test, we want IsValid to return false because we expect it to be that way after setting the name with too many characters). Now here’s where the magic comes in. Create your Customer class but inherit from a class called EntityBase (a class that’s part of the framework NetTiers created). To get this code setup to compile, EntityBase requires a few abstract methods to be implemented. They don’t have to do anything (for now) so you have a couple of options (like create a StubEntityBase and implement the methods in that). So let’s do that make our Customer class work. Create a class called StubEntityBase with these members implemented like so:

    public class StubEntityBase : EntityBase


        public override void CancelChanges()


            throw new Exception("The method or operation is not implemented.");



        public override string TableName


            get { throw new Exception("The method or operation is not implemented."); }



        public override int ID




                throw new Exception("The method or operation is not implemented.");




                throw new Exception("The method or operation is not implemented.");




        public override string Title




                throw new Exception("The method or operation is not implemented.");




                throw new Exception("The method or operation is not implemented.");




        public override string EntityTrackingKey




                throw new Exception("The method or operation is not implemented.");




                throw new Exception("The method or operation is not implemented.");




        public override object ParentCollection




                throw new Exception("The method or operation is not implemented.");




                throw new Exception("The method or operation is not implemented.");




        public override string[] TableColumns


            get { throw new Exception("The method or operation is not implemented."); }



    Now inherit Customer from StubEntityBase instead of EntityBase.

    public class Customer : StubEntityBase


        private string _name;

        public string Name




                _name = value;




                return _name;




    Great, run the unit test and it fails. IsValid returns true because we haven’t put any validation checking in our business object yet. Now it’s time to make it pass. Change the Customer class to show this:

    public class Customer : StubEntityBase


        protected override void AddValidationRules()




                new Validation.CommonRules.MaxLengthRuleArgs("Name", 50));



        private string _name;

        public string Name




                _name = value;





                return _name;




    We’re doing two things in the business class to make our test pass. First, we’re overriding a method called AddValidationRules. This gets called (lazy loaded) when a validation check is done (for example when you call IsValid). The ValidationRules is a list of rule objects (again, classes in the NetTiers framework) that you can setup. The CommonRules contains things like length checks, required fields, not greater than, etc. You can also get into designing your own rules but that’s for another blog. So we tell it to check the property named “Name” and make sure it doesn’t exceed 50 characters. If it does, it adds a BrokenRule object to another list.

    Then we add a call to the setter for name to trigger an event called “OnPropertyChanged” and pass the name of the property we’re setting. This will do a validation check against the property by invoking any rules that match the property name (you can have multiple rules per property).

    Finally when the IsValid property is called on the business entity, it checks the ValidationRules list, finds a list of BrokenRules (rules that failed validation when the OnPropertyChanged event was called) and returns true of the count is not 0.

    Cool huh? Lots of business validation stuff going on but none of the plumbing we had to write to get it. There are some other neat side effects that you can get from this framework. For example, back in our unit test we can just ask the object what the error(s) are and print them out:


    public void CustomerNameShouldNotExceed50Characters()


        Customer customer = new Customer();

        customer.Name = "X".PadLeft(51);

        if (!customer.IsValid)


        Assert.AreEqual(false, customer.IsValid);


    This prints out:

    ------ Test started: Assembly: NetTiersTDD.UnitTests.dll ------

    Name can not exceed 50 characters

    1 passed, 0 failed, 0 skipped, took 0.56 seconds.

    Very useful when writing out the errors to the screen or a log (rather than having to figure out what the error was, then compose a message for it).

    Let’s go back to what was originally generated with that first cut off the database. By default, NetTiers generates a report showing you all the craziness it did. This includes a plethora of classes like ListBase, EntityFactory, BrokenRule, ValidationRules, EntityCache, EntityPropertyComparer, and a bunch of other classes. These classes actually have nothing to do with data persistance but form an object framework that we can use (like above) to validate our business objects.

    These are all generated by the tool but are used by business entities. For example, ListBase is a generic list (just like List<T>) but supports searching, filtering, sorting, and databinding. Feel free to load up business entities into it and bind it to a GridView for some fun. EntityCache is a class that you can use to add entities to a cache manager. The manager is actually driven by Enterprise Libraries (which the NetTiers code is built on top of) but it lets you add your own business entities to a cache and find them later. This can be handy for in-memory Repositories or just quick and dirty tests where you need to retrieve known objects (but don’t want to create singletons or something). There’s lots of great classes and helpers that are generated for you and all it takes is a single table to get going (which you can delete later and all the code for it will wash away) so explore the business entity project that gets created and check it out (there’s also full documentation on all the classes and methods that you can create using something like Sandcastle).

    Finally, at some point you will (or probably) have to save your business entities data in a database. Again, this is where it gets simple (but it’s a bit of a manual process). Let’s say you’ve written up your object with various rules (not just length checking stuff but real business tests) and need to save it. You take a look at what the business object has and decide on a structure. Just a simple structure since all you really need to do is CRUD. Create the table and regen the DAL using CodeSmith and NetTiers (saving your business validations before you do this). Now just drop the business validations in the new genrated object that will derive from MyObjectBase and you’re good to go.

    Let me clarify the steps I described above:

    • Write your unit tests and create whatever business classes that come out of your tests (adding your business classes to the Entities project NetTiers generated)
    • Identify what properties you need to persist from your business class and create a simple table with the same name as the class to hold them
    • Rename your business class to a placeholder (like MyBusinessObject.txt)
    • Generate the DAL from the database
    • The Entities project will contain one business class for each table created. This class is split into two parts. MyBusinessObject and MyBusinessObjectBase. MyBusinessObject.cs is never regenerated so you’re free to modify it with your business logic and validations (plus any properties that are not stored in the db). MyBusinessObjectBase is a generated file that will get recreated each time the code gen runs (and update accordingly if you add/remove columns in the database)

    For example I create a Customer class that will hold all my customer info. I decide that I’m going to persist the FirstName, LastName, and Age properties. I create a table named Customer to hold these (putting whatever data length and range validations I want on them). Then I rename Customer.cs to a placeholder like Customer.txt. I regen the DAL using NetTiers. I then take the generated Customer class (that will not get overwritten) and drop in the contents of Customer.txt (the part that does my business rules validations).

    You’ll probably do two things with the generated business class. First is to override the AddValidationRules method and add any non-data related rules. Second is to write any business domain rules methods and properties that are not stored in the database (like calculated values). Again this class is not overwritten when you regenerate your code, but the generated code will stay in sync with your database adding new properities and modifying data integrity rules along the way (say if you change the length of a field).

    The cool thing is that things like the length validations (on properties that are persisted) will already be done for you based on your settings in the database. Go ahead and check out the MyBusinessObjectBase.generated.cs file and you’ll see it’s already written out the AddValidationRules method based on columns in the database (remember to call the base method if you add your own rules in the business class).

    Okay, this approach isn’t perfect. It’s not true TDD as in only writing what’s needed. However what does System.Object give you? A bit fat nothing except a unique GetHashCode method and a couple of other useless things. Why not build objects on top of something that has a little extra for you (without having to write it yourself). You do have to make some tradeoffs and for some, it’s too painful to do this. First, you have to bite the bullet that you have a 1:1 relationship of object to table. That’s just the way the NetTiers templates work. Second, you have to have a table (initially and eventually) to generate the code that will do all the data validation but then most business entities have to wind up stored somehow. This technique just helps it along.

    You do also have to build your system on top of Enterprise Libraries and some people are not willing to make that leap just yet. Also, some TDD purists will say that you shouldn’t be dependent on this kind of framework but only write what you need when you need it. I agree but this (IMHO) helps. Look at Rocky Lhotka and his CSLA.NET framework. It’s a highly successful business object framework that you could do TDD from. This isn’t that much different from it (other than the fact you need a database to start from). Maybe I’m wrong and this approach is all wrong, but you need to decide that, not some book or blog entry on the interweb.

    Finally though, as I mentioned, after all this is said and done I can have my business objects persist with a few lines of code and leverage a validation framework to boot. To me, that’s worth the cost of a one-to-one relationship of table to object and some trade-offs if it means that I can work faster with my business domain and validate it quickly and easily. YMMV.

    NOTE: On reading this over now and thinking about it a little more, you might start with a table called Stub. Add an integer ID field and nothing else to it (CodeSmith and NetTiers need at least one column to create something from). Generate the framework from it and base your business objects off the Stub base class (StubBase) rather than creating your own stub like described above. It’ll work in the interim until you have a table of your own for your business class and in the case where you don’t have a table for a business object, you could use this one. Just a thought anyways.

    ADDITIONAL NOTE: Thinking even more about the stub idea, you could probably toss away the Data project and Data.SqlClient project and just be left with the Entities project with a business object framework to leverage, but then that’s really no fun is it?

    FINAL NOTE: Okay, took me about 4 hours to put this entry together so hope it tweaks your brain and encourages discussion in the community. Maybe I’m completely off my rocker and just talking out of my butt, or maybe not. Anyways, this is a technique I’m using on a current (Enterprise) project and it’s coming along nicely. A combination of using the Composite Application UI Block, NetTiers, Domain Driven Design, and more Unit Tests than you can shake a stick at and I’m pretty confident the project will be a success in many ways.

  • Star Trek Haiku Spam

    I think I've finally caught up on emails, RSS feeds, newsgroups, and work since my departure into the Canadian backwoods (note to self: never go anywhere without a good internet connection again, ever). I found an interesting piece of spam this morning in my inbox:

    William Shatner trilogy Captains Glory
    sometime next second Vulcans Soul Exiles
    Josepha Sherman Susan Shwartz. third
    new Pocket Books projects
    papers Getting Links

    Personally, I think it's some kind of twisted Star Trek-Gilligans Island Haiku that an out-of-control computer somewhere in Colorado is generating.

  • Managing the information stack

    I try to keep Life 1.0 in a somewhat organized chaos. When it comes to my computer, there are a lot of things on it (source code, programs, documents, etc.) and there are a lot of things it keeps eating up from the internet (feeds, favorites, newsgroups, emails). That’s a lot of stuff to manage. So when it comes to trying to manage it all, it becomes a bit of a bear. I’m a strong fan of David Allen’s Gettings Things Done (GTD) approach and try to use it with work and hobbies and such (BTW, check out Hanselminutes from a couple of days ago for a lot of great Outlook add-ins around this). This helps organize the mess, but then there’s the problem of disparate types of data and what tools to use to track, read, and store them.

    Take for example the big three. RSS feeds, Email, and Newsgroups (I won’t lump in bookmarked favorites as they aren’t as dynamic). As I’ve committed to Office 2007 now, Outlook is my email tool and it does a pretty good job (other than being a resource pig). The links from Scott’s show help on organizing things so hopefully SpeedFiler or something will help with this. Also the flag/task feature you get OOTB is a great way to follow-up on things. Any email that comes in becomes one of 4 things:

    • Something I should respond to immediately (a simple reply) so I do (then delete it)
    • Something I should follow-up later so I flag it for today, tommorow, next week, etc. This creates a task that’s link to the email. When the email is marked as complete (or deleted), so is the task.
    • Something I should delete so I do
    • Something I should file for future reference, so I do

    The filing is what I might make use of SpeedFiler for, as I do have a lot of different PST files (one for projects, one for software products, one for online things like passwords/sites/domain registrations) and a lot of folders in each one (one folder for each project on the go, one folder for each piece of software organized under the company name). It all works pretty well and since about June I’ve kept my inbox down to a dozen or so messages, all marked for follow-up (as opposed to the 800 items that would just sit there until I slugged through them and moved them somewhere).

    That takes care of emails but what about RSS feeds? Outlook 2007 is pure and simple crap when it comes to these (at least in beta 2). They don’t update correctly, don’t always display correctly, and seem to chew up even more resources than email alone does. That sent me back to RSS Bandit. I really enjoyed that tool but it suffers from a few problems. First is focus. When I’m just moving the cursor through the list of feeds, it sometimes decides to change focus back to the tree. I originally had it configured to mark categories read when I moved off them, but that quickly changed. It does a good job of displaying the feeds and overall isn’t bad (although it does suffer again from memory hog as it’s always running around 200mb which to me just isn’t right). I just installed FeedDemon and it looks interesting. What I like about it is the fact it tracks what I read which helps me find those feeds that I subscribed to, but couldn’t care less about a month later. Maybe FD will turn out to be my reader of choice so time will tell.

    So now we have to deal with newsgroups. I read about a dozen groups along with a half dozen private Microsoft ones. That’s about my capacity as I just can’t keep up beyond that. RSS Bandit has a feature to read newsgroups which looked like a good idea at the time, but it’s threading model is horrible and it’s impossible to figure out where the thread started. There are some stand-alone newsgroup readers out there, but nothing that really jumps out at me. I was using Newshound, an Outlook add-in, but it suffers from beta block. It doesn’t support 2007 (yet).

    It’s all very bothersome. One one hand, I could use something like Newshound and intraVnews as Outlook add-ins, which would give me pretty good RSS and Usenet readers all in the comfort of my Outlook. On the other hand, I could just delegate Outlook for emails and use FeedDemon for RSS and [insert cool news reader here] for Usenet.

    So what’s a girl to do? Turn Outlook into the catch-all for information (like Scott has said a few times, just embed OneNote into the note feature and we might as well throw in a browser tab and we don’t need any other products) or have different tools for similar jobs. It’s all information at the end of the day, and I don’t see RSS feeds, newsgroup posts, or email as being that different in the grand scheme of things. Maybe we need a BDC for information on the desktop. 

    What do you guys recommend? How do you manage your information stack?

  • The ScrumMaster Returns

    I’m currently being a ScrumMaster/mentor for a team on a new Smart Client project (I always think I should be rolling a 20–sided die with each build). It’s a big step for the team as they’re generally VB6 and non-OO/non-.NET developers. It’s also a pretty big step for the client as they’re new to Agile as I’ve been introducing little things over the last few months (unit tests, continuous integration, presentations on various patterns, etc.). Now the rubber hits the road and we’re full on Scrum (well almost, still need to convince them to estimate with story points intead of hours). The project officially kicked off Monday (when I was still off the grid somewhere in B.C.) and just I got back today to do some slight course corrections with the team (rebuilding the solution tree, focusing more on the domain and tests rather than the UI and back-end infrastructure, etc.). I’ll probably be blogging more on the project and how things are going and some lessons learned from the Scrum side of things (in between what SharePoint I can wiggle in between my daily stand-ups).

    The other cool thing is that this is the first project I’m using Conchango’s Scrum for Team System plug-in in a non-pet project manner. I’ve managed a bunch of little projects since the plug-in came out, and even took some Enterprise projects that were “Scrum-like” (read: doing items iteratively, but not really so it never worked out) and built a “what-if” scenario with it in VSTS, but now I’m giving the tool a real run for it’s money (free!) and seeing where it can go. So far things are coming along, although there are a couple of glitches like the product backlog isn’t filling up on the dashboard (the report works though). I think it’s due to the fact that I didn’t assign relative weights to the items or something, but not sure. The burn-down is coming along (even if it’s only the 2nd day) as the team is really digging entering the work remaining rather than how many hours they scrutinized over what they did. While the burn-down is currently looking like a burn-up (the projected end date is a few months off our original iteration due to some flux in the estimates) I’m confident it’ll come down and start leveling out to what it should be.

    If you haven’t checked out the plugin and want to do some real Scrum planning and tracking with VSTS, please check it out. I was strugging with the start of this project, screwing around with spreadsheets that I’ve used in the past and decided to try out the plug-in to fully manage the project. The PM is digging it as he can easily see where things are at and has no worries about what’s being done (and what’s to be done) and I find it works better than MSF for Agile and is simpler to use (although I’m still hunting around for a webcast where a Microsquishy explained MSF for Agile in Scrum terms which may change my opinion). The plugin is free and you can just add it to your VSTS setup quickly if you want to try it out. You download it here from Conchango’s site (which also has a lot of great documentation and resources on Scrum in general as it applies to the tool) and check it out.

  • Falling behind the RSS ball

    Note to self: Don’t spend more than a few days away from a computer hooked up to the internet. It’s bad for your catch-up health when you get back.

    I’m still slugging through 800+ emails, and then there’s a few days worth of RSS feeds that total about 3000+ posts I still need to read through.

    It’s going to be a loooong day!

  • Swamped in Redmond this week

    Just a note that I’m swamped in Redmond this week. We’re doing some work with Microsquishy, and frankly I’m finding that I’m getting back to the hotel at 10 to be back on campus by 8. Somewhere in between there I’m trying to catchup on about 200 emails I have, plus trying to get some code and whatnot written in the interim. Not a lot of time for this, so if any mails/questions fall by the wayside that you send me please understand I won’t be too responsive this week (or next week for that matter as I’ll be close to being off the grid as I’ve ever been). Thanks.

  • 3-tier Architecture wtih ASP.NET 2.0

    If you haven’t built a full-blown, multi-layer, 3–tier web application with ASP.NET yet then here’s your chance. In case you missed it back in June, Scott Mitchell has a 10 part series on doing such a thing. While I don’t agree with some of the approaches (I’m not a fan of strongly typed DataSets) he uses the series is well written, has a lot of great techniques on building a website with ASP.NET 2.0, and is a good read for those wanting to get into it.

    Here’s the links the entire series:

    There’s also a more detailed page here that has both the C# and VB.NET downloads available along with PDF versions of the articles. It’s a wonderful series and really goes deep into everything you need to know about building an Enterprise-scale web site.


  • The sad state of Groove add-ons

    Where have all the add-ons gone? Groove is an interesting tool. It came out of nowhere, powered by Ray Ozzie, and looked like Notes done right. And it was. The architecture was great, using it in small organizations was cool, and it was perfect for the road warrior sales guy to keep in touch with the mothership.

    However it seems (to me anyways) that it’s a decaying piece of wood that nobody seems to care about. Version 3.1 is pretty good and it’s been added to the Office 2007 lineup, so MS must think this thing is going places (or the fact that Ray is going to be #1 at Microsoft). Today we was cleaning up a Groove workspace we use for little things (todo lists, wish lists of things we want to buy, places we want to go, family pics, etc.) and wanted more. I hadn’t checked for a long time (probably 6 months or so) and figured there must be new add-ons that would be neat to get.

    What a sad state of affairs. First, the tools page hasn’t really changed much in the last year. Second, there’s only a couple of vendors offering very little. What’s worse, a few of them have websites that don’t even work. Information Patterns for example only has 3 products on the go and when you look at their Toucan Collaborate tool (a productivity suite) the link to their dedicated site takes you to a parked domain. There was an interesting tool which was an implementation of Reversi, but when you go to NetsenderCorp’s site and try to download or order it (or any of their products), you get a 404 error.

    This certainly isn’t anything like say the DotNetNuke community where Snowcovered keeps pumping out modules every week. Modules that work and that you can download or buy. While many people argue Groove is stepping on SharePoints toes with it’s offline capability (people always call Groove the “offline” SharePoint), it’s still a pretty neat platform. It’s highly extensible, you can build .NET apps to plug into it, and it seems to have a lot of potential. Now it seems to be the red-headed step-child of Office and thrown in for good measure (maybe to try to revitalise the Groove community).

    All in all, either I’m looking at the old world and there’s some hidden corner on the web where Groove is thriving and producing all kinds of new content, or Ray and the Groove guys figure they’ve maxed out their investment and the community that never was just isn’t.

  • Busy as an MSBee

    Very busy this week. Next week I’m at Microsquishy as we go into the dark corners of the MS underworld and do crazy development-type stuff all week long in the halls of Building 40. Not sure if I’m allowed to say what we’re doing so that’s as close as it gets for now.

    As I’m winding this week up, I have a small team (3 devs, 1 architect, 1 BA, 1 business user, 1 QA) I’m mentoring and providing Architectural and development guidance to (and being their Scrummaster) for a new project with a client. It’s all very exciting as we’re going to be using the Smart Client Software Factory, ClickOnce deployment, continuous integration, TDD, etc. The whole nine yards with a team of devs who haven’t written a .NET application before (or had very little exposure to it). Sounds like a horror story, but I’ve done it before with newbie teams and it’s all good. So that’s got me running around like an MVP with my head cut off, getting them setup with tool and hooking them up with labs and such.

    Finally the week after next (August 21–25) I’m off in the backwoods of BC on some family reunion thing (my first). Yeah, sounds like fun huh? A little bit of my sanity came back as I found out they have Wi-Fi at the camp which was going to save me many trips to the local ‘bucks for my internet fix. Yeah, off the grid is not in my vocabulary.

  • What is the Rock smoking?

    In my always present ego-searching that I do, I come across odd instances of people referring to me or my blog. Case in point, I stumbled across this link on a site that (I guess) features interesting links he finds on the blog-o-sphere. His entry for this blog:

    "nice blog about sharepoint .net and sometime OS X integration"

    Hmmm. I don't remember blogging about OS X integration, ever. Is he talking about something else (like maybe MOSS?). I dunno.

    The only mention of Macintosh or OS X I've made was back during PDC here and I just causually mentioned (in the last paragraph) that my new Mac Mini kicked the llamas hiney. Other than that post (and now this one) that's the only mention of Mac anywhere here (not that I'm a Mac-homophobe or anything as I do own one).

    I sometimes wonder what drives people to say things these days?

  • SharePoint Forums language translations

    Just in case you see a weird error in the new SharePoint Forum Web Part with regards to translations, several strings were added to the *.LNG files to finish off the translations. Please check the default language file that comes with the install on the missing ones (I’ll try posting a more detailed blog later with a list of them in it) and update your own language file accordingly. Also if you can flip the updated language file back to me I’ll update the language pack file release and make it available to everyone. Thanks.

  • SharePoint Forums 1.2 Released to the wild

    Okay, here it is kids, the August (1.2) release of the SharePoint Forums Web Part. This release includes the following features/fixes:



    • Navigation menu to quickly jump to anywhere on the system
    • Ability to place forums and categories in whatever display order you want
    • Topic title/full body message search with links to topics/forums
    • Ability to configure date format displays


    • Support for ASP.NET 2.0 installations on WSSv2 and SP2
    • Order of forums is fixed to allow “bumping” of topics
    • Post count display fixed on home page
    • Last post date/time display fixed


    • Topics now require a subject before being created
    • When replying to a specific message (not the entire thread) you can now preview the message you’re replying to

    Sounds like fun? Go grab it here. Just install the MSI over the old version. Your data files will not be affected. If you are upgrading from 1.1 then please follow these instructions (included in the DrinkMe.txt file) to perform the upgrade:

    If you are upgrading from version 1.1 to 1.2 please do the following:

    • Install the 1.2 MSI
    • Add the following to web.config anywhere inside the <configuration> section:
      <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <assemblyIdentity name="BilSimser.SharePoint.WebParts.Forums" publicKeyToken="e516dadc23877c32" />
      <bindingRedirect oldVersion="" newVersion="" />
    • Perform and IISRESET
    • Refresh the page where your Forums Web Part lives
    • Voila! Version 1.2.

    Note: If you’re still running 1.0 you can do the same, just change to

    Please let me know via email if you have any questions/problems.

  • SharePoint Menus in C#

    There are a lot of great articles out there that talk about how you can leverage the SharePoint style of drop-down menus (you know that cool looking javascript menu) and creating your own. All of them require you to write some HTML and/or JavaScript and embed this into a CEWP on a page. This is fine, but when you’re building your own Web Parts, you might want something a little simpler.

    In working on the SharePoint Forums Web Part, I wanted to create a drop-down menu populated by some of the links in the system and the categories and forums so someone could easily jump to a forum immediately. Most forums use a standard web drop-down list but since I had the SharePoint menu javascript already at my disposal I thought I would use it. So I put together this little class that creates me a menu, lets me add items to it, then just spits out the HTML that I can render to my page. Here’s the full class:

        1 /*

        2  * SharePointMenus.cs

        3  * Dynamic SharePoint-style menus in C#

        4  *

        5  * Copyright (c) 2006 by Bil Simser,

        6  *

        7  * This work is licensed under the Creative Commons

        8  * Attribution-NonCommercial-ShareAlike 2.5 License.

        9  *

       10  * To view a copy of this license, visit

       11  *

       12  * or send a letter to Creative Commons, 559 Nathan

       13  * Abbott Way, Stanford, California 94305, USA.

       14 */


       16 using System;

       17 using System.Text;

       18 using System.Xml;


       20 namespace BilSimser.SharePoint.WebParts.Forums.Utility

       21 {

       22     /// <summary>

       23     /// Small helper class that will build out a menu in

       24     /// the SharePoint drop down style for adding to HTML output.

       25     /// </summary>

       26     public class SharePointMenu

       27     {

       28         #region Fields


       30         private string _header;

       31         private XmlElement _currentNode;

       32         private XmlElement _rootNode;

       33         private XmlDocument _xmlDocument;


       35         #endregion


       37         #region Constructors


       39         public SharePointMenu(string title)

       40         {

       41             createHeader(title);

       42             createXmlDocument();

       43         }


       45         #endregion


       47         #region Properties


       49         private string Header

       50         {

       51             set { _header = value; }

       52             get { return _header; }

       53         }


       55         #endregion


       57         #region Public Methods


       59         public void AddMenuItem(string title, string url)

       60         {

       61             AddMenuItem(title, url, string.Empty);

       62         }


       64         public void AddMenuItem(string title, string url, string imageUrl)

       65         {

       66             XmlElement childNode = _xmlDocument.CreateElement("ie:menuitem", "");

       67             childNode.SetAttribute("id", "MSO_MyMenu_Link1");

       68             childNode.SetAttribute("title", title);

       69             if(imageUrl != string.Empty)

       70                 childNode.SetAttribute("iconSrc", imageUrl);

       71             childNode.SetAttribute("onMenuClick", string.Format("javascript:window.location.href='{0}';", url));

       72             childNode.InnerText = title;

       73             _currentNode.AppendChild(childNode);

       74         }


       76         public void AddSeparator()

       77         {

       78             XmlElement childNode = _xmlDocument.CreateElement("ie:menuitem", "");

       79             childNode.SetAttribute("type", "separator");

       80             _currentNode.AppendChild(childNode);

       81         }


       83         public void AddSubMenu(string title)

       84         {

       85             AddSubMenu(title, string.Empty);

       86         }


       88         public void AddSubMenu(string title, string imageUrl)

       89         {

       90             XmlElement childNode = _xmlDocument.CreateElement("ie:menuitem", "");

       91             childNode.SetAttribute("type", "submenu");

       92             if(imageUrl != string.Empty)

       93                 childNode.SetAttribute("iconSrc", imageUrl);

       94             _currentNode.AppendChild(childNode);

       95             _currentNode = childNode;

       96             AddLabel(title);

       97         }


       99         public void CloseSubMenu()

      100         {

      101             _currentNode = _rootNode;

      102         }


      104         public void AddLabel(string title)

      105         {

      106             XmlElement childNode = _xmlDocument.CreateElement("ie:menuitem", "");

      107             childNode.SetAttribute("type", "label");

      108             childNode.InnerText = title;

      109             _currentNode.AppendChild(childNode);

      110         }


      112         public override string ToString()

      113         {

      114             StringBuilder sb = new StringBuilder();

      115             sb.Append(Header);

      116             sb.Append(_xmlDocument.InnerXml);

      117             return sb.ToString();

      118         }


      120         #endregion


      122         #region Private Methods


      124         private void createXmlDocument()

      125         {

      126             _xmlDocument = new XmlDocument();

      127             _rootNode = _xmlDocument.CreateElement("menu", "");

      128             _rootNode.SetAttribute("id", "MSO_MyMenu");

      129             _rootNode.SetAttribute("class", "ms-SrvMenuUI");

      130             _xmlDocument.AppendChild(_rootNode);

      131             _currentNode = _rootNode;

      132         }


      134         private void createHeader(string title)

      135         {

      136             Header = string.Format("<div class=\"ms-HoverCellInActive\" "+

      137                 "onmouseover=\"this.className='ms-HoverCellActive'\""+

      138                 "onmouseout=\"this.className='ms-HoverCellInActive'\">"+

      139                 "<a id=\"MSO_MyMenuLink\" title=\"{0}\" style=\'CURSOR: hand\''+

      140                 "onclick=\"MSOWebPartPage_OpenMenu(MSO_MyMenu, this);\""+

      141                 "tabindex=\"0\">{0}<img alt=\"{0}\" src=\"/_layouts/images/menudark.gif\""+

      142                 "align=\"absBottom\"></a></div>", title);

      143         }

      144         #endregion

      145     }

      146 }

    It’s not beautiful and there are a lot of improvements you can make. For example, some of the names are hard coded and should be generated dynamically and keeping track of the submenu levels should be something managed outside of the class. However it works and is easy to use.

    To use it, just drop this class into your project and you can create a menu with a few lines of code like this:

        7 public class TestMenu

        8 {

        9     public void CreateHtmlMenu()

       10     {

       11         SharePointMenu menu = new SharePointMenu("My Menu");

       12         menu.AddMenuItem("First Item", "");

       13         menu.AddMenuItem("Second Item", "");

       14         menu.AddSeparator();

       15         menu.AddMenuItem("Last Item", "");

       16     }

       17 }

    That will get you a simple menu with a few items. Then in your RenderWebPart, or wherever you’re writing out the Web Part contents just write it out:

       19 public override void RenderWebPart(HtmlTextWriter writer)

       20 {

       21     SharePointMenu menu = new SharePointMenu("My Menu");

       22     menu.AddMenuItem("First Item", "");

       23     menu.AddMenuItem("Second Item", "");

       24     menu.AddSeparator();

       25     menu.AddMenuItem("Last Item", "");

       26     writer.WriteLine(menu.ToString());

       27 }

    You can also create multiple level menus and submenus. Just call the AddSubMenu method(s) in the class (with or without an image). When you call AddSubMenu, any future calls to AddMenuItem will just add it to that submenu. When you want to back out of the menu, just call the CloseSubMenu method. Like I said, it’s not pretty as it really only supports 1 level of menus and will always back out to the root. However it can be modified and updated with a little work to support unlimited submenus, dynamic generation of IDs, etc. Use your imagination.

    Here’s the menu for the SharePoint Forums Web Part which sparked creating this class. The categories and forums are dynamically generated based on what the user can see, etc. and the menu is built up based on options in the system and what the user can do. Looks pretty slick and only took a few lines of code:


    So have fun with it and feel free to modify it. If you do extend/enhance it let me know and I’ll update the resource. You can grab the class file here for use in your program. It’s released under the Creative Commons License.

  • SharePoint Forums 1.2 Sneak-a-peek

    The work is almost done on version 1.2 of the SharePoint Forums Web Part. The release will go out later tonight after I chow down some food and build the package. A full list of changes will accompany the post when the release goes out but here’s some screenies of what’s coming down the pipe.

    Replies with previews:


    Full text search on titles and messages:


    Sortable Forums and Categories:


    See ya in a few hours!

  • Custom date formatting with SharePoint Forums

    I’m just getting ready to release version 1.2 of the SharePoint Forums Web Part. One feature was the ability to control the date and time display for users. This has been added and documented on the CodePlex wiki here.

    The SharePoint Forums Web Part (version 1.2 and higher) provides the ability to set the default date/time format when displaying dates in the system. This is used on the last post of a topic, individual messages, and user profiles. Basically anywhere a date/time stamp is displayed you have control over the format.

    The format is based on how your server is set so "d" on a US setting is Month/Day/Year whereas on a Canadian setting it's Day/Month/Year. The following values will produce the output shown for August 7, 2006 at 11:30:00 AM:

    d - 8/7/2006
    D - Monday, August 07, 2006
    f - Monday, August 07, 2006 11:30 AM
    F - Monday, August 07, 2006 11:30:00 AM
    g - 8/7/2006 11:30 AM
    G - 8/7/2006 11:30:00 AM
    m,M - August 07
    r,R - Mon, 07 Aug 2006 11:30:00 GMT
    s - 2006-08-07T11:30:00
    t - 11:30 AM
    T - 11:30:00 AM
    u - 2006-08-07 11:30:00Z
    U - Monday, August 07, 2006 5:30:00 PM
    y - August, 2006

    You can also create a custom pattern using the following formatters. This means that if you don't like any of the formats above, you can just create your own and really personalize the forums.

    d - The day of the month. Single-digit days will not have a leading zero.
    dd - The day of the month. Single-digit days will have a leading zero.
    ddd - The abbreviated name of the day of the week, as defined in AbbreviatedDayNames.
    dddd - The full name of the day of the week, as defined in DayNames.
    M - The numeric month. Single-digit months will not have a leading zero.
    MM - The numeric month. Single-digit months will have a leading zero.
    MMM - The abbreviated name of the month, as defined in AbbreviatedMonthNames.
    MMMM - The full name of the month, as defined in MonthNames.
    y - The year without the century. If the year without the century is less than 10, the year is displayed with no leading zero.
    yy - The year without the century. If the year without the century is less than 10, the year is displayed with a leading zero.
    yyyy - The year in four digits, including the century.
    gg - The period or era. This pattern is ignored if the date to be formatted does not have an associated period or era string.
    h - The hour in a 12-hour clock. Single-digit hours will not have a leading zero.
    hh - The hour in a 12-hour clock. Single-digit hours will have a leading zero.
    H - The hour in a 24-hour clock. Single-digit hours will not have a leading zero.
    HH - The hour in a 24-hour clock. Single-digit hours will have a leading zero.
    m - The minute. Single-digit minutes will not have a leading zero.
    mm - The minute. Single-digit minutes will have a leading zero.
    s - The second. Single-digit seconds will not have a leading zero.
    ss - The second. Single-digit seconds will have a leading zero.
    f - The fraction of a second in single-digit precision. The remaining digits are truncated.
    ff - The fraction of a second in double-digit precision. The remaining digits are truncated.
    fff - The fraction of a second in three-digit precision. The remaining digits are truncated.
    ffff - The fraction of a second in four-digit precision. The remaining digits are truncated.
    fffff - The fraction of a second in five-digit precision. The remaining digits are truncated.
    ffffff - The fraction of a second in six-digit precision. The remaining digits are truncated.
    fffffff - The fraction of a second in seven-digit precision. The remaining digits are truncated.
    t - The first character in the AM/PM designator defined in AMDesignator or PMDesignator, if any.
    tt - The AM/PM designator defined in AMDesignator or PMDesignator, if any.
    z - The time zone offset ("+" or "-" followed by the hour only). Single-digit hours will not have a leading zero. For example, Pacific Standard Time is "-8".
    zz - The time zone offset ("+" or "-" followed by the hour only). Single-digit hours will have a leading zero. For example, Pacific Standard Time is "-08".
    zzz - The full time zone offset ("+" or "-" followed by the hour and minutes). Single-digit hours and minutes will have leading zeros. For example, Pacific Standard Time is "-08:00".
    : - The default time separator defined in TimeSeparator.
    / - The default date separator defined in DateSeparator.
    % c  - Where c is a format pattern if used alone. The "%" character can be omitted if the format pattern is combined with literal characters or other format patterns.
    \ c  - Where c is any character. Displays the character literally. To display the backslash character, use "\\".

    Note: these are all standard .NET formaters for DateTimeInfo, but documented here for users of the Web Part who are not .NET developers.

  • Comment spam on the rampage

    Holy mother of Isis. What’s with the comment spam on weblogs these days? I’m getting close to 100 comments a day that are all spam. Luckily I have anonymous comments turned off and the spam filter on Community Server is recognizing these as spam and not publishing them. Still, is anyone else getting this much comment spam? It’s been quiet for sometime now but the last week or two things have just gone nuts. Talk about the coming apocalypse, Nostradamus sure didn’t see this one coming.

  • Internet Exploder 7 - An absolute train wreck

    There have been a lot of great train wrecks throughout movie history that stick in mind. The Fugitive, Back to the Future III, and Under Siege 2 to name a few. Tonight I went through the painful process of creating my own train wreck, namely Internet Explorer 7 Beta 3.

    I’ll admit that I don’t have the average desktop. I’m running both versions of the .NET framework, I have both the 2003 and 2005 flavours of Visual Studio, there’s the GAT and the GAX, a dozen or so SDKs and toolkits, Virtual Server and Virtual PC, Subversion, Groove, Windows Live Messenger, OneNote, PC-Cillin, and an army of small little tools, some that sit in my tray and are always running (like PureText). However I at least expect IE to at least work. A little?.

    First off I run http://localhost as my home page. It’s just a static HTML web page with links to local projects so I don’t forget. Yeah, did you read that? Static HTML. No fancy scripts, no complicated ActiveX controls. Just a bleepin’ web page. And IE 7 says this to me:


    WTF? You compiled my HTML page and got an error. How nice. I guess nobody told you that HTML pages don’t get compiled. I checked the source of the page again, just in case I did something silly like oh, I don’t know, added some code. Nope. A HTML compliant page with barely any text on it and no graphics (Jakob Nielsen would be proud of me). I could get past this but each and every time I tried to edit the options to allow “intranet” access (like that’s a bad thing?) it hung. Complete and utter hang. So much so that nothing would work or allow me to click on anything. I shut down the process and tried it again. Same thing.

    No POS browser is going to get the better of me so I thought I would be smart. Rather than clicking in the error message area that pops up (or whatever that band of death is called) I thought I would be sneaky and go through the menu to invoke the option from there. Of course IE figured out what was going on and promptly hung again. And again. And again.

    I did manage to grab the Google toolbar and navigate to the Google home page. Of course that’s about all I could do and even though the browser part of the app was refreshing, the rest of the screen (i.e. all of the controls) were stuck in UI limbo. Here’s a shot of all the other windows in my system overlapping and making browsing rather difficult, as I frantically clicked to get back some semblance of a browser:


    No, that’s just not right. What really peeved me off was that it would hang no matter what option I tried (including responding to dialogs that it created for me). I even tried to un-install any extra toolbars I had (Developer toolbar and Google) but it still wasn’t a happy camper, and neither was I. In fact, just launching it and IE decided to max out my CPU for the rest of it’s pathetic existence:



    Okay, that was it. This waste of bytes had to go and go fast. I hunted it down in the Add/Remove Programs dialog (how nice of MS to put it somewhere easy to find) and immediately nuked it. Of course even on it’s final throes of death it still mocked me:


    No, I did not install anything after IE. I just installed you! WTF? Apparently IE is not only impossible to run on my system but also brain dead because it *thinks* something has happened since it was installed a mere few minutes ago. I guarantee you it isn’t true so wherever it’s getting this information from, it’s wrong. Yes, Atlas is installed on my system but that was done weeks ago. Stupid program.

    Once I finally got IE6 back and it was running I wanted to check on something. An interesting stat was IE vs FireFox running my static HTML page. Here they are side by side with my single static HTML page loaded:


    The first number is the number of threads. IE has 12 running, FF has 8. Whatever, no biggie deal there. Then comes USER objects and GDI objects (I have these available in Process Explorer to track resource leaks in WinForm projects). IE has over triple the number of USER objects FF has and over double GDI objects (even Photoshop doesn’t have this many GDI objects!). Okay, I guess people don’t care but you would think the numbers would be small as the program doesn’t do much. I mean a browser is just a single window, a menu, a few buttons, a toolbar and a status bar. To me, that’s a lot of objects for such a simple UI but then I prefer to be a minimalist when it comes to these things. The last number is the memory footprint so no surprise there, IE gobbles up twice as much memory as FF and it’s not really doing anything yet.

    I’ve bitched about this in the past and this is a new build of my OS so I can’t blame it on that. Lots of people run it successfully so the cheese stands alone here. I can only bring it down to brass tacks: my machine doesn’t like IE 7. Plain and simple. Of course the problem is that now, someday, I’m going to have to run this puppy as my default browser. Yes, by then it’ll be released and not a beta but this is B3 for petes sake. Shouldn’t it work in the majority of scenarios by now? Is my machine that odd and different. Is there some terrible tool running that IE just flat out refuses to work?

    The mind boggles.

  • A rolling blog gathers a lot of knowledge

    Most times I see myself as a giant katamari and the internet is all stuff I can just roll over, pick up, and make my brain grow bigger. This blog isn’t one of those things, but the article linked here is.

    Michael Feathers has a great article on what he calls “sensing variables”, variables introduced into a long piece of code that can be used to verify refactorings. In a nutshell (hey, how did I get into this nutshell?) it captures the state of something for recovery later and allows you to introduce refactorings (say rearranging code) with the comfort that things haven’t changed without your intent.

    Very cool as it’s always difficult to find a way to know the state of things when you’re trying to program for a stateless environment. The other thing is that while unit test rock my world, I find it very difficult sometimes to get them to poke and prod into classes to see what’s going on. I only rely on public properties and methods (I don’t believe in the reflection gig trying to test private accessors) and try to stay away from “out” parameters as often as I can (I really don’t like knowing a variable goes in one way and out another without knowing what’s going on in between) so I can only test what’s returned. Often it’s hard to write a test that really gets at the heart of what’s going on, without exposing everything and blowing off basic tenets of OO like encapsulation.

    Anyways, great article and simple technique for this kind of thing. It’s easy to implement and works well so feel free to check it out here.

  • Dead or alive, you're coming with me

    Just a short post today (actually, now that it's finished it's pretty long but there's no much technical content here) as I'm shuffling things around schedule wise and just wanted to let you know where things are. This also talks about some dead projects that are being resurrected and others that are being reborn. Yeah, I'm all about software reincarnation.

    First up is scheduling for the SharePoint Forums Web Part. Releases are going to be the first Monday of each month so if the first is a Tuesday, it shuffles ahead to the next week (the 6th of the month). Yeah, I could choose the day before but then it wouldn't give me those extra few days so cut me some slack. The next release of the forums is 1.3 (it was called 2.0 but it hasn't got that mature yet) and will work in WSS ASP.NET 2.0 setups and implement various bug fixes and new features. The 2.0 release will be the one that fully leverages MOSS 2007 as there are some major changes to architecture and the deployment (it will be a solution deployment rather than an MSI, and available as a feature you can turn on or off). That is expected to come along in the September drop.

    The SharePoint Knowledgebase release will be the middle of each month (even with a vast team of coding monkeys, I can only get so much done on the 1st of any given month) and the first release has been pushed out the middle of September. I was going to have a release for August, but there's just too much going on where I'll be incognito (i.e. without 'puter) that I can't spin it. The first release will be pretty close to fully featured as there's only so much a knowledge base can do, however please post your ideas in the forums (there hasn't been much activity there) and let me know what you want to see (or confirm that it's there).

    As for dead or resurrected projects, there are two. First is the highly anticipated (based on emails I get) SharePoint Builder. This is my visual Xml editor for ONET.XML and SCHEMA.XML files. Yes, it's still alive and kicking however while I was waiting for a stable release of MOSS, other things stacked up so it got shuffled to the back burner. It's back and you'll be hearing from it soon. It's now using the Smart Client Software Factory from Microsoft and has a lot of great features (like remote editing of XML files) and will have full support for MOSS 2007 (while maintaining compatibility with 2003 site definitions). Watch for it in the Sept-Oct timeframe and new screenshots/news in the coming weeks.

    The final project is one that hurts me, but makes sense. A couple of months ago I launched my SharePointForge site. Basically a project hosting site for SharePoint projects. The problem was that I had my fingers in too many cookie jars so I couldn't dedicate the time I wanted to the site. CodePlex came and is providing a good place for hosting projects (strangely enough SharePointForge basically looked like CodePlex but on steroids, even before I had seen CodePlex) and really I wasn't able to get into the business of hosting peoples source code. So SharePointForge is dead (sort of) and is being reborn. Like the Phoenix, it's transmogrifying into a new site. It's much like the old SharePointForge concept, but won't offer hosting. I can't announce what this is about, but you'll be hearing and seeing the site in the next couple of weeks.

    Most of the shuffle is due to a vacation I'm taking (gasp, horror of horrors). As a consultant, it's actually hard to take a vacation because a) you don't get paid for it and b) you're always thinking about the next project you're working on and trying to squeeze that into some insane schedule (at least I am).

    Anyways, Bil is a busy boy but life is good so enjoy it.

  • It's all about balance in the universe

    Seems a lot of people are scratching their heads at Micrsoft’s move to charge $1.50 per download on the Office Beta. They’re wondering (besides money I guess) what the rationale behind this move is. It’s really quite simple.

    In the universe there must be balance. With the charge for the Office download, Microsoft is offsetting the cost of making the MSDN Library downloads now free. With darkness there is light. With Office there is MSDN.

    Pretty clear to me ;)

  • Composite UI Application Block - Soup to Nuts - Getting Started

    I’m currently helping some teams move towards creating Smart Client applications. As part of that move, I’m also introducing them to use the Composite UI Application Block (CAB) which will ease the pain of building the UI, separating it, and generally making it a better life than just writing plain old boring Windows Form apps.

    So this begins a series of blogs on writing applications using CAB. The series starts super simple, with a bare minimal example and compares the differences between a regular WinForm app and one written using the CAB. In this series, we’ll just keep building on each example to another and finish off with an n-tier, service-oriented solution that employs the CAB and does some pretty cool stuff. I won’t reveal what the app is but you can figure it out as we go along.

    The next series to follow-up this series will go beyond just the CAB and describe the Smart Client Software Factory (SCSF) which not only uses CAB but adds a million other things. Think of CAB as Windows Forms on steroids and the Smart Client Software Factory as CAB on steroids. It’s going to be a blast.

    By now, you’re probably wondering why a little ol’ SharePoint MVP like me is blubbering on about writing Smart Clients but hang in there, they’ll be more than your share of SharePoint stuff by the time we’re finished.

    Rules of Engagement

    Just a couple of notes on this blog series. All the examples are written in C#. If you’re looking for VB.NET samples you won’t get them here as I just prefer C# (feel free to build your sample in VB.NET if that’s your cup’o’tea). Also these samples are built with Visual Studio 2005 just because a) the CAB is .NET 2.0 based and b) the SCSF is Visual Studio 2005 based. I think there might be a version of CAB for 1.1 (not sure) but Smart Client development and Click Once was never great with .NET 1.1 and it’s 2006 so get off yer 1.1 butts and move on up to the new neighbourhood.

    Getting Started

    Okay, let’s get this party started. We have to walk before we run so this blog entry is just going to create the minimal app. We’ll highlight the differences between what you get with an auto-generated WinForm app vs. what you need to do to create the minimal CAB app. It doesn’t do anything at this point (not even “Hello World” on the screen) but every journey starts with the first step.

    To get going:

    1. Install the CAB using the link above and follow the instructions for installation
    2. Create a new Windows Application using the Create Project option in Visual Studio. Just the typical application (call it WindowsApplication1) with a single Windows Form.
    3. Add a reference to the following assemblies: Microsoft.Practices.Composite.UI; Microsoft.Practices.Composite.UI.WinForm; Microsoft.Practices.ObjectBuilder.

    Next we’re going to create a WorkItem. A WorkItem is A WorkItem is a run-time container for components that are working together to fulfill a use case. These components may consist of SmartParts (no, not those SmartParts), controllers, services, UIElements, and other components. You can use a WorkItem to encapsulate different use cases or areas of an application to share events and state. However, if you overuse WorkItems and make them too fine grained, or if you build your WorkItem classes inconsistently, you may end up with an application that is difficult to maintain. You need at least one WorkItem in your application so let’s create one:

    1. Create a new class called Form1WorkItem
    2. Add Microsoft.Practices.CompositeUI to the using statements at the top of the file
    3. Change the Form1WorkIem class to inherit from the WorkItem class

    Your Form1WorkIem class should look like this now:

        1 using System;

        2 using System.Collections.Generic;

        3 using System.Text;

        4 using Microsoft.Practices.CompositeUI;


        6 namespace WindowsApplication1

        7 {

        8     public class Form1WorkItem : WorkItem

        9     {

       10     }

       11 }

    What we’ll do to CAB-enable the application is one more change. This is to the Program.cs file that is the main entry point for the application. Here’s the default one from Visual Studio:

        1 using System;

        2 using System.Collections.Generic;

        3 using System.Windows.Forms;


        5 namespace WindowsApplication1

        6 {

        7     static class Program

        8     {

        9         /// <summary>

       10         /// The main entry point for the application.

       11         /// </summary>

       12         [STAThread]

       13         static void Main()

       14         {

       15             Application.EnableVisualStyles();

       16             Application.SetCompatibleTextRenderingDefault(false);

       17             Application.Run(new Form1());

       18         }

       19     }

       20 }

    Nothing special here but we’re going to transform this by doing the following:

    1. Add Microsoft.Practices.CompositeUI.WinForms to the using statements of the file
    2. Change the Program class from static to public
    3. Inherit from the FormShellApplication class in CAB
    4. Modify the Main method to support CAB

    Here’s the modified version of the Program class that supports the CAB (also note the change from static to public):

        1 using System;

        2 using System.Collections.Generic;

        3 using System.Windows.Forms;

        4 using Microsoft.Practices.CompositeUI.WinForms;


        6 namespace WindowsApplication1

        7 {

        8     public class Program : FormShellApplication<Form1WorkItem, Form1>

        9     {

       10         /// <summary>

       11         /// The main entry point for the application.

       12         /// </summary>

       13         [STAThread]

       14         static void Main()

       15         {

       16             new Program().Run();

       17         }

       18     }

       19 }

    The only difference here is that we derive our application from FormShellApplication (a generic class in the CAB), passing the WorkItem class and the Form class we created. Also the startup in Main has changed to call the Program classes run (defined in the FormShellApplication class) rather than the standard Application.Run(). As we’re setting the value of the form in the FormShellApplication via generics so there’s no need for us to pass the Form class to the Application class like we did in regular .NET. There’s a nice blog entry here by Brad Wilson on describing the FormShellApplication class (and other classes in the CAB) which you might want to take a peek at.

    That’s it. Build the solution (hopefully you shouldn’t have any errors) and run the app with F5 (or Ctrl+F5).

    Amazing huh? This looks and behaves no different than a regular WinForm app but it’s now CAB enabled and almost ready to go. As I said, this is a super simple example and doesn’t even display “Hello World” or anything. With the tires kicked, we’re ready to start adding form and functionality the CAB way!

    So what did we get out of this post? Hopefully you can see the (minor) differences between a regular Windows application and a CAB-enabled one (pretty simple huh?) and your project is now ready to start using features of the Composite UI Application Block. We’ll start exploring what you can do in the next entry in this series.

  • SharePoint Knowledgebase Project on CodePlex

    As I mentioned last week, I have a new project in the works. The SharePoint Knowledgebase Web Part that should fill the gap for those looking to build this kind of beast on SharePoint. It has a new home on CodePlex, right next to the SharePoint Forums Web Part.

    Will fill in the details this week on it on the sites Wiki including screenshots and other good info. Forums are open for discussion now, suggestions, etc. and the issue tracker will fill up with the initial production release which will be September 15th. A beta release will be available August 15th which will weed out any bugs before production.

    As with the SharePoint Forums, I'll be managing the project using Scrum, the Issue Tracker as my backlog, and the release system on CodePlex. I've staggered the releases of this web part to fall in the middle of the month so now you'll get two updates a month from me. One for the Forums, and the other for the Knowledgebase.


  • Doing Scrum with CodePlex

    I thought I would share a little insight into my brain on planning releases for my SharePoint Forums Web Part using the Scrum development process and what CodePlex has to offer to support this approach.

    As you know, CodePlex is a community site that hosts the forums project and there are a few nice tools they’ve baked into the system that help me plan my work a little better. Even though I’m a one-man team (although I’m just ramping up to expand this) I still follow Scrum to plan out the releases and manage the work. Here’s how it breaks down.

    The entire Issue Tracker is my Product Backlog. I export all unassigned items to a CSV file via CodePlex online. Then I apply a filter to be able to sort and view the data. Each Sprint is 1 month, delivering on (or about) the 1st of the month. Before I export the work items, I add the next sprint release date and version so it’s available in the filtered data (I have to assign something so it shows up in the filtered data list but I just move this item back to unassigned when I load up the spreadsheet to work.

    Two more things I do is assign new columns to the spreadsheet after the export. First is my story points column. Rather than working on hours for estimating, I use points. Each item gets either 1, 2, 3, 5, or 8 points assigned to it. Nothing is larger than 8 points (meaning it’s going to be a lot of work). More on the point system later. Second is a priority column. CodePlex provides High, Medium, Low for priority but for Scrum you have to use numbers. There can be only 1 number one priority (even if multiple people are working on the system). After all, if everything is High how do you know what one you do first?

    Then I’ll do a couple of sorts and filters. First I sort out the features from the issues (bugs) from the tasks. Tasks are just things that have to get done, and depending on whether or not they have enough priority they’ll get included in the next release. It’s give and take whether I include a feature or a bug or a task in the next release, although I’ll try to include bug fixes before features and features before tasks (at least I try to plan it that way). Once I’ve gone back and forth with each item, I’ll give it a priority. The decision on what goes before what is driven by the community (that’s you) and my own judgement of what’s important. Bugs that are really stopping people from using the system easily get higher priority than new features that nobody wants. On the flipside, features that people really really want will take priority over low priority bugs that people rarely stumble over or care about. They’ll all get done, but as I only have a finite time, I try to position things higher up the priority scale to get the best bang for my buck.

    So now I’ve got a modified backlog with a list of items sorted by priority and a column showing how many story points it will take for each item. There are tasks that will be added later, but for now each story has it’s own weight based on things like how complex it is, if there’s already existing infrastructure in SharePoint to leverage, is this something I’ve done before, can I find an example on the web as to how to do this. Stuff like that. Now it’s time to figure out how many things I can fit into the iteration. I’ve time boxed the iteration at 1 month however contrary to popular belief, I don’t work full-time on this so it’s really more like a couple of hours every few nights. At my current velocity I can finish off 15 points per iteration. How did I arrive at this number? Based on the two releases I have, that’s how many points I finished previously. So for me, 15 points is a months worth of work doing a few hours here and there.

    Now its time to go through the list and see what fits. If I can cleanly find 15 points from say the first 4–6 items, I just call it a day and that’s the release. If I can’t, then I need to shift some priorities around. Sometimes a #5 item gets shifted down to #7 because it’s too big to fit into the rest of the available points and item #6 will. It’s just numbers and works out well. Once this is done, I assign the items to that release number on the CodePlex site and export those items to a new worksheet which becomes my Sprint Backlog for the next release (I only priortize and estimate one release ahead).

    They’ll be adjustments. With each release I look over how many points I completed and see if my velocity is improving (or not). This has an effect of auto-correcting my estimates. If I keep going at my current estimate of 15 points per iteration, I’m fine but if I find that I only deliver 10 by the time the end of the month comes I know that I under-estimated on 5 points. I’ll take a look at where that way (perhaps it was a feature I thought I knew what was required to make happen, but got bogged down by details). Cosequently, as I might bring on more people the number of points we achieve could go up but it doesn’t change how simple or complex something is. In any case, I’ll correct the project velocity as things change and hopefully estimating will get a little better on the next release.

    Yeah, it’s a lot of work for a one-man project that comes out every month and there’s the danger of me running too many projects at this speed. However it gives me a good feeling that I know what the month of work is going to look like, I can pretty confidently estimate how many features are going to be delivered with the next release, and I can talk to people during the month about what’s coming which should hopefully help me plan the next release after that.

    It’s not pure Scrum either as in 1 Sprint = 1 Release = 1 Month, but it works for me.

  • The Full SharePoint Monty

    A good friend of mine, fellow co-worker, and all around nice guy is now blogging about SharePoint. Monty Grusendorf got setup on SharePoint Blogs a few days ago, but I was waiting for him to post something more than “Hello World” to unleash him to the cold unforgiving handful of people that stumble on this site looking for Hunter S. Thompsons’ musings. So now he’s blogged about a nice SharePoint nugget. The other day he said hey, did you know about this? While I am the wise old SharePoint guru (or the crazy old unabomber, not sure which) this information was new to me. Very cool (although it would have been much cooler with screenshots Monty, hint, hint). I won’t give away the gold so you’ll have to check out his blog to see what it’s all about. Here’s to seeing more SharePoint blogging goodness from Monty.

  • What's in a name?

    I’m really digging the series of blog posts over at Coding in an Igloo (an Edmontonian) that cover Code Naming Conventions. Normally blog entries are either just talking about one thing (say the naming of classes) while others try to cram everything into on post and really don’t cover it. Here he runs the entire gammet, from soup to nuts and everything in between. It’s a very complete reference and not only has his ideas of what is works for him, but why, which is as important as to the what.

    Here’s what he’s posted so far:

    Next up is UI Controls which I think is always a point of discussion. I personally use the txtFirstName convention, although I flip flopped between that and the firstNameTextBox idea for awhile but landed back with the control name flair. I think UI controls is the only place where our big, fat ugly aunt from the Hungarian hills shows it’s face, and it doesn’t seem that bad?


    Anyways, great series so I highly recommend following it. I’m sure at the end of the posts you could simply snag all the entries and use them as-is for your own standards.

  • Model-View-Presenter Pattern with SharePoint Web Parts

    So what’s this MVP thing? Bil’s an MVP so now he’s a pattern? I don’t get it.

    Well, not quite.

    Model-View-Presenter (MVP) is a fairly new(er) term for an old(er) pattern in Software Design. Its similar (but not necessarily the same) as the Model-View-Controller pattern (MVC) that you may have heard of or seen around. MVP is a pattern that will abstract away the display of data from a user interface. This is done for a few benefits, like being able to test a UI without a UI (yeah, let that one cook in your noodle for a minute or two). It also reinforces your domain model so you’re not doing screwy things like writing logic decisions (should I display a row of information if the user has permisions or not) in the user interface. Bad, bad place to do this.

    Quoting Martin Fowler, the MVP pattern “Separates the behavior of a presentation from the view while allowing the view to receive user events.”

    So MVP is a great pattern for doing UI elements, and keeping your domain logic where it belongs (read: in the domain silly), while maintaining a good, clear separation from the UI. In essence, the view subscribes to events and the presenter, well, “presents” them to the UI. The UI then figures out how to update itself and doing crazy user interface stuff like change lists of data or display rows of information.

    Still with me? Imagine that Bert is the View, Ernie is the Presenter, and Mr. Hooper is the Model. Mr. Hooper has some jellybeans for sale at his store. Ernie can go to Mr. Hoopers store and find out how many jellybeans he has for sale today. Ernie will tell Bert this so Bert can update the Sesame Street website. Ernie doesn’t know anything about HTML but does have the information Bert needs to do his thing. Bert isn’t allowed to talk to Mr. Hooper or go anywhere near his store (after that last incident with Mr. Snuffleupagus and the latex) so Ernie heads out to Mr. Hoopers store and counts the number of jellybeans he has for sale. He comes home and tells this to Bert. This is how Bert gets the information he needs to update the website. Got it?

    The thing about MVP is that UI doesn’t really care how (or for that matter where) the data came from. The presenter just gives it to the UI in pieces. The UI is a dumb animal (and should be) and should only know simple things like adding items to a drop down list, or displaying a grid of information. User interfaces are stupid and should never get any smarter than knowing about the UI. Much like any project manager.

    Okay, let’s get into this and walk through an example of creating the MVP pattern with SharePoint Web Parts. There’s an excellent article on The Code Project that describes the MVP pattern in-depth here. I’ve adapted it to use a SharePoint Web Part instead of an ASP.NET page for this article.

    Side note: This is the first of two articles I’m going to do on the MVP pattern. The first is going to be for .NET 1.1 (Visual Studio 2003) and SharePoint v2 (or 2003 if you prefer). The second article will come later and be written in .NET 2.0 (Visual Studio 2005) and SharePoint v3 (or 2007). The two articles show the same pattern, but are implemented differently as I can make use of Generics and other features of the Web Part framework. I just thought I would kick it off with a 2003 demo so anyone writing Web Parts for SharePoint today could make use of it.

    The View

    No, not that crappy TV show with Starr Jones quitting over the number of M&Ms she needs, but rather the “V” in “MVP”. The View is responsible for exposing the data we want to the user interface. You might say that’s what say a class inherited from WebPart does. Well, yes, but since we want to tell the view (indirectly) what to update and we don’t want to know about UI type control things (listboxes, drop down lists, data grids, etc.) we need something called a View. The View gets implemented as an interface and as you know in .NET, you can implement as many interfaces as you want on a class.

    Here’s a simple view that has one property of type DateTime called CurrentTime that any class implementing this interface must create the setter for.

        1 using System;


        3 namespace WebPartMVP

        4 {

        5     public interface ICurrentTimeView

        6     {

        7         DateTime CurrentTime {set;}

        8     }

        9 }

    The Presenter

    The Presenter is the guy behind the curtain that makes the magic happen. The Presenter marries the view and the model together in a harmonious fashion, wiring itself up to events that are triggered from the view. When the view requests a change, it does so through the Presenter and the Presenter (talking to the Model) will respond accordingly. Finally the View updates itself via the UI (whatever that UI may be, a User Control, WinForm, WebForm, or in our case a SharePoint Web Part).

    Our presenter is simple and will do two things. First, it gets created using an object passed into the constructor that conforms to the ICurrentTimeView interface. Next, it provides a public method called InitView that will initialize the view when called. Here’s the code for our Presenter:

        1 using System;


        3 namespace WebPartMVP

        4 {

        5     public class CurrentTimePresenter

        6     {

        7         private ICurrentTimeView _view;


        9         public CurrentTimePresenter(ICurrentTimeView view)

       10         {

       11             _view = view;

       12         }


       14         public void InitView()

       15         {

       16             _view.CurrentTime = DateTime.Now;

       17         }

       18     }

       19 }

    The Model

    This is the class that represents the data we want to present. As you may not need to expose your entire domain object graph to the UI, this might be a subset or slice through that data. Whatever is relevant to the UI and the properties you need to expose. Our Model is going to be simple and we don’t have a class for it. It’s just what gets set during the initialization of the view but you could create your own Model class or have the Presenter talk to a Facade or Service object to get data. In this example, the Service object is the current DateTime instance.

    Bringing it all Together

    Let’s bring this puppy home. So we have a view interface, and we have a presenter that will take an interface of that type during construction. First we need to add the ICurrentTimeView interface to our Web Part and implement the member(s) that it describes. Here’s what that looks like in our Web Part:

        1 using System;

        2 using System.ComponentModel;

        3 using System.Web.UI;

        4 using System.Web.UI.WebControls;

        5 using System.Xml.Serialization;

        6 using Microsoft.SharePoint;

        7 using Microsoft.SharePoint.Utilities;

        8 using Microsoft.SharePoint.WebPartPages;


       10 namespace WebPartMVP

       11 {

       12     [DefaultProperty("Text"),

       13         ToolboxData("<{0}:WebPart1 runat=server></{0}:WebPart1>"),

       14         XmlRoot(Namespace="WebPartMVP")]

       15     public class WebPart1 : Microsoft.SharePoint.WebPartPages.WebPart, ICurrentTimeView

       16     {

       17         private const string defaultText = "";

       18         private string text = defaultText;


       20         [Browsable(true),

       21             Category("Miscellaneous"),

       22             DefaultValue(defaultText),

       23             WebPartStorage(Storage.Personal),

       24             FriendlyName("Text"),

       25             Description("Text Property")]

       26         public string Text

       27         {

       28             get

       29             {

       30                 return text;

       31             }


       33             set

       34             {

       35                 text = value;

       36             }

       37         }


       45         protected override void RenderWebPart(HtmlTextWriter output)

       46         {

       47             output.Write(SPEncode.HtmlEncode(Text));

       48         }


       52         public DateTime CurrentTime

       53         {

       54             set

       55             {

       56                 Text = value.ToLongDateString();

       57             }

       58         }

       59     }

       60 }

    This is just the generated Web Part you get from the template in Visual Studio 2003, except we’ve got two new things. First the CurrentTime property, which is an implemention of the ICurrentTimeView interface and the interface has been added to our Web Part declaration.

    The CurrentTime implementation is up to us and in our case, we’re going to set our Text property to it. When the Web Part renders, it will render out the Text property that will get set.

    So how does the Presenter talk to the View? We need to add one more thing to our Web Part. In the override to the OnLoad method, we’re going to create the presenter object and initialize it like so:

       39 protected override void OnLoad(EventArgs e)

       40 {

       41     CurrentTimePresenter presenter = new CurrentTimePresenter(this);

       42     presenter.InitView();

       43 }

    Remember we said that the CurrentTimePresenter class takes in “this” (meaning the Web Part object) to its constructor. CurrentTimePresenter actually wants an object that implements the ICurrentTimeView interface. It doesn’t matter what object it is, or what it’s derived from, it only pays attention to the interface. Then it calls the “InitView” method of the view. That’s not part of the Web Part, but it will talk to the Web Part through it’s CurrentTime property.

    It’s all about misdirection. Like magic.

    This is a simple example. A more concise example is to have a backend data source (either a SharePoint list or a SQL database) feed the data through the Model (using a Data Access Layer or something). Or you can have the Presenter fetch the data through a Facade for the business layer (again calling some external data source via a DAL). Also you can have multiple properties and methods on your view interface (that your Web Part will have to implement). Use your imagination. Remember to keep your UI thin and simple. You’ll probably need one View and one Presenter to keep things clean but they’re simple to make and easy to use.

    The killer gain here? First, I can unit test my presenter and model (and view) without SharePoint. No, I can’t get SharePoint data without SharePoint but remember when we created the Presenter in the Web Parts OnLoad event? Notice it passes “this” as a parameter, but the CurrentTimePresenter class doesn’t know anything about Web Parts. That’s the magic of interfaces and designing by contract. The CurrentTimePresenter class expects an object that implements ICurrentTimeView. The Web Part is derived from this so it can be passed into the Presenters constructor. The Presenter couldn’t care less about the other “SharePoint” stuff, it’s just going to call the implementation(s) of the views interface(s).

    Also notice that the ICurrentTimeView implementation (the CurrentTime property) isn’t a SharePoint property, but it does set one internally. This is hidden from the Presenter so the Web Part could have just as easily set a text box, filled a data grid, or updated some AJAXy-type control (again, use your imagination). When the Presenter updates the Model, it does so through public properties that are defined in ICurrentTimeView. Again, it doesn’t know that this is updating a property on a SharePoint Web Part and couldn’t care less, it just knows that somewhere (somehow) the UI is going to make it work.

    Neat huh?

    Okay, go forth and code.

  • Which BDC tool should I use?

    I was a little confused (as I often am) earlier today as I noticed Todd Baginski has put together a tool he called the “MOSS BDC MetaData Manager”. Catchy name but didn’t I just hear this tune? There’s a CodePlex project underway called the “Database Metadata Generator for the Business Data Catalog”. Okay, not as catchy but isn’t this essentially the same tool? Not quite.

    Todd explains he looked at the project on CodePlex and there are differences between his tool and that one. He outlined them in his blog which I’ll share here:

    Features Todd’s tool has that the CodePlex one does not:

    • Granularity: Allows you to create BDC components (LOB Systems, LOB System Instances, Elements, and Methods) independently of each other.  The application on CodePlex creates one LOB System, one LOB System Instance, an Entity and two Methods.  My application allows you to add LOB Systems, LOB System Instance, Entities, and Methods on an ad hoc basis so the Application Definition can grow over time. 
    • Support for SQL Server Authentication. 
    • Ability to query objects in the BDC (LOB Systems, LOB System Instances, Entities). 
    • Column selection capability instead of returning all the columns in a given table. 
    • LOB System Instance configuration.  Authentication Mode, Database Access Provider and Connection Pooling can be individually selected and customized per LOB System Instance. 
    • SQL Server 2000 and SQL Server 2005 support (I'm not sure if the CodePlex application supports SQL Server 2000 because I did not test it against SQL Server 2000).  I tested the CodePlex application with the AdventureWorks database in SQL Server 2005 and the application threw an Exception.  I believe this is due to the fact that all the tables in the AdventureWorks database do not have dbo as their owner. 
    • Database selection capabilities that allow you to browse through the database server to find the database and table you are looking for. 
    • Export to XML capabilities. 
    • SSP Administration web site built into the application. 
    • Guided help and instructions for end users. 
    • Help system not only describes how to perform tasks but also educates the user on the various BDC components and how they relate to each other. 
    • UX: Easier to work with than the command line (that's just my personal point of view) and provides the context as well as the status of the current BDC elements as you work with them.

    Features the CodePlex tool that Todd’s does not:

    • The ability to generate a SpecificFinder Method.  (I will be adding this functionality later in the week.  I wanted to get my head around the BDC object model before I tackled this functionality.) 
    • The ability to execute the program via the command line or a batch file.

    Like he said, he’ll be adding the SpecificFinder method later this week and executing from the command line, well, might be value-added but I’m not so sure given all the “extra” capability that Todd has already baked into his tool.

    Botton line, get Todd’s tool and you’ll be good to go, creating application definitions at the flick of a mouse. If you haven’t figured out what the BDC is all about and what it can do, please dive in (a good starter is here). It’s going to be the unsung hero of SharePoint 2007 IMHO (I’m also giving a presentation at this fall’s DevConnections in Vegas on the BDC and will be using Todd’s tool for some of the demos as I can’t really create a definition in an hour AND present all the other stuff).

  • Introducing, the SharePoint Knowledge Base Web Part!

    Hey, what's a girl to do when his brain is just cooking with goofy ideas. With more ideas than can fill the Exxon Valdez, but not enough time to do them here's the latest chicken scratch courtesy of your friendly neighborhood MVP.

    The SharePoint Knowledge Base Web Part!

    It's a single web part (backed by multiple lists again, seems to work for my SharePoint Forums Web Part) that let's you create questions, assign them to categories, and rate and comment on them. I've dug around the net on various knowledge base software and pulled together the features that I think makes up a good kb web part. Here's a rundown of the features:

    • Ability to add as many questions as you like
    • Ability to add and categorize questions into categories (including multiple categories for a single question)
    • Search capabilities to find questions and answers
    • Rating for each question (was this helpful - yes/no)
    • Add comments for each question
    • Moderation of questions (or you can leave it open so questions are published immediately)
    • View questions by category (with number of questions displayed)
    • Quickly jump to any category instantly from the main page
    • Assign related questions to other questions
    • Attach any number of files to a question

    Of course, no announcement would be worth it's dirt without opening the kimono so here's some screenies:

    The main display of searching, selection by category, and the category display:


    Displaying a single question with option to print, email, add comments, etc.


    Watch for a release later this month (probably after the August drop of the SharePoint Forums, need to get a new project setup on CodePlex for this ;)

    kick it on
  • The Lighter side of being an Architect

    I wasn’t sure what to call this blog entry so maybe it’s mis-titled. As odd as it may sound, this entry stemmed from a conversation that’s going on over in Rory’s side of the web where he praises Carl Franklin on his community efforts. I threw in my own “praise the world” type comments, but there was a link to a site called Design Patterns for .NET. This of course peaked my interest, but some of the comments Rob Daigneau made about what is a software architect triggered something in me noggin.

    Everyone and his brother has written what a software architect is (and is not), comparisons abound on how software architecture is like building architecture, blah, blah, blah, blah, blah. I don't know what Rob Daigneau is (other than an Enterprise Architect for, and after this post I can probably kiss any hopes of working for them goodbye), but he misses out on what I think is the key elements of what software architecture (and Architects) is about.

    It's really not about patterns and technology. Really. Sure, they're an integral part and any good Architect needs those skills but they're just mechanics. Anyone (with the right aptitude) can pick these up (how do I make pretty UML diagrams, what is n-tier, etc.). IMHO the key things architecture is about is:

    • Communication
    • Abstraction
    • Negotiation
    • Influence

    A good architect excels at these attributes because they have no power, only persuasion to influence, and they need to know how to communicate what they're thinking so everyone understands them. I wanted to present my take on some things that make up a good Architect.

    Everyday the architect on a project is trying to tell someone something. You’re the liaison between the business and the geeks. You’re the instigator of change. You’re the guy who’s trying to demonstrate to the client that before they sink $5 trillion dollars into this IT project the concept is sound and the team can deliver what the business wants. You’re also the guy (or girl) who’s telling the business that you’ve heard what they want and think you know what they said. The rubber hits the road when you tell the story back to them and see if you were listening correctly. Finally, your the guy who’s trying to bring the stone tablets down from the mountain to the nerds who are going to build this monstrosity you’ve architected. Somehow, using a combination of knowledge of the requirements, kung-fu coding skills, and an understanding of your model, they need to create it. Yes, even if you are building your own system (I like Architects who code and I would like to think I’m one of them) you need to know the intent of what you’re building. Drive by coding and architecture on the cuff because you’re stuck down a dark Architectural alley is no way to build a solid system.

    We all know there’s abstraction in the domain and I’m not really talking about coding abstractions here or implementing interfaces for unit testing. I’m not even talking about technical abstraction (from an infrastructure perspective). No, this kind of abstraction goes hand in hand with your ability to understand the business requirements asked of you. And your ability to Architect a solution that meets those requirements. Something that does incorporate the technology you need and solve the problem at hand (whatever that problem is). If you’re too close to trees to see the forest, how can you really see the big picture of what needs to be done? I’m also not talking about big design up front (BDUF) or anything. Just simply being able to abstract yourself away from the techno-babble the geeks of the world will get wrapped up in and the little nuances the business wants from a solution perspective. It’s nice they want blue buttons and an user interface that’s “intuitive” but if you’re not solving the problem asked of you and reaching the overall goal with the entire solution, what exactly are you building? A great looking UI that moves data around? Where's the business value in that?

    It’s all about compromise. There are so many times you’re going to have to hold your Architecture nose because of the horrible smell you’re about to create because some network junky says you can’t have unsecured traffic over HTTP on port 80. You can come up with an architecture for a system that is technically perfect, but you have to live within the constraints of whatever infrastructure you build it on (or in). Corporate intranets and network security paranoidites are out to lock down and otherwise curb your seemingly elegant solution. For this you need to be able to compromise and find a balance. For this you need to negotiate. Sometimes it with the technicians who refuse to punch a hole in their firewall just so you can get FTP traffic flowing, other times it’s the customer who flatly refuses to back down on the sub-second response they want (without paying for the infrastructure upgrade needed to make it happen). There are negotiations to take place and through your bargaining skills, you’ll find that sweet spot that will make everyone happy.

    There is no power. If you, as an Architect, think you have the power to move things and leap tall requirements in single bound, think again. The customer is always right, and usually holds the dollarinos that feed your family. They’re not going to care that you think a SmartClient n-tier approach to solving their problem is better than a 3–tier application with a web front-end. They just want to do their business. And power over the developers who are building this thing? That’s an entirely different influence you have to master, since they look at you as a techno-dweeb who can barely code your way out of a paper bag. Not even the coolest looking UML or class diagram (even if there such a beast) is going to persuade them that your kung-fu is any better than theirs. Bone up on how to influence people. There are many self-help books out there that are good for this.

    Now a few things about this post. I don’t get into the differences between the various architect flavours out there. Software, Solutions, Data, Enterprise. An Architect is an Architect is an Architect. The core skills are there for all of them, the media and technical skills just vary.

    Well, maybe I’m the one that’s completely off my rocker here but these are my views of architecture from the software space and it’s my blog and I can rant if I want to, so there. YMMV.

  • Kicking the SharePoint beast

    First off, thanks to everyone who's been contributing stories to, kicking stories, and generally promoting the site by providing "kick" links in your own blog posts. SharePointKicks is growing and growing (which is a good thing) and becoming a great resource to filter out only the *good* stuff.

    Also props to Gavin Joyce who has singlehandidly (is that a word? where is my Websters plug-in?) been updating his *kicks* sites, and generally adding features as he can find time. Its interesting to see that DotNetKicks and SharePointKicks are the guinea pigs that get the first kick at the can for the new features (no pun intended). Maybe an indication of how popular kicks is.

    The recent updates are well recieved and will let you sort (using no-postback ajax techniques) the latest stories and top stories (based on number of kicks) from the last day, week, month, and year. There's also tagging which was added a few releases ago. This lets you add additional filters to posts so you can submit a story to the Community category, but then tag it with something like MOSS, Development, or Customization (or create your own tag). The tags display is based on how many items are tagged with that word, so larger tags will have more stories associated with it (very much like Community Server has with it's tagging system). I'm sure there's an official name for this who tagging concept and there's probably an entire blog dedicated out there that describes the origins (feel free to put a link in the comments if you know or come across it).

    Anyways, thanks again to everyone in the community for making SharePointKicks a great SharePoint resource (and so quickly!). Please do continue to contribute, kick things, and generally pimp it to the world as you can find the time. Also if you do have suggestions on SharePointKicks feel free to send them to me at Some of these suggestions may make themselves into the *kicks* software Gavin puts together and would show up on all the kicks sites, so consider your contribution not just to the SharePoint community but the development community at large.

  • SharePoint Projects on CodePlex

    Just wanted to highlight the current SharePoint projects listed on CodePlex.

    SharePoint Community Kit
    This project is used for the development of the SharePoint Community Kit, which consists of a Standard Edition and multiple specialized and value add editions, each of which enables practically anyone to create very quickly a functional community website on Windows SharePoint Services V3 or Microsoft Office SharePoint Server 2007.  
    SharePoint Stramit Document Library Browser
    SharePoint Stramit Document Library Browser is a free package of 3 Treeview WebPart for the SharePoint document library. I have always complained about the lack of navigation options that are in the the document library feature of SharePoint. Lots of people speak about migrating all shared documents from a WSS site.

    SharePoint Learning Kit
    The SharePoint Learning Kit is a community-source eLearning tool that integrates with Learning Gateway. Rich content is supported with full SCORM 2004 compliance and basic functions are supported for any electronic document.  
    Windows Sharepoint Services Site Directory Web Part Project
    This is a security trimmed Windows Sharepoint Services Web Part project that will display to the user the sites that s/he has access to. It uses a simple hierarchic tree view to provide easy navigation and access to all the permissible sites, and uses the built-in sharepoint icons to display the types of the sites.  
    Office SharePoint Server Search Web Parts
    Powerful, extensible web parts for Office SharePoint Server search.  
    SharePoint Forums Web Part
    The SharePoint Forums Web Part is a free, open source, single web part that provides a more feature rich discussion board for SharePoint Portal Server and Windows SharePoint Services based sites.  
    Database Metadata Generator for the Business Data Catalog
    A tool that automatically generates database metadata for Office SharePoint Server 2007’s Business Data Catalog.  
    RSS FeedReader
    An aggregate syndicated feed reader for SharePoint in web part format. This web part is designed to display several RSS and Atom feeds in a single web part with configurable option such as what to display and caching capabilities for the feed data.

    Most of the projects are active and have releases. One of them, the Office SharePoint Server Search Web Parts, seems already abandoned with no releases and no sight or sound of the owner even in it’s forums. Otherwise, SharePoint is alive and well on CodePlex. Here’s to seeing more SharePoint oriented projects up there!


  • SharePoint Forums Language Pack

    I’ve put together a language pack (just a zip file) for the latest release of the SharePoint Forums Web Part. Thanks to the efforts of people in the community, there’s a translation file for German (1031) and the Russian (1049) languages. Instructions on where to unzip the file are included in the zip and this file will be updated as more languages are translated and made available.

    Please check out this page on the Wiki on how to create a translation file for your language. You can download the language pack from here on the CodePlex site.

    EDIT: Just updated the release of the language pack to version 11 with the addition of the Ukranian language and a spelling correction to the Russian language files.

  • SharePoint Learning Kit now available on CodePlex

    CodePlex just keeps getting groovier and groovier with SharePoint projects. Here's the latest. It's the SharePoint Learning Kit and the first Community Technology Preview (CTP) is available for you to download. For those of you familiar with Class Server, this is the same thing. For those that are not familiar with it here's the blurb from the site:

    SharePoint Learning Kit (SLK) is a SCORM 2004-conformant e-learning delivery and tracking application built as a SharePoint v3 solution. It works with either Windows SharePoint Services 2007 or SharePoint Portal Server 2007, and has the following core features:

    • Supports SCORM 1.2, SCORM 2004, and Class Server content, allowing users to store and manage this content in SharePoint document libraries.
    • Supports a learner-centric or instructor-led (assigned) workflow.
    • Allows assignment, tracking and grading of both e-learning and non-e-learning content.

    In this CTP you can install and configure the SLK Solution and use it to assign SCORM 2004 content on a SharePoint site. Learners can view a list of their assignments with the assignment list web part, and can interact with the assigned content. The learner's interactions are stored in the SLK database.

    This CTP also has SDK and source code downloads for developers to review SLK and the underlying Microsoft Learning Components (MLC) API to determine whether it might be suitable for their applications.

    Very cool stuff. You can check it out here on it's new CodePlex home.

  • DotNetNuke and SharePoint, part deux

    First off I have a tremendous amount of respect for Shaun Walker and the DotNetNuke guys. They took a free sample starter application from Microsoft and created an entire after-market. Just look at how you go online and pay $30 for a DNN skin or $50 for a DNN module. No really, I'm not being asinine here. I really do respect them, the community that’s grown up around their efforts, the work they do and the future that DNN brings.

    Shaun has put together a giant matrix of DNN features and how they par up against SharePoint (2003 version, SPS and WSS v2 so I'll consider the features of both as the one column in his matrix) and the upcoming Microsoft Office SharePoint Server (MOSS) 2007. He also throws in ASP.NET 2.0 which is good, but for this lengthy discussion I'll just ignore it.

    I’m not going to nitpick about the things that are ticked on the DNN site but not the SharePoint one (unless they should be) but mostly focus on his comments on the DNN benefits column as I think some of them need either explanation or comparison to say a SharePoint benefit for the same bullet point. If a DNN benefit is stated, I just want to be sure it’s not being overstated where SharePoint does the same job (or vice-versa).

    I wanted to cover in-depth a few things he mentions, some things he omits, places where I don’t agree with his statements and my own reflections on the comparison. As you may know I did the big DNN vs. SharePoint showdown of my own awhile ago (which got a lot of great discussion going and feedback, including great stuff from Shaun) so let's see where this one goes. Overall he does a good job of making the comparison and it’s going to be a great reference for the future. Consider this blog post my Coles Notes (or Cliff’s Notes for you guys down south) on Shaun’s matrix. Here are Bil’s Notes ;)


    • A couple of points that need help here. The DNN benefits listed are things like “unlimited pages per site” and “unlimited modules per page”. While SharePoint does have some published limits, I have yet to see anyone exceed or come close to them (except maybe Microsoft themselves). And after you get 10 or 20 modules (or Web Parts) on a page any page is going to become un-usable, no matter what the technology is due to the fact you’re pulling so much data down. It’s like users that say they want 10,000 rows on a web page. Can you do it? Sure, if you like waiting for 5 minutes for each page refresh.
    • Using a DataView Web Part I can put the same module on as many pages as I want. I don’t see how this is any different than what DNN does today (although setting a module to show up on each page is sometimes a good thing, sometimes a bad thing [like when you want to get rid of it]).
    • Site Search. I feel this is a bit of a red herring. The DNN benefit is that DNN doesn’t use any third party components to do it’s search. However neither does SharePoint. SPS search is done by the search engine, and WSS only installs use SQL Servers full-text search. One would argue that DNN does use a component to do its search, it’s the custom component of DNN itself (which I don’t think allow me to extend it to say search PDF files for example like I can with custom IFilters). Again, I might be wrong here so feel free to correct me please.
    • DNN benefits are that it uses site and page templates with content. We have this already in SharePoint 2003 with the built-in templates (Team Site, etc.) and sites you can create as well with 2007 you get master page support and layout template support (in addition to site templates again). Dead heat IMHO.

    Bundled Functionality

    • A few things are missing from the SharePoint columns here as SharePoint does come with discussion forums (crappy ones, grab mine instead, shameless plug), photo gallery (Picture Library), survey, etc. The other argument here is that it comes with the Custom List template which is the basis for anything you want. So technically, while it doesn’t come OOTB in SharePoint, I can certainly create a FAQ, Blog, or Feedback list in minutes. Okay, you might say I’m stretching on something like the Blog and that could be true. In any case, things like the Custom Forms/Tables should be checked in the SharePoint column as that’s what the Custom List template really is (and personally is better than what DNN provides but I’m a little biased).

    Membership & Roles

    • I didn’t realize DNN had support for extending the roles provider, but since SharePoint 2007 is based on ASP.NET memberships I would suggest that this can be done as well (but I could be wrong as I’ve never tried to extend the built-in providers in .NET)
    • Security role trimming. DNN lists this as a benefit (with trimming for control visibility) and last time I checked I get that with MOSS 2007 (finally) so don’t know how this is a benefit over SharePoint (2003 for sure as it just plain sucked on hiding things users couldn’t do).

    Application Extensibility

    • I have a bit of a problem with the Developer Tool Support. DNN cites a benefit of supporting the free Web Developer editions and SQL 2005 Express. Contrary to popular belief, I can build Web Parts with the free .NET SDK and a command line, so I don’t need any IDE (professional or otherwise). WSS also makes use of SQL Server 2005 Express for it’s datastore, so not sure how DNN shows this as a benefit. As for the Visual Studio item templates which are not checked for SharePoint, there are web templates available for the IDE (true, no “Express” templates) and the 2007 ones will come along when the product is released. A keen person with some time on their hands could whip up a SharpDevelop (a free, open source, .NET IDE) template if they wanted to for SharePoint. After all, it’s just a class library at the end of the day.

    Designer Extensibility

    • Definitely kudos to DNN for zip deployments!

    Site Extensibility

    • I’m a little confused by Site Virtualization comment. DNN says it “supports multiple virtual sites from a single application/database based on URL”. Personally I can create a gaggle of sites on one IIS server and differentiate them with host headers. True, I don’t want to create more than say 10 or 20 on a single server, but I can do it. I can also create a larger gaggle of site collection or even sites (all with different URLs under say different hosts using host headers). Maybe I’m missing something here.


    • Again, single zip distribution for localization files (and not using satellite assemblies) is a bonus on the DNN site. No arguments here.

    Document Management

    • I have a problem with this section. Okay, he does check off “Secure Document Storage” for DNN but cites that DNNs benefit is that it can store the document on the file system or the database. Okay, in a simple world I guess I’ll buy that as a benefit but calling any document storage a document management feature is thin. If this was a SharePoint matrix list, it would blow away DNN since DNN doesn’t provide check-in/check-out or versioning (let alone any of the records management features coming in MOSS). But yes, storing documents on the file system might be useful as the database storage does take up extra space however you don’t get full text search throughout documents in DNN which is what the extra storage is required for (there are always trade offs), so this is a toss up to me.


    • No Multiple Database Support for SharePoint? Not sure what he’s referring to (and again this might be my lack of understanding of the inner workings of DNN) but I can certainly create a cluster of SQL servers in a farm and have my SharePoint content databases split across them. Sorry, but when Microsoft can host 30,000 team sites in their data centre that’s multiple database support (and then some) to me. Not sure if DNN scales out to that as I don’t know of any really large DNN sites (but feel free to provide some examples as I don’t know everything). I do agree the XCOPY deployment would be grand for SharePoint, but I just think it’s out of the question given all the moving parts it has (see below for more details on the power of PAs that DNN has).


    • I don’t know why, but Shaun failed to mention the SharePoint 2003 (and 2007) support forums. Basically there are 4 (or 6 or 8 I can never keep track) managed newsgroups as well as various community forums (like SharePointU for example) and mailing lists (sharepointdiscussions on Yahoo Groups) that all provide this. True, there isn’t a support forum environment like DNN has, running on the SharePoint site at Microsoft but I don’t see NGs being that far off from this (plus the fact that SharePoint forums/newsgroups get hundreds if not thousands of posts a day). So I believe he should have included SharePoint here.


    • I agree that DNN is free (as in beer) but for example, my web host (webhost4life) provides me with a “free” WSS site (it’s the one running the Application Templates site and some SharePoint sandbox/showcase work). I consider it free because I pay for hosting there, just like my ASP.NET hosting that runs my “free” DNN site. So what’s the difference? Sure, if I was hosting the system myself I would have to pay for a Windows 2003 Server license and there’s an external connector fee (which I think is what he’s referring to with the $40k) but again, if I host my WSS site somewhere else I don’t need to worry about that. Of course there are problems with that too (like I personally can’t deploy my own custom Web Parts on a hosted environment). For a good example of where MOSS 2007 is going as far as hosting intranet facing sites goes, check out Ian Morrish’s site as it looks great and runs 2007 so you can see everything SharePoint will offer in this arena.


    It’s interesting the comments by Joe Brickman on deployment and extensibility. He points to my recent NAnt post on creating an MSI for my Web Part and how you’ll lose people in a hosted environment. I totally agree and think that the PA (Packaged Assembly) system of DotNetNuke is the cat’s meow. I mean, the fact I can download a PA from a vendor and upload it and have it install on my host (no matter what priviledges my host gives me, as long as I have host rights on the DNN system I install which I would) it’s awesome to have new functionality in seconds.

    I don’t know if SharePoint will get to that (although the Feature Management system is a step towards that, but you still have to have access to the host to make the feature available). In fact I pondered building my own PA-like system for SharePoint that would allow you to upload a zip file with web parts, etc. through a Web Part and it would deploy itself much like how PAs work.

    However I do see a downside here.

    I haven’t heard in the DNN community and don’t know the inner workings of DNN to know if it will do security-like checks on a PA so who’s to say that I can create, build, distribute, and release a malignant trojan-like PA on the DNN community. Really. Create a wonderful looking module, offer it for free and have everyone install it. Then months later take down the entire DNN community (or a large part of it) with a module. Yes, a bit extreme but remember the little Sheep desktop gizmo that was floating around years ago? Nobody knew where it came from but everyone ran it. Imagine if the “Users Online” module for DNN was like that? (okay, I’ll stop as we’re getting into Conspiracy Theory territory here and it’s silly).

    That’s the downside I see but again, I think the PA distribution system is great and many steps above and beyond what SharePoint has.

    Of course, there’s things missing from the matrix since it’s told from the DNN perspective. Like the fact that MOSS has this incredibly complicated “people” network. Just by reading or contributing to someone’s document, or being a member on their site puts them in my social network. This networking aspect is huge and nothing like it exists in anything I’ve seen in DNN. So there are gaps, but there always will be. If the story was told from the SharePoint perspective, it would talk about all these features and leave DNN in the dust in some areas (and miss out in others), like DNN does with SharePoint.

    In the end, again, its up to you to decide. Like any good craftsman, choose the right tool for the right job. I think the 2007 version (now that it’s built on ASP.NET 2.0 and they’ve started to think about external users seriously now) will be a step up. Projects like the SharePoint Community Kit will help this effort.

    It’s up to you to choose and remember to choose wisely.

  • Adding SharePoint Forums Web Part to a page

    Okay, stupid error that I need to fix later today when adding the SharePoint Forums Web Part to a Web Part Page.

    When an assembly with SafeControl entries is installed in the GAC (like this version is) the DWP file requires that the <Assembly> tag is a fully qualified one (with the public key token, etc.). This is to distinguish it from other assemblies.

    The DWP file that is installed doesn't contain the fully qualified name, only the assembly name so SharePoint throws a hissy fit and says it's not safe.

    So to fix this:

    1. Navigate to your wpcatalog folder under c:\inetpub\wwwroot (or wherever SharePoint is installed to)
    2. Manually find and edit (with Notepad or something) the BilSimser.SharePoint.WebParts.Forums*.dwp file
    3. Change the <Assembly> tag to read:
      <Assembly>BilSimser.SharePoint.WebParts.Forums, Version=, Culture=neutral, PublicKeyToken=e516dadc23877c32</Asssembly>
    4. Now you can import the web part onto a page from the virtual gallery.

    The <Assembly> tag should match the entry in the SafeControls entry in your web.config file.

    Stupid error that I should have realized. I'll rebuild the MSI (again) and update it for those that will download it later today.

    Sorry about that folks. Sometimes coffee just isn't enough.

  • SharePoint Forums 1.1 Released

    Happy times are here again. I’ve finished the packaging and released version 1.1 of the SharePoint Forums Web Part. This contains a fairly large chunk of bug fixes and new functionality. Here’s a rundown:

    • Installation. Installation is HUGELY simplified. Just download the MSI and run it. Yeah, should have done that a long time ago.
    • Language Support. This release includes a language file (currently only english is available) with translatable strings from the Web Part. The file is just an xml file and you can create your own (using the existing one as a template) and deploy your own language resources (just drop the file onto the server and go). More instructions on creating additional languages will be available on the Wiki shortly and more translatations are to come with upcoming releases (I didn’t get to externalize them all, but it’s a start).
    • Date Sorting. Forums and topics were being displayed backwards (oldest to newest) so this has been corrected to “bump” the latest posts to the top
    • Todays Topics. You can now click on a link to show all the topics posted today.
    • RSS feeds. Each forum has it’s own unique RSS feed you can subscribe to.
    • Cleanup of display. A few links (like Delete Topic) have been cleaned up and put in a better place to make it easier to find. Other minor fixes to the display.
    • Performance. This was a big boo-boo I made. Now the forums load in under a second (no matter how many posts you have).
    • New Admin Functions. There’s a couple of new admin functions like recalcuating the totals (sometimes they get out of whack), deleting all the forums and restarting, and creating a set of sample data to play around with.

    Hope you like it! Keep your suggestions coming in the Discussion Forums and Issue Tracker. Next drop is in August (we’re now on monthly drop cycles) with anonymous users, NNTP synchronization, ASP.NET 2.0 and MOSS 2007 support!

    You can grab the file from the Releases section on CodePlex or directly from here.


  • Automating your Web Part builds (and distribution) with WPPackager and NAnt

    I’m just finishing up the packaging for the new version of the SharePoint Forums Web Part tonight and thought I would share with you some ideas and concepts around the packaging and distribution of it.

    Thanks to Paul Schaeflin who took time out of his busy schedule to put together a CAB installer for me. It was great but I thought I could improve on his foundation. I used that as a basis, but then went back to an additional friend, WPPackager. WPPackager is a sweet little tool that will package up your Web Part assemblies, resources, and additional files and create an MSI for you. The end user just runs the MSI without any fuss or mess screwing around with web.config or custom policy files. There’s a great MSDN article that explains how to use the tool with some examples. Check it out here.

    Anyways, so I use NAnt for my builds (free, open source, blah, blah, blah) and with NAnt you can practically automate anything. Here’s part of my NAnt build file for SharePoint Forums:

        1 <?xml version="1.0"?>

        2 <project name="SharePoint Forums Web Part" default="deploy">


        4     <property name="" value="Debug" />

        5     <property name="output.dir" value="build" />

        6     <property name="deploy.dir" value="C:\Inetpub\wwwroot\bin" />

        7     <property name="resource.dir" value="C:\Inetpub\wwwroot\wpresources\BilSimser.SharePoint.WebParts.Forums" />

        8     <property name="wppackager.dir" value="C:\Program Files\WPPackager" />


       43     <target name="dist" description="create a distribution MSI for the web part" depends="build">


       45         <!-- Copy the files needed by WPPackager to the build directory -->

       46         <copy todir="${output.dir}" flatten="true">

       47             <fileset>

       48                 <include name="SharePointForums-" />

       49                 <include name="src\Manifest.xml" />

       50                 <include name="src\SharePointForums.dwp" />

       51             </fileset>

       52         </copy>


       54         <!-- Use WPPackager to create a MSI -->

       55         <exec program="WPPackager.exe" basedir="${wppackager.dir}" workingdir="${output.dir}">

       56             <arg value="SharePointForums-" />

       57         </exec>


       59     </target>


       61     <target name="install" description="installs the web part using the MSI installer" depends="dist">

       62         <exec program="SharePointForums-" basedir="${output.dir}" />

       63     </target>


       65 </project>

    It’s fairly long and I’ve removed some of the targets for clarity but let’s break it down here. The default target is “deploy” which will in turn call “build” which first calls “clean”. These do what you think and deploy just copies the files to the “C:\Inetpub\wwwroot\bin” directory (or wherever you run your SharePoint server from).

    The target we’re interested here is “dist”. The “dist” target will do three things:

    • Clean out the build directory and rebuild the system
    • Copy all the distribution files needed for the distribution
    • Execute the WPPackager.exe program and create an MSI

    The build is done through the “build” dependency target which compiles the solution file but first executes the “clean” target which just deletes the build directory. All files are output first to the build directory (here specified as the variable ${output.dir}. This keeps all the dll files in one place rather than hunting all over for a Debug or Release directory.

    The WPPackager program needs a single file which contains instructions to build the MSI. Here’s the SharePointForums- file:

        1 <?xml version="1.0" ?>


        3 <!--

        4     WPPackager file for SharePoint Forums Web Part

        5     Version

        6     GAC install

        7 -->


        9 <Wppackager xmlns="">


       11     <Manifest FileName="Manifest.xml" />


       13     <MSI

       14         Name="SharePointForums-"

       15         Version=""

       16         Manufacturer="Bil Simser" />


       18 </Wppackager>

    Not much to look at. This just tells WPPackager that I’m building an MSI, giving it a name and version and manufacturer (that’s ME!). The Manifest.xml is the standard one from SharePoint that just lists the assemblies we’re including and the SafeControl entries (these are added to the web.config file auto-magically when the MSI is run).

    The WPPackager needs all the files that are going into the distribution (much like if you were using a CAB project in Visual Studio to build a CAB) so the build script (using the “copy” task) copies the Manifest.xml and SharePointForums.dwp file from the Web Part directory into the build directory so WPPackager can find it when it runs.

    Finally WPPackager is run using the “exec” task as shown here. This will create SharePointForums- in the output directory.

    I also use an install target that will run the MSI after it’s built. I do this on a clean system just to test the build and install to make sure everything works (note to self: I’ll probably add an “un-install” target for rolling it back, if I can figure out how to execute the MSI backwards).

    One note is on the output of WPPackager. You’ll see something like this:


         [copy] Copying 3 files to 'C:\dev\BilSimser.SharePoint\WebParts\ForumSingleSolution\build'.
         [exec] Success: MSI Installer: 'SharePointForums-' created successfully from 'SharePointForums-'.
         [exec] Note: 'SharePointForums-' is not signed. Consider signing 'SharePointForums-' so that the user can identify the source of the MSI.


    Total time: 6.2 seconds.

    The MSI that gets created is unsigned (and will be untrusted on the installing sever when it’s run). I didn’t want to get into the details of signing here but check out this article on using SignTool. Once you install SignTool you can do something like this in your build file:

    signtool sign /a MyFile.msi

    Which will sign the file with the best certificate it can find. I haven’t tried it so you’ll have to check it out yourself (I just need to get around to installing the Platform SDK, something I normally don’t do). Until then you’ll just have to trust me ;)

    That’s about it for automating your distributions with NAnt. A similar build could be created with MSBuild and it’s format so I may create that when I move the project over to the 2007 platform later this month. Otherwise, with a few simple tools and commands you can have a nice little automated MSI builder so you don’t have to put your users through hell (like I did) on editing web.config files manually and trying to locate the “bin” folder (sorry about that guys).

    BTW, WPPackager is being discontinued. Please read, speak up, and support the post here from Maurice Prather on it. Personally it’s a nice tool once you get to know it. It’s not perfect, but at least it a) creates an MSI for you b) inserts the SafeControl entries for you and c) will apply a custom policy file for you (it copies whatever is there and adds your own policy entries). Additionally, it will roll all this back all these changes when you un-install the Web Part from the Add/Remove Program Files menu. You could probably do the same with a custom installer but then you need to mess with the web.config file (finding the right node, adding entries to it, etc.) and backing up and creating custom policy files (as well as rolling this back during an un-install). Neither rocket nor science, but not just a few if/then/else statements either so WPPackager helps. A lot.

    At this point, there’s no slick way I know of to install Web Parts in 2007 (yet), although Todd Baginski’s SharePoint Feature Manager is looking good, but it still needs things to manage and won’t install the Web Parts/Solutions for you. Hopefully someone will have something put together (perhaps a resurrection of WPPackager?) for 2007 as we really do need to in order to deliver packages to you, the consumer, and not have you go through crazy setups like in the past (or is it the present?).

    Watch for the Web Part release later tonight on CodePlex.

  • Kicking it up a notch with SharePoint

    If you’re into the whole Emeril thing you might like this. With the tremendous help of Gavin Joyce, I’ve setup a new community site called

    SharePointKicks is very much like it’s other *kicks siblings. Members of the site submit stories (usually blog posts but can be anything) and have the ability to “kick” a story up if they like it (or down if they don’t). The more kicks a story gets, the higher up the site food chain it is. This is very much like the mentality of community rated content and takes away that *I* in *TEAM*. After all, do you really want a single MVP or Microsquishy drone always spouting off what’s best? Why not have everyone (including yourself) do it instead.

    That’s what the kick sites do. And it works. You end up with a nice filtered view of the world. If a post isn’t popular, you won’t see it until it is. There won’t be dupes (or at least that’s the plan) like other aggregated sites (isn’t it a pain when 8 people all blog about the same thing?) so the signal::noise ratio should also be reduced. And you’ll get the choice content that appeals to the masses so you can focus on what’s important.

    Yeah, it all sounds good on paper so time will tell how good it really is.

    Anyways, there are a few ways you can participate in growing this community:

    • Just visit the site. You’ll get links to blogs/articles/etc. that others find useful so hopefully that’ll be useful to you.
    • Register on the site. The great thing is that you can register on one site (say SharePointKicks or and your registration is used on all of the kicks sites with one login. Once registered you’ll be able to submit your own stories or kick other peoples stories to increase visibility.
    • Contribute to the site. As a registered user, you can add stories to the site. These can be your own blog entries (yes, we’re all about shameless self-promotion) or nuggets of SharePoint goodness you’ve found around the web that you want to share. If enough people find it interesting, it’ll be jerked up the popularity stack for all to see.
    • Blog about it. A site like this doesn’t work with one guy behind the curtain pulling all the strings. It only works with people like you. If you’re a SharePoint blogger, then go ahead and submit your own story.

    As a SharePoint blogger (or ones who blog about SharePoint, yes that means you Sahil) it would be great for you to get your readers to kick your own content for you. It’s like having a million monkeys do all that typing for you. All you have to do is add the following HTML to a SharePoint related blog posting you want people to share:

    <a href="[URL]"><img src="[URL]"></a>

    And replace the [URL] with the permalink to the actual item. This will create an image link (like the one below) and a registered user on any of the *kick sites can just click on it to “kick” your blog entry. If it’s the first entry on the site, you’ll be asked to provide a short description and select a category.

    Mmmmm. Metadata. Metadata good.

    Just put something useful in the description. Consider this the abstract item you’re kicking, the thing that will suck people into it and make them want to click on the link to find out more.

    If it’s an entry that’s already been kicked, your kick total will be added. Once a story has been kicked a few times, it shows up on the home page and in the categories that are available on the site.

    Finally if you’re just looking to help out the site, click on the Find stories to kick link on the right hand menu. This will present all the recent items submitted and give you the ability to be the publisher and kick it up onto the homepage.

    Very cool.

    Many thanks for Gavin for getting the site setup so quickly (I registered the domain around 9AM this morning, by 11:30AM the site was up and running) and Monty Grusendorf who’s helping out with the site duties (watch for more SharePoint stuff from Monty soon!)

    So go. Spread the word. And Kick it!

  • CodePlex comes out of Beta

    For those of you that have been following this stuff, CodePlex has “officially” come out of Beta and is now live. CNET has an article on it here, but it’s pretty thin and doesn’t contain much information. Here’s a quote from one of the CodePlex guys:

    “From this point we will release a new version of the site every three weeks to continue to incorporate more improvements and any resolve any issues. You can watch the version number displayed in the bottom right corner to see when a new version has been released.”

    They’re no longer moderating project creation and will accept any new project, but they’re queuing the projects up to ensure that the number of projects doesn’t exceed their server capabilities so it might be a delay between when you request a project and the time it gets created. The team is also on a 3 week iteration cycle and will be releasing a new version every 3 weeks to incorporate bug fixes and enhancements.

    Of course, I might be a little biased, but CodePlex rocks so check it out.

  • Installing the SharePoint Forums Web Part

    The biggest problem that I keep hearing about with the SharePoint Forums Web Part is installation. I think there is a flaw so that you will, almost always, get at least one error on security but with a page refresh this goes away (at least with all the tests I've done where I'm running as non-admin, non-Full trust, I get this).

    However the biggest problem that everyone is talking about is the steps they're going through installing the web part and the errors they're getting. Here's an example:

    "I've read all the documetation and followed it exactly and installed the dll files in the c:\inetpub\wwwroot directory but it still doesn't work."

    Okay, this is wrong. The documentation does not say this, it says to find the directory where SharePoint is installed and in a default setup it will be this. It also says to create the "bin" folder (where the assemblies are) if it doesn't exist.

    It's feedback like this that is causing problems with people installing the web part.

    I'll be the first to admit, if the documentation is wrong (and it might be) then I'll update it so that anyone can install this. I'll also be the first to admit that if you've never installed a custom web part (and there are a lot of people that haven't) that these instructions can be a little daunting. We are working on an installer to make it as idiot-proof as possible and hopefully reduce it to a one-click install. The problem is that there are several moving parts that need to happen for the web part to make it into a virgin system including:

    • Copying the assemblies to the "bin" folder
    • Adding the SafeControl entries to the web.config file
    • Creating a custom policy file
    • Setting the custom policy file in the web.config
    • Adding an assembly to the "gac"

    These are non-trivial steps, but as far as I know I've documented them as much as possible on the Wiki site. So please refer to the installation instructions here first and foremost. Also remember to click on the hyperlink for each step, as it contains a more detailed set of instructions.

    Like I said, if the instructions are incorrect or missing information (even the smallest thing) please let me know. Did I screw up? Maybe? Did you just assume things and skip steps? Possibly. I've been communicating with a *lot* of people and *almost* everytime, they've just ignored what the documentation said and put things in weird places (I even had one guy that copied the dll files to the 60 hive, which is just completely wrong).

    Okay, enough of my ranting. Since I can't be at everyones machine to do the install for them the documentation (until a complete installer comes along) is the next best thing. Please help make it a complete and accurate document.


  • The house of the converted, CodeRush is in the da house

    I’m a flip-floppy sort of person when it comes to some tools. You love them or hate them. I’m somewhere in between.

    When JetBrains released version 2.0 (finally) of it’s ReShaper product, I was quite happy to see it stablize and support VS2005. However I had been wavering because Mark Miller just blew me away with CodeRush and ReFactor! Pro down at PDC. What’s a girl to do? CodeRush together with ReFactor is sort of like ReSharper but missing some features I really want (like rename class and the Ctrl+F12 code navigator).

    However I’m hooked on CR again. Mark was again pimping his product (sans voice) at TechEd and I got a copy of the lastest drop that clinched the deal. Not only does CR now have some new stuff like support of creating test fixtures and tests easily (maybe it was there the whole time) but there’s a killer feature using a tool window that shows you the structure of your code.


    Nice. Not only can I learn the CR keystrokes better now (which has always been a problem for a dork like me) I can also see things in my code easier as the tool window is all context sensitive.

    I’m sure there are some other features, but I’ve taken the plunge now and dumped ReSharper. Yes Mark, you’ve converted me dude. I’m tired of the long load times while parsing things (yes, 2.0 got better but it’s still sluggish) and I’m tired of the system crashing on me (it does from time to time with simple refactorings). CR + RefactorPro kicks butt and takes names. Yes, it’s missing some of the features ReSharper has that I like but hey, I can always write my own plugin using DxCore if I want.

    Also check out Mark’s cool tip on giving Visual Studio a new desktop when editing forms. Check it out here.

  • SharePoint Forums schedule update

    Just a quick update on the SharePoint Forums project. I’ve moved the next release (v1.1.0.0) out to July 1st. It’s just too close to TechEd and I wasn’t able to actually get any work done while I was there (no surprise). The monthly iterations will continue, but they’ll start on the first of the month. This just gives me a little time to get things going. Also the roadmap is being planned out for the August and beyond releases which will include new functionality and support Office 2007 installations.

    Also when you’re reporting issues, can you please provide some information about your setup. It’s important to know if you’re on a SharePoint Portal Server install, or just a Windows SharePoint Services setup (or a Small Business Server setup) and if you’ve installed ASP.NET 2.0 on WSS or something crazy like that. It’ll help track down problems much faster for me.


  • Paired Programming at 30,000 feet

    It’s actually pretty fun. James and I were on our way back from TechEd yesterday and decided to start a small community project we’ve been talking about for awhile (and didn’t find any time through the week to work on). After a quick 20 minute discussion about some of the goals we wanted to accomplish, we cracked open the laptop on the plane and James wrote the first few tests.

    He then handed me the laptop to implement the domain.

    Ahh, TDD at it’s best. Just some tests someone wrote with ideas around how they want to implement the system and your task to do it. This went on, back and forth, for a couple of hours on the first plane and resulted in a few discussions, a bunch of tests, and some good fun.

    Storm clouds ahead

    We hopped onto the plane from Minneapolis to Calgary and started up again, this time I wrote the tests and he implemented the domain. Of course, as you get further into TDD the tests start to get harder because you get past the glamour of the first few tests (adding items to collections, checking properties) and dig into the real heart of the problem.

    It’s a great excercise because about halfway through we tossed out a couple of classes we pre-supposed we would need. The great thing is, the tests still passed even after removing the classes. Using .NET 2.0 and Generics we got rid of an entire class and just used a combination of SortedLists and the Dictionary class, which made things simpler. I still think there’s simplification that can happen, but we had to bow to the great airline people and close the laptop for the day.

    The end result? A few hours of coding, 4 or 5 domain objects, 100% coverage, and 22 tests. All green baby.

    Programming can be fun, even at 30,000 feet in the air with no wireless.

  • TechEd 2006 - Day 7 - Wrapup and Bacteria Farm update

    Holy crap I’ve been blogging quite a bit while I was here. It’s amazing how much gobbly-gook you can spit out and time you can waste at these things. Here’s a wrapup of my posts for the week:

    And here’s my blogging partner and hotel roomie James and his entries:

    Hope you enjoyed TechEd as much as we did. We’re off to the airport shortly (well, James is still sleeping and there’s a shower with my name on it waiting) where we’ll have a grand time playing Marco Polo finding free hotspots and making fun of Bostonians.

    If you didn’t get a chance to be here yourself, I hope you lived vicariously through me since that’s what my purpose on this planet is, being a geek channel.

    Oh yeah, the Bacteria Farm is growing. We planted the seeds with our MacGuyver hotel room techniques on July 11 when we got in, and left the bacteria to gestate for the week, checking on it from time to time. Here’s what it looked like last night:


    Okay, it’s hard to see but basically we had some nice growth out of petri dish #3 and #5. This was bacteria scientifically gathered from the base of the toilet (who says hotel room bathroom floors are clean enough to eat off of) and the window sill outside our room (lots of dirt there). There was no growth from my shoe (even after a day of walking around TechEd, way to go convention cleaners!), the sink drain, or from inside my mouth. The empty petri dish from the bacteria inside my mouth is a little disturbing. I mean, am I still alive? With all that saliva and left over twinkie bits, you think something would grow from there. Oh well, live and learn.

    The growth is now soupy goo so we’re going to dump it into the wonderful Boston water system. If anyone in Boston gets sick over the next few days after drinking water or taking a shower, feel free to blame me. Not an entirely controlled experiment but it beats the heck out of watching paint peel on those lonely TechEd days.

  • TechEd 2006 - Day 6 - The Good, the Bad, and the Ugly

    Now that TechEd is over it’s time to reflect. To look at the good, and the bad, and of course the ugliness that we experienced. Here’s my take on the week.

    The Good

    • Lenox hotel. Nice service, great rooms, excellent price. They even leave 2 Lindt chocolates on your bed when they turn them down each day for you. Hint to those traveling as couples, order the room with the double bed (even though you’re going to shag in one) so you get double chocolate intake.
    • Mini-parties with various people, too long into the night but still a great time.
    • Being an Office Booth Babe and chatting it up with so many people.
    • Meeting up with the product teams and various uber-smart people at Microsoft and elsewhere.
    • Walgreens open 24 hours when you got the munchies.
    • Twinkies, Häagen-Dazs, and Cocoa-puffs at the conference. About the only good food there.
    • Free soft drinks ala Micrsoft campus style. It was nice always having a diet-coke or something after talking for dozens of hours.
    • Team System for Database Professionals. This is going to kick-butt and take names. I’m glad they’re adding this much needed product to the lineup.
    • Speaking to a million people about SharePoint 2007 goodness and watching their eyes light up with the cool new features that they’re going to love.
    • Zappa does Zappa. Brilliant.
    • Fresh lobster.
    • Feeling a Sony Vaio UX50 (thanks Scott!)

    The Bad

    • $6.50 toll just to drive from the airpot to downtown.
    • Cab drivers that don’t take plastic. That’s just plain odd from where I come from.
    • Not enough Häagen-Dazs. The bins quickly ran out and there was no real schedule of when they got filled.
    • Walking 30 miles throughout the convention centre.
    • Working the Office Technical Learning Center booth at 9AM after getting to bed at 3AM from the party.
    • Crap swag. Nothing really that great from what I could find (but then maybe I’m not looking in the right place).

    The Ugly

    • The bus company we were using (Peter Pan, what the hell kind of name is that for a bus line?) went on strike mid-week so most of us were waiting for buses or hopping in cabs.
    • Cab drivers that don’t know where anything is. I talked to a few people and they all felt the same way so I’m not alone on this.
    • Bus drivers that took a different route to or from the conference center and the hotels every single time.
    • Meals. While I haven’t been to hundreds of conferences, this was the worst food ever.
    • Wireless-ness access everywhere. At one point they ran out of IPs but for the most part, coverage sucked so I plugged in when I was on the floor.
    • Crazy ass tunnels everywhere, makes me feel like the mole-man.

    In addition, it was great seeing everyone. Shout outs to some old peeps (April, Lawrence, Fitz, Susan, Scott, Mark, AC, Bob, Spence, Todd, Bill, Carl, Richard, Julie) and some new ones I met or finally came face to face with (Jim, Korby, Chad, John, Jeffrey, Michelle, Heather, Amanda, Shane and Shane, Woody, Arpan, Bill, and Julia). Sorry if I missed anyone as there are so many names and my brain hurts.

    Good times.

  • TechEd 2006 - Day 6 - Additional Content

    For you Office guys who got the Office DVDs at TechEd, there’s some additional content you might be interested in. Over at the IT Content for 2007 site here you can grab:

    • Planning and Deployment Guides
    • Operations Guides
    • Known Issue Documents
    • The Office Online Beta Control

    Check it out as it supplements the swag you got in your TechEd bags.

  • TechEd 2006 - Day 6 - Boston Walkabout

    It was quiet as things wrapped up here at TechEd in Boston.

    Since I came to the city, I was taken aback from the rich architecture and history in the town so as I made my way back to the hotel this afternoon, I took a small walkabout the city.


    There’s a feature called the Freedom Trail, a 2 1/4 mile line (mostly brick, but painted in a few spots) that takes you through most of the key historical landmarks of the city (various graveyards, churches, Paul Reveres house, etc.) so it was a good walk.


    I see dead people.


    You can check out my entire Boston set here from the week which is mostly focused on the sights of the city. 64 pics and 6 hours of walking today, includes various street performers, architecture, small children, old historic buildings, new shiny buildings, boston common, and dead people. Not bad for a way to wind down a technical event.


    Back later with The Good, the Bad, and the Ugly from TechEd.

  • TechEd 2006 - Day 5 - Take me out to the ballgame

    It’s hard. It’s hard to blog the same day that something happens when you’re at TechEd.

    Here it’s a flurry of activity, an influx of information, an ongoing flash of gizmos and gadgets. In short, technical sensory overload. Yesterday was one of the bigger days. A double shift in the TLC area and my Birds of a Feather (BOF) session sandwiched in between, with a topping of the all-night party thrown in at the end, mixed in with various newsbits like BillG and Mr. Ozzie. That’s a lot of TechEd. Hence why my Thursday post is being written from the TLC Friday morning. Such is life.

    Bill, good luck with all that stuff. You and Melinda do good work. Ray, listen to the soldiers. They know good stuff when they see it and don’t take any guff (even from that Balmer guy). Sorry I missed your keynote but let’s do coffee.

    Red Sox Gong Show

    It’s all good, although my BOF was a little disappointing. Here I had a good set of new features for developers to discuss, I thought it would be a lively discussion about all the new event handlers, web part filtering, cross site queries, ASP.NET 2.0, providers, and … oh the list goes on. Instead it was a lively discussion but one that sort of drifted into licensing, deployment, and usability land. Oh well, all in all I think it was fun and I felt people got some good conversation and value out of it (which was the point). Thanks for everyone for coming out!

    BOF session

    I did manage to catch Scott Hanselman and Keith Pleas on Enterprise Frameworks. It was a good talk and I really enjoyed the banter real-world Scott and mythical-theory-land Keith did. They played off each other well, with theory slides from Keith all airy-fairy and bright and Scott’s “In Reality” slides ala Lessig style white text on black background. I always enjoyed seeing some of Scott’s development kung-fu (and his kung-fu is good) and how they use a release tag for local dev builds (all done through NAnt). He’s a smart dude and you learn a lot from him. Slick stuff.

    Enterprise Frameworks Discussion

    As the day wound down, I shuffled off to the hotel to de-geekify for the nights festivities. As usual with MS events of this magnitude, they “rented” Fenway park and opened it up for all the TechEd peeps. Some concession stands were closed (I really would have liked a Philly cheese steak sandwich) but otherwise all the food and beer was free, and there was lots of fun stuff going on.

    Take me out to the ballgame

    For those that dig the music, Train performed on stage to few hundred (or at least it seemed that way) and it was all good. Myself and Fitz scattered out of there early (after wolfing down the required hot dogs, hamburgers, pizza, peanuts, and assorted ballpark “food”) on to hook up with some friends, which (of course) ended sometime around 3 or so in the morning. Or dozens of martinis. I can’t remember which.

    American Idol Microsoft Style

    Yeah, needless to say there’s very little sleep that you get at events like this.

  • TechEd 2006 - Day 5 - Rainy day in Boston

    It’s a rainy day this morning as we hop onto the bus and head out for the daily grind. Today is my Birds of a Feather (BOF) session at 1 PM (or it might be 1:30 PM, depending on what schedule you look at) so if you’re interested be sure to drop by room 203. It’s on SharePoint development and what you need to know to get ready for 2007. All in all, it should be a blast.

    I’m also in the Technical Learning Center (TLC) for Office from 9 AM – 12 PM and 3 PM – 6 PM. I’m going to try to catch Scott Hanselman’s session on building frameworks this morning at 8. Unfortunately I haven’t been able to catch many sessions this week. After having lunch with Scott and John Lam, I was really intrigued by Ruby and .NET and wanted to see more. I did manage to sit in on part of the Atlas BOF yesterday which was interesting so I’m downloading the CTP today and going to try out some SharePoint 2007 stuff and Atlas at the conference. We’ll see how awake Scott is this morning for his session, I know I’m at least 3 coffees behind and it’s only 9 AM.

    For whatever reason, I have yet to travel the same route on any bus, to or from the conference, at any time of the day. It’s all very confusing.

  • TechEd 2006 - Day 3 - Zappa does Zappa and change is good

    I didn’t get a chance to blog yesterday as it was a full day for me but here’s the recap as there were many things going on all over the place and the entire day is a bit of a blur (much like this blog entry is looking right now after 3 hours of sleep).

    I was manning the Technical Learning Center (TLC) in the Offiice area. I’ll be here all week at various times so drop by and chat. It was great talking to everyone as there were so much diversity and different problems. It’s always interesting to talk to people about real world scenarios and see what people are doing (or wanting to do) with SharePoint. This helps me direct content to you that is most appropriate and valuable to you so please keep it coming (if you’re not here at TechEd or can’t catch up with me there’s always email). TechEd is such a great show and one of the biggest benefits (IMHO) is not the sessions, it’s not the keynotes, it’s not even the schwag (did I even say that?) but it’s the personal networking. I speak to more people in the Technical Learning Center than I ever have and either helped solved peoples problems, hooked up with new people and got them hooked on the SharePoint drug, or strengthened old contacts.

    I had a great opportunity of meeting with Jim Newkirk for lunch and we spent a good hour or two talking about NUnit, Agile development, Team Rooms, Agile at Microsoft, and of course CodePlex. Jim had a session this morning on patterns which filled three rooms (and was packed). It was a great overview of patterns but just scratches the surface, but I prefer to see this kind of content come out of Microsoft . Don’t get me wrong, the other stuff that’s product based is great too (and much needed) but seeing Agile and Pattern sessions (even if they are high level) is a good thing. If you get a chance to drop by the Patterns and Practices guys, please do. They do good work.

    Jim is full time on CodePlex and it’s growing like gangbusters, even if it hasn’t been fully released for primetime yet by Microsoft (but they’re getting there). There are some great things happening with CodePlex so time will tell as the story unfolds and we see more good stuff from the team. It was however, a discussion with Jim that led to meeting Korby Parnell, one of the key guys behind CodePlex. In discussions with Korby, Lawrence Liu, Chad Hower, and others there are some adjustments I’m making in the SharePoint Forums project.

    Korby and CodePlex

    First off, I’m moving to a scheduled monthly iteration. I’m still a one-man team (but don’t intend to keep it that way) but want to follow a regular schedule. Monthly iterations sounds good from a management perspective and they’ll be enough time to work on each release and get features baked in that are value-added.

    The first of the new features that arose out of discussions Tuesday is anonymous support. Currently all users have to be a member of a SharePoint site which is great for intranets, but if you want to host SharePoint Forums on an internet facing site, it just doesn’t works (to be honest, I don’t know what it will do yet so I have to see but I’m pretty sure it won’t work). In any case, I’m going to do some specific things around anonymous support. If a user hits the site and is anonymous, then they can get read access (configurable as to what access they have). Once they want to post they’ll need to be signed in so if they’re not, they’ll be whisked away to a new login/register page. Again, it’s up to you how much access they get on sign up so they can post or you can set it so they have to be approved first before their word can be heard. This will all be configurable per forum so you can have some forums open, some slightly locked down, and others completely verbotten to internet users. Also extranet users will look just like internet ones as far as the forums go, just behind the scenes we’ll store more info because right now users information (display name, email, etc.) is all coming from SharePoint. The forums only store the SharePoint ID for a lookup so this will change. Again, the forums are polymorphic in design so once a new version goes out, the lists will automatically be upgraded and transformed. There’s no data migration you’ll have to do. I think this is the best of both worlds.

    The next thing is the introduction of an question/answer system. Currently with a message you can reply (or quote) and the message just shows up in the thread. For each forum, you’ll be able to flip a flag that turns it into a question/answer forum. This means that an additional link will appear next to the reply button called “Answer”. An answer is a reply, but just has different characteristics. As the thread owner, you’ll be able to look through the answers and click on a new button called “Accept” (which will be next to “Edit”). This will allow you to accept an answer as correct and give us a bit of ranking/rating system (for example you can get a list of threads with questions that are “unanswered”). Think of a system like Experts Exchange and you’ll get the idea.

    I’ll be putting these in as work items on the CodePlex site and adding a few new releases to the release schedule for the next few months. There are additional features planned and actively being worked on so check out the release roadmap for more information. Speaking of the forums, I spent an exhausting 15 minutes yesterday porting the Web Part over to 2007 and have it running in my VM. If you’re in the TLC, drop by and take a look. There are some bugs due to deprecated features I’m using so I have to switch some controls over to their ASP.NET 2.0 counterparts, but it looks pretty good. Expect a 2007 version in the August drop.

    Last night I was the recipient of the “Win a Date with Fitz” contest. Okay, there wasn’t a contest but it sounded good. Fitz and I headed out to see Dweezil Zappa and his band doing his Frank’s music in a show called “Zappa does Zappa”. Let me say that while I’m not a huge Zappa fan, I’m all for good music and yeah, this was good. Wait. Correct that. It was fantastic. Even better. It kicked any tech gadget I’ve seen so far (even the Sony Vaio and that’s saying a lot coming from me).

    There are two truths to the world that I’ve come to learn. In every city, anywhere I go, there are two things that stand out. In Boston last night I discovered both of them. First, cabbies generally do not know where anything is. We hopped into the cab and told him we were going to the Orpheum. Blank stare. Okay, maybe he’s heard of it but not sure what we’re referring to (or something like it). A few more minutes of prodding and coaxing and he still didn’t get it. We told him the area it was in because hey, we’re strangers in a strange land and if we knew where it was we would be driving. Still nothing. Finally Fitz slogged out the Crackberry and looked it up (I’m sure he was using Google but I didn’t want to intrude). He called out the address. Still nothing.

    Some neuron must have fired in the cabbies head as he just started driving and well, we eventually got there. I don’t know how but the cab came to a stop and apparently it was nearby (although we still couldn’t see it). No biggie. We hopped out and figured if we can’t find it, we’ll ask (men are not afraid to ask for directions to a concert, we just won’t do it in a car at a gas station). Luckily it was down at the end of alley so we’re good to go.

    Oh yeah, the other truth. Bostonians wait until the last possible moment and *then* walk out in front of you. I watched two different occasions last night on the way to the Orpheum where someone would walk to the curb, wait, then when the light was red and cars were coming they decided to walk out. I’ve seen this happen other days as well so it must be true, as I now have 2 or 3 data points. Maybe it’s a Boston thing?

    Anyways, we needed to grab some food before the concert and that’s when the fun began (actually it began when Fitz was googling the location but the real fun was just around the corner).

    On the way to the substinance we happened along the alley where some bicycle cops have subdued someone and had them face planted on the sidewalk. Boston’s finest had just pulled up and was going to escort our friend to a nightly stay with them. There was opportunity for us to add insult to injury and perhaps accidently swipe the poor fellows head with Fitz’s boot, but we’re geeks and the passive type. Too bad I didn’t have the camera with me.

    So yes, the music. Oh the music. It was loud, and great, and never ended. Steve Vai showed up and joined in the fun with a guitar solo the likes I’ve never seen before. 2 hours into the set it wound down as things finished up, but then it was the encore. Which lasted an entire hour. The encore was a series of solos, the sax player belting out someting that Lisa Simpson would be proud of, and duets between Dweezil and Steve finished up by a killer drum solo.


    So that was yesterday, this is today and I’m back in the TLC with some sessions today, lots of talking, and more parties. The fun never stops in Boston.

  • TechEd 2006 - Day 3 - Scott Cate, Hardware Pimp

    I’m just sitting with the CodePlex guys at TechEd and Scott Cate from came over and dropped a bombshell on us. He pulled out a Sony Vaio UX50 that came in from Japan. This thing kicks the llama’s ass, and then some.

    Scott and his (borrowed) Vaio

    Check out the specs on this bad boy… 1/2GB of RAM, 30GB drive, a killer video card (Scott was playing his video of his sailboat at PDC), plugs into a monitor and keyboard so you can use it as a desktop. The list goes on. There’s also going to be a hardware upgrade so you can replace the 30GB drive with a solid state one. Our mouths were drooling over this one.

    This thing rocks and I don’t know about you but I’m getting one asap. I mean, anything that I can fit in the palm of my hand (or Scott’s) and has this much power… why would I bother with my Compaq R4000 laptop? Twice the power at a quarter the size and the same cost?

    The Sony Vaio UX50

  • TechEd 2006 - Day 2 - Too much lobster, not enough cabs

    Today was pretty busy and I really don’t have time to get into a long diatribe about the events of the day so I thought I would share a photo journal of some of the highlights. The day started out okay, and the crowds filled up fast. Although it’s odd there were more people going down than going up? What does that say for the conference? More stuff happening on the bottom floor? A deadly gas in the lower levels that cause less people to use escalators? Can’t say the traffic was the same by the end of the evening.

    Loaded elevators

    Carl Franklin and co. put on their live broadcast of .NET Rocks today with the guys from Team System who put the Database version together.

    Visual Studio Database Edition

    Here Carl is hacking into the sound system because, well, he’s Carl.

    Carl hacks in

    Of course what’s a photo blog without Fitz as he does his best Blue Man Group impression and blends into the background during one of his chalk talks.

    Fitz and the bluescreen effect

    We had an MVP dinner at a place called Anthony’s. Great food, great company, but they seem to have a very strict way of serving. For instance they wouldn’t let someone have a hand towel who didn’t have the lobster, even though it was available. Anyways, here’s Jim from Microsoft who’ll be presenting later this week. Evil looking, but he’s a PM on SharePoint so what do you expect?

    Jim gets caught off guard

    Todd Bleeker. International Man of Mystery. What can I say? A crazy man at the podium (some say even crazier than me).

    Todd Bleeker, crazy man on the podium

    Todd Bleeker, the man with a plan.

    Later that night at the dinner he had the same expression on his face, but I just couldn’t resist snapping his pic. Nice expression lobster boy!

    Todd Bleeker, lobster boy

    This photo blog was brought to you by the letters W, S, and S and the number 3.

  • TechEd 2006 - Day 2 - Learn, Lather, Rinse, Repeat

    The morning was odd as there were little bags with newspapers in them on our hotel room door. Wonder if it’s a cult thing or something?

    Bagged newspapers

    Well, we made it the first day but today is the crunch. I’m just hanging in the TLC area for Office after stopping briefly in a couple of sessions (I seemed to be the only ScrumMaster at Peter Provosts’ Adopting Agile in the Enterprise talk). I’ll here my SharePoint Forums up and running on Office 2007 and there are a few people that wanted to see it so stop by and grab me if I have it ready. Had a quick breakfast with AC (god that boy can eat) and met Heather Solomon for the first time (Hi Heather!). So many more people to meet, so little time.

    P.S. Yeah, AC I lied about posting your pic on my blog. Get over it.

    Andrew Connell and breakfast

    My laptop seems to be acting up with my mouse flying all over the place. I’m looking for a place in Boston to pick up one of the new Microsoft Laser mice (with the zoom feature button which is great for presentations) so if anyone knows where I can get one (they only have some craptastic travel mouse at the conference store) let me know.

    The Office TLC at TechEd 2006

    Back later with some goings on about the chalk talks here on SharePoint and what’s happening. I’ll be in the TLC (officially) between 5–9 PM today but wandering around between then, so drop by and we’ll do SharePoint finger puppets.

    BTW, I am uploading the 8,000 photos I’m taking at the conference on my Flickr site. All of the TechEd ones are tagged with “teched2006” and in a TechEd set here. Feel free to comment, link to, and otherwise hammer the Flickr folks.

  • TechEd 2006 - Day 42 - Death, where is thy sting?

    It’s 6 AM. Breakfast is in an hour. I have to go in and do some validation on the hands on labs (and get familiar with them myself).

    My eyelids hurt.

    The Lenox Hotel

    Good morning, starshine, the earth says hello.

  • TechEd 2006 - Day 1 - First Schwag!

    Or is it first swag? It’s like the debate between “gif” and “jif”. Anyways, if you’re at TechEd you know all about the goods. You get it the moment you register and the junk you have to take home with you just never stops flowing.

    If you’re thinking “Well, it’s all cool but I’ll never use any of this stuff” you might want to take a closer look at what you actually get. There are some pretty neat things you should be aware of with your TechEd backpack.

    First swag!

    First there’s the backpack itself. Well, maybe not a backpack in the traditional sense. It’s more like a back-laptop-pack, crossing over some middle ground between geeky bag to hold swag and man-purse. In any case, it’s a good thing and if you don’t have a bag to haul around your goodies, you do now.

    Next are the DVDs. You get:

    • Visual Studio 2005 Professional 90–Day Trial Edition – This isn’t just VS2005 but the DVD also contains the client tools for Visual Studio Team System as well as some resources like developer tools (Compuware, Crystal Reports, Dotfuscator) and controls and components (CodeRush, Infragistics, ComponentOne, Dundas). Handy if you’re looking to not re-invent the wheel.
    • Windows Server Code Name “Longhorn” – Again, the MS Marketing engine is confusing us as we have grown up with “Longhorn” being what became “Vista”. However the next version of Windows Server 2003 is called Longhorn so be it. This contains a bootable DVD of the 32–bit x86 edition of Beta 2.
    • Micrsosoft Windows 64–bit Resource DVD – This contains all kinds of white papers, case studies, training videos, and source code for you 64–bit crazies out there.
    • Office 2007 Beta 2 – In case you missed downloading it (or couldn’t sit through the download times) this DVD set has all the clients and servers for Office 2007. Just install and get going on the next generation of Office.
    • The Cool Way to Power Your Enterprise – This is an AMD disc with a bunch of white papers and video presentations on why AMD is so good. I do run an AMD laptop and all my desktops are AMD so is it good? YMMV.
    • Sysinternals Video Library – These guys make the coolest toys so sit back and enjoy a set of video tutorials from the guys that wrote all those tools.
    • Windows Vista – As you might have seen recently in the blog-o-sphere, the public beta of Vista went out. Here it is in DVD format if you need a copy.
    • Virtual Servers – MS is all about virtualization these days so this contains lots of goodies (including the very free Virtual Server R2) for you virtual geeks
    • Secure Messaging Evaluation Kit – This DVD contains a whack of stuff for you security freaks and covers Antigen (including a trial for use with SMTP and Exchange), ISA Server, and lots of presentations and documents on building, configuring, and securing a DMZ.
    • How Microsoft does IT – If you have checked out various webcasts and white papers on how Microsoft runs it’s own IT department, then you might want to look at this DVD. It contains all that plus new material with Best Practices and Case Studies on how it all fits together. Handy as I’m sure your own IT department will be much smaller than Microsofts and it’s good to know you’re not trying to do something that’s impossible.
    • Office SharePoint Server 2007 Technical Resource DVD – SharePoint is so damn huge that it has it’s own resource DVD. This puppy has everything you want to know about SharePoint 2007 and even contains a very cool VPC all setup and ready to go. Just extract it and run Virtual PC (eval copy included on disc) or Virtual Server R2 (free on the other disc above) and you’re off to the races. You’ll have a completely configured stand-alone server with your own Active Directory, SharePoint Server, Office 2007 client and all the various accounts to use it. Not only that, there are a set of labs and walkthroughs that get you introduced to the various concepts of SharePoint 2007 like the Business Data Catalog, Workflow, Content Types, and more. All goodness.

    On top of the DVD/CDs you also get a stack of books and papers. Most people regard these as filler but have you ever read any of them? Here’s some of the highlights of the good stuff here (and things you need to act on in order to cash in on bringing the goodies home with you):

    • Conference Expo Guide – Okay, most people don’t bother with this but there are some good things in here like “when are you getting the conference DVDs” and “where the heck are the bathrooms?”. Your TechEd survival depends on it.
    • TechEd notepad – No, this isn’t a “special edition” of our favorite notepad.exe (which I’m still waiting for my Notepad MVP award!) but just a blank pad for you to scribble junk down like (short) urls, girls phone numbers (there are some geek girls wandering around, really), and other useless stuff if you’re not the type that brought a laptop.
    • System Center Essentials 2007 – Fill out the card and drop it in the Essentials 2007 booth in the Technical Learning Centre (TLC) to win a free Xbox 360.
    • MVP – There’s changes happening in the MVP program like the recent “nominate a MVP” update they’ve done to the site. You can go online and nominate someone yourself so if there’s someone in the community that you think should be an MVP and isn’t, here’s your chance.
    • Altiris – Stop by booth #316 and get a free sports umbrella (and enter for a chance to win a $500 gift certificate)
    • MSDN Magazine – You get a free copy of the June 2006 edition of MSDN magazine with a pretty good article on MSBuild and a sampler CD of the Chart FX tools from
    • Microsoft Business Intelligence – Check out the Business Intelligence TLC to snag an ugly orange bracelet. It’s ugly but you could win a Plantronics Voyager 510–USB headset (although I think I should win one for writing this crap)
    • Symantec – Fill out the card and drop it off at booth #109 for a chance to win a portable Garmin GPS unit.
    • In addition, check some of the other papers and flyers as most of them tell you to check out their booth and want you to present that paper to get some extra swag.

    Whew. That’s a lot of swag and we’re just on the first day.

    Finally I noticed that someone at the show had a sense of humor, but if you don’t get it don’t worry. You need to be at a certain geek level (almost attaining nerd status) for it to be funny.

    All your cart are belong to us

  • TechEd 2006 - Day 1 - It's alive!

    9:49 AM. July 11. 2006.

    Remember that date. It’s not only the start of TechEd 2006, but the birth of our very first Bacteria Farm.

    Yup, this morning we decided to start up the Bacteria Farm and see what we can grow over the next 5 or 6 days. Of course, creating the cultures were a challenge unto themselves. The instructions were simple and even a child could understand them. Boil some water, create a glucose solution, and seed it with some bacteria.

    That was the first problem. In a hotel room, boiling water isn’t that easy. So we started looking around the room for stuff we could do. After all, they provided us with water (at $4.50 a bottle) so that was taken care of. The problem was boiling it, as the hotel doesn’t regularily provide it’s guests with hot plates or kettles (some kind of fire regulation thing).

    We started looking around to room to build a make-shift cultivator. We had a steam iron and ironing board. We had glasses. We had water. Now we’re talking.

    It was all very MacGuyver like which was cool and made me want to create an explosive device out of left over computer parts (or a birth control device out of a MP3 player and a toaster). The problem is that it would have taken about 3000 years to get up enough boiled water in order to mix the glucose together. In the end we just used the hot water from the tap which was pretty hot. Yeah, not entirely scientific but it’s not like we’re growing ebola here (well, time will tell).

    The bacteria is alive!

    Next was the actual mixture. Being the typical developers we are, we didn’t RTFM so we tossed a small packet of glucose mixture (btw, this would have never got past the dogs at the airport) into a small glass of hot water. It seemed to turn out thick. Very thick. Thicker than the Boston accent here. After realizing that we were only supposed to use 1/4 of the packet, the water began to flow. And flow. And flow. And flow.

    About a half hour later, we had some kind of base that we could add bacteria to. It’s been about 4 hours since creating the base so now I’ve added the actual bacteria to the petri dishes, as per the very helpful instructions. They say to go find bacteria in various places like dog fur and sheeps bladders, however I just don’t have any of those in Boston (if anyone knows of a handy place to get sheeps bladders let me know). So I filled the dishes with various things around the room. Here’s the rundown on our Bacteria Farm:

    • Petri 1 (top left) – My mouth
    • Petri 2 (top right) – My left shoe after walking around TechEd and Boston Harbor all day (and some kind of goo that I wiped off of Hanselman)
    • Petri 3 (middle) – The base of the toilet at the Lenox
    • Petri 4 (bottom left) – Inside the sink drain at the Lenox
    • Petri 5 (bottom right) – The window sill outside our room at the Lenox

    God. So much news to report and so little time (in a very Willy Wonka like fashion). Scoble is leaving Microsoft which is being touted as the biggest mistake Microsoft made (although some wonder if he did anything to improve it). I had dinner with John Lam, Scott Hanselman, Bill Evjen, and others and we talked about everything (mostly the type of planes that were roaring over our heads). John has put the Ruby seed in my head (curse you John!) and I’m going to give it a shot. Who knows? Ruby? SharePoint? Might make for an interesting (and perhaps powerful) combo.

    Scott and Bill

    The morning was spent at an MVP Event with our good friend Sean O’Drisco (the head of the MVP program) and just talking about the evolution of things. Fun and informative. Again it was great seeing new and old MVPs and I got a chance to talk to the InfoPath guy (sorry, can’t remember your name) and how SharePoint 2007 and InfoPath were going to rule the world. I’ll pass on a great tip later after I check it out in my VM which he told me about.

    Sean gives us the business

    A brief lunch, and I headed off to register at the event and get some orientation for tommorow. I’m spending the majority of TechEd at the Office Technical Learning Center. This is like an uber Ask the Experts booth, but with Hands on Labs, chalk talks, white boards, comfy couches, and small (20–25 people) theatre presentations. All great stuff and I hope to demo and talk about lots of 2007 stuff. Drop by and say hi if you’re down here as I’ll be pimping the MS warez with AC, Woody, and others.

    Technical Learning Center

    I’ll be back later with news from the floor on TechEd and what’s going on, TechEd swag (or is it schwag? what’s the official term?), and other goodies. I’ll also be posting my TechEd schedule, my BOF session on Thursday, and whatever else I can spit out between now and tommorow.

    Nothing like living vicariously through a silly MVP at TechEd huh?

  • TechEd 2006 - Day 1 - Let the bacteria begin!

    So it’s TechEd and here we are in Boston. We went out and grabbed some food last night at Bertucci’s, a local brick oven delight (hey, any Italian restaurant that has a website is aces in my books). Absolutely great food and walking distance to the hotel. While walking there we passed by Trinity Church, the Boston Public Library, and a few other churches that look like they were built sometime around the creation of man. Incredible architecture so I’m going to be snapping a lot of pics this week.


    The hotel is awesome and on the TechEd circuit so we’ll be able to grab a bus anytime. We’ll see how the buses go. At PDC they were great, and ran all the time so hopefully thing will go as smoothly. The Lenox hotel looks great and is a good size with free WiFi (take that airports!). We do have two beds as James decided it wasn’t going to be Planes, Trains, Automobiles for us. It’s a good view out the west window and the weather has cleared up this morning from the rain we had last night.

    TechEd - The Hotel Room

    Finally today is the first day of our bacteria experiment. I was in a store at the Minneapolis airport and spotted the oddest thing. Bacteria Farm! It’s a kit you can grow bacteria (complete with it’s petri dishes) and Jo-Jo the dog faced boy who sports the cover was just calling out for me. I think it was the American Gothic flavour it had on the box with Jo-Jo holding his pitchfork dressed in overalls that did it for me. I’m just hoping James and I don’t look like Jo-Jo by the end of the week and the completion of the experiment. Watch for bacteria updates all week long, as we now have a purpose here in Boston.

    Bacteria Farm!

    As for the bacteria itself, they’re just so darn incredibly cute. Like those cute Sea Monkey ads from the comics in the 70s, these critters are just so cuddly (even if they are 0.0001 inches in size). Look at them? How can you not love these guys, even if they will kill a 180 pound man (or water buffalo) in 120 seconds.

    Bacteria people

  • TechEd 2006 - Day 0 - Fire in the hole!

    Well, here we are off to TechEd 2006. I’m traveling with James Kovacs and we’re splitting a room at the Lenox Hotel here in Boston, so it’s all good.

    Is it a Minneapolis thing or what? There were dozens of Amish people on the plane which was odd to me (not hanging out with the Amish very often). Didn’t matter to us since it wasn’t like they were looking for us to seed the community or anything, I just thought the whole Amish/Mennonite thing generally avoided technology. Just shows how ignorant I am about the world.

    As we flew into Minneapolis we passed over a fairly large plume of smoke with a grass fire or something fueling it. Hey, when you’re geeks at 30,000 feet any excitement is fun. Although the picture doesn’t look that terrifying, it certainly was more impressive when we went over it.

    Grass fire

    As we were deplaning at the airport, they announced that walking sticks were available as we left. Cool. James and I looked at each other and thought “free stuff!” as we leave. Way to go Northwest. Unfortunately no, they didn’t have any walking sticks for us. We’re landing in Minneapolis and then doing a 4 hour stop over to Boston. Of course, as geek-luck would have it we’re re-planing in concourse F10. I would have personally preferred the F1 concourse as I think they would have been more helpful, but at least there’s power here to plug in while I drain my laptop battery.


    I’m always fascinated by the oddities there are at airports. Like why would an airport have a dry cleaners? Are people that desperate and have that much time on their hands to really get laundry done while traveling? The Minneapolis airport is no exception as there were a couple of things I haven’t seen before. One was a phone charger which I thought was cool and it supported almost every type of phone. The problem is the 15 minute wait for the “turbo charge” service. The other one was a little odd. It offered scratch and win lottery tickets. Yup. Drop a buck in the machine and get a lottery ticket. My brain just doesn’t get it and I look at this as a poor mans VLT. Guess walking over to the magazine rack isn’t good enough for some people.

    Scratch 'n' Go

    Of course I’m grumbling that there’s no free Wifi. Scratch and win dispensing machines, but not Wifi. Is there somebody we can contact and tell them how much we’ll love and cherish them if they just tossed us a frickin’ bone and gave us a connection to check our mail? What’s even worse is that these pay hot spots (like the one here) charge $6.95 for the day. Okay, that’s not too expensive and works for me but since we’re only here for a couple of hours, it’s not $6.95 per day, it’s $6.95 per hour (more or less). I don’t see anyone who would hang around an airport all day long and if they did, then Wifi is the last thing they probably need.

    Well, as long as there’s no free Wifi at airports I’ll continue to gripe and bitch about it.

  • TechEd 2006 - Day 0 - If I was a passport, where would I be?

    Well, it’s less than 10 hours before I plane (the opposite of deplane) for Boston and TechEd 2006. It took an hour to gather up the stuff seen below. About 10 minutes to gather up the tech stuff we need for the trip, the other 50 minutes were looking for the elusive passport.

    TechEd, here we come

    Here’s the rundown on the gear I’m taking this trip:

    • Compaq Presario laptop for demos and whatnot (catch me sometime to demo the SharePoint Forums Web Part running on Office 2007)
    • Watch (because I can never tell what time it is)
    • Cell phone (because I can never remember to bring my watch)
    • 1 256MB Kingston USB key
    • 1 64MB Kingston USB key
    • 1 1GB SanDisk USB key
    • 1 2GB SanDisk USB key
    • Microsoft wireless mouse (for the laptop because the TouchPad doesn’t always work)
    • Dell wired mouse (just in case the batteries die in the wireless mouse because you can’t turn it off)
    • Sony DVD Camcorder (my better half will kill me if I lose this)
    • 1 MVP Backpack for goodies
    • 1 MVP Laptop case for the laptop
    • 1 Sony PSP to keep myself busy between the wee hours of the morning
    • 1 Creative Web Cam for video conferencing with home
    • MSDN DVDs just in case I need to do an install
    • 1 250GB Iomega external drive (holds source code, VMs, porn, MP3s, etc.)
    • 1 80GB Iomega external drive (backup for various stuff)
    • 1 TD Canada Trust Visa card (for hookers or laptops or whatever cool stuff I can buy down there)
    • 1 CIBS Aerogold card (to pay off the TD Visa card)
    • 1 Linksys router (so we can share the pain in the hotel)
    • Various badge holders and clips as they always come in handy
    • Various PSP games to keep me occupied (Katamari, Liberty City Stories, Burnout Revenge, etc.). Couldn’t fit the XBox 360 in the suitcase.
    • Power supplies and more cables than you need to hook up and run everything

    I just wish that Jimmy Nilssons book Applying Domain-Driven Design and Patterns : With Examples in C# and .NET had come in from Amazon so I would have something to read, but my PSP and James’ company should keep me happy.

    Yeah, there’s a little room for my spiderman under-roos and a couple of shirts and pants, but that’s about it.

  • Hello, MS Marketing... what are you smoking?

    Whatever it is I want some. Fast. Before you change another name.

    Okay, awhile ago MS introduced us to a couple of cool cats. Indigo and Avalon. Just like naming your mail server Hermes and your primary domain controller Zeus, it’s cool (as in geek cool, not something you can pick up women with). Indigo. Avalon. Nice.

    No, they don’t tell me what they are or what they do, but then Windows Professional 2000 didn’t either (and neither did Microsoft Bob for that matter). I am however still waiting for Windows 2000 Amateur Edition.

    However they sound, they sound good. They look good on a slide deck. And they’re easy to remember. After all, developers can only remember two things.

    So what’s the latest trend? What’s all the bruhaha now?

    Those cool code-names that we liked and could remember became the Windows Presentation Foundation (WPF) and Windows Communication Foundation (WCF) and Windows Workflow (WF). And to make it easier to write (and remember) they were all packaged together into something called WinFX. Great, WinFx. I can remember that and it certainly fits on the slide. No problem.

    Oh but wait, WinFX isn’t right. It doesn’t describe what it really should be and we need something better. So WinFX is now known as… The .NET Framework 3.0



    Right, I get it. The current 2.0 framework is going away and a 3.0 framework that has a million other things in it (WPF, WCF, etc.) will replace it. Makes sense. 1.0 begat 1.1 which begat 2.0 which begat 3.0. I could live with that.

    But alas, no.

    The newly renamed .NET Framework 3.0 contains the (current) 2.0 CLR (which we call the .NET Framework today and have been since 1.0 days). The rename is to make the technology be named after what it represents, the next version of the developer framework.

    Ummmm, yeah. There is a good blog that discusses and outlines it for those that are still scratching your heads. Check it out here. Personally it’s downright confusing. Yes, they’re all code names and code names (like Longhorn which begat Vista) are meant to be fleeting but this last change is just plain odd.

    The current framework (can I even call it that now?) installs in the C:\WINDIR\Microsoft.NET\Framework\v2.0.50727 (or v1.14322) directory. So they’ll be a new “framework” installed under here in a “v3.0.1024” directory? But if the 2.0 CLR is part of the 3.0 framework and it’s in a different folder and you can’t be in two places at the same time…

    Oh god. I think my head just exploded.

    I’m with Sam on this and think that Microsoft marketers (or whoever is responsible for this and thinks it’s a good thing) have lost it. My next book is going to be called “Tips and Tricks of the .NET Framework 3.0 Gurus Featuring That Old 2.0 Framework That Has Been Around For Many Years Now”.

  • MSDN Wiki launches

    Hey guys, what has MSDN not been the past few years? Yes, it's a tree view of 100,000 million documents, SDKs, etc. that is all searchable and great but it's been missing something like say .. has.

    Microsoft stepped up and has publicly launched the MSDN Wiki!

    The MSDN Wiki site experiments with ways that Microsoft can integrate community contributions into the Visual Studio 2005 and .NET Framework 2.0 documentation. This is only phase one and there's more to come. On the site you can add content and edit other people’s contributions in a wiki-like fashion around the official Microsoft-authored docs. In the future Microsoft wants to take this further by allowing people to edit the Microsoft-authored docs directly.

    Check it out and let the guys in the MSDN Wiki Connect Workspace know what you think!

  • Calgary Code Camp Slides, here comes TechEd...

    As I’m screaming through the 101,000 things I need to get done before TechEd (we leave Saturday) I’m just (finally) getting the Code Camp materials online. Sorry about the delay. You can grab the two slide decks here:

    I once caught one this big

    I had to go commando (of sorts) when I did my presentations so it was Notepad++ all the way. I was in the middle of moving from Office 2003 to Office 2007 and uninstalled everything. The morning of the Code Camp I wondered why my .PPT files were not showing that familiar Office icon.

    Silly rabbit.

    I had uninstalled Office. So I was left without a way to run my slides (not that I really like putting too much into the slides anyways).

    The 20 Cool Tools presentation was fun as we ripped through as many tools and demos as we could (and that would work). The deck has each tool listed with a URL to get a copy. It’s actually 21 tools as I stumbled over Red Gate Softwares SQL Prompt which just kicks ass so I had to include that. BTW, it’s free until September 1st so go grab a copy now!

    Code Camp Setup

    I’m still cleaning up the Web Part and Master Page demo so that’ll go up in another post later tonight. It was all good in the end but here are the slides if you’re interested.

    After that, we go through the vast array of electronic inventory that I’m bringing to TechEd and start a 7 day series of blogs. Watch for the starter tommorow as I kick off with my itinerary, where I’ll be, how to contact me, what I’m going to be blogging about, and some extra special things that I’ve never done before (watch out Scoble!).

    It’s going to be a busy week.

  • Simple NAnt integration with Visual Studio

    Generally I use the most excellent TestDriven.NET for my building in Visual Studio as it can run tests and identify failed tests (with a context to jump to the error). Often though I have a setup (usually with a client) where they don't have the ability to run this addin or just want to build their systems and don't have unit tests (yes, it does happen, oh horrors of horrors). Also TestDriven.NET won't build an entire system and do additional stuff like maybe copying files for deployment, running database scripts for agile database development, etc. so you look to something more complete to automate the process.

    The key thing about building systems when you have multiple team members is to have everyone build the same thing. We want to avoid the "it works on my machine" syndrome. This can be a problem though when someone goes off and tweaks some personal setting, or only builds part of the solution and forgets steps if the build is complicated. For the most part it's as simple as Ctrl+Shift+B, but sometimes that's not enough.

    That's where NAnt comes in. JP Boodhoo has an excellent series of blog posts on automating your builds with NAnt in his NAnt Starter Series (I highly recommend JP's blog in any case as it just plain rocks) but I wanted  to pass on a quick tip for those of us that want to get our feet wet, but don't want to leave the comfort of the Ctrl+Shift+B world.

    If you've followed his series or have your own simple build file that you want everyone to use here's a super-simple way to make it your default build tool:

    1. Create a new External Tool by going to Tools | External Tools
    2. Click Add to add a new tool
    3. Give it a title of "NAnt"
    4. Browse to the location of the NAnt.exe file wherever you have it downloaded to
    5. Set the initial directory to $(SolutionDir) (where your .build file resides)
    6. Click on "Use Output Window"
    7. Click OK
    8. In the external tools menu, select NAnt and move it up to the top so it's the first tool (we'll see why later)

    Now override the default keybinding of Ctrl+Shift+B to run this. Here's how:

    1. Go to the Options dialog by going to Tools | Options
    2. Under the Environment node in the tree click on Keyboard
    3. Find the command called "Tools.ExternalCommand1" by entering it the "Show commands containing:" text box or scrolling through the list
    4. Click on the "Press shortcut key(s):" text box
    5. Press Ctrl+Shift+B
    6. You'll see it's already assigned to the "Build.BuildSolution" command but click on the "Assign" button to reassign it
    7. Click OK to close the dialog.

    Now, armed with your .build file in your solution directory press Ctrl+Shift+B and it will open up the Output window, run NAnt (which will run the .build file automagically) and output the results to your window. Grant you, if the build fails it won't highlight the error and let you click on it to go to the file but at least the build will run automatically and everyone will be on the same page.

    If you have any additional steps that would be done as a result of the build (running unit tests, copying files, etc.) you can just edit the .build file (hint: make it a solution item and put it under source control as it's no different than code) and rebuild. All the steps will happen and everyone in the team will be running the same sequence of events when they build the solution.

    These instructions are for VS2003 but VS2005 works the same.

  • Performance fix for SharePoint Forums

    Okay, I’m human and prone to mistakes. I did a silly error when I released my SharePoint Forums Web Part in dynamically calculating post counts. I thought I was being smart by just using the value of the collection objects, trouble is that they’re all lazy loaded so when something like the stats come up for the site, every freakin’ message in the system gets loaded into memory.

    Simple fix and will be included in the next release. For those of you with a few hundred messages (and growing) you’ll find a huge difference. I test filled the system with 100,000 messages (yes, you can do that in SharePoint lists if you do it right) and load times are back to under 1 second, which is where they should be.

    Probably too many Fritos and Mountain Dew that night for this code monkey.

  • Adobe, give yer head a shake

    I really don’t want to be Bill Gates.

    Yeah, you heard right.

    Even with a trillion dollars in my bank account and enough money to buy Belgium I just really wouldn’t want to be him. There’s just so much crap going on in the Microsoft world, I sometimes wonder how he sleeps at night (on a mattress filled with BillBucks?).

    Yes, yes. Microsoft is evil and all that DOJ jazz, blah, blah, blah, blah, blah and they have to tread carefully when embedding things into operating systems and everyone cries foul when something comes out that’s apparently unique but has really been around for years. However this Adobe thing is just silly.

    Last October when were were at the MVP Summit, Steve Sinofsky (he’s really a nice guy despite 2,000 people at a TechEd presentation walking out on him) dropped the bomb and told us Office 2007 (then Office 12) would support saving PDF formats. Out of the box. And told us to go blog about it. There was much rejoicing.

    That was October. This is now.

    According to CNET (which we all know how much of a technical resource for news it is) Adobe pipes up and cries foul and says that MS has to remove the saving as PDF feature or else bad things will happen (we’re not sure what those bad things are, but I’m sure they would be more court days and mudslinging).

    It’s all very confusing. Joe Wilcox wrote up a good take at Microsoft Monitor on what was reality compared to the various claims being tossed around the media circuit. Brian Jones, a PM on the Office team, has a writeup on what’s going on from his side of the fence. There’s a Channel 9 interview with the Office team developer who created the feature (from back in January). Heck, even Scoble got his say on things (which doesn’t surprise me as that blogging machine doesn’t seem to sleep).

    News travels fast. And wide.

    So what’s with Adobe. Is PDF open or not? According to Adobe it is since they have the PDF Specification online (and have had for awhile). If it’s online and Adobe says “Adobe publishes the PDF specification to foster the creation of an ecosystem around the PDF format.” then why are they bitching about Microsoft releasing a product supporting this “ecosystem”. More importantly, why does Adobe wants MS to charge their customers extra BillBucks for this feature.

    Not only do Word Perfect (sorry, I refuse to call it Word Perfect Office) and OpenOffice support this and have a PDF feature, there are gobs of free PDF tools out there all producing Adobes much touted “open” file format (and some that plug into Microsoft Office).

    That’s pretty open from where I sit.

    At least it looks like MS is going to play nice and remove the feature but offer it as a free download. That’s a bummer because I keep stumbling over Office workers and users who have no idea there’s a thing called the “interweb” out there, let alone downloading an add-on and installing it. Hopefully the IT guys of the world will download it and make it part of their corporate images or something so at least the untechs who know not of this thing called the internet (or is it the Internet? I can’t never be sure) will have their precious PDF functionality (which should make at least the legal suits happy).

    Kinda sucks that one mega-corp goes off and tries to dictate what another mega-corp is charging their customers for. Like I said Adobe, give your head a shake and stop being such a pissant in the technical sandbox. Oh here’s how we made our sand so you can build your own sand castles if you want, but only if you’re not that big bully over there with the biggest sand castle machine of the whole beach. Sheesh.

    P.S. Bill, if you’re reading this (as I know you always keep up with my blog) then feel free to hire me as your personal SharePoint guru and all around code monkey. I would be quite fine with that too.

    P.P.S. Brian Jones has a second update (or maybe it’s a third) on the PDF legal issues here on his blog. Good read to round out this discussion.

  • Friday catch-up blogging

    I’m just going through a few hundred emails and RSS feeds as I do everyday and getting caught up (in addition to dusting off my workspace due to construction out back). I wanted to address a few things in the SharePoint Forums Web Part.

    First is performance. Some people have mentioned it’s taking a long time to load the pages when there are a lot of posts. I’m going to do some more tests this weekend and see what’s going on. When I first built it, I had a small routine to fill the forums with 10 posts in 100 topics in 10 forums, which I thought was a good test (10,000 messages). Load times were negligible (less than 5s) even on my VM so I thought this was acceptable. I’ll go back and revisit this and might have to do something different for the June 19th release.

    Second is deployment. I still get emails from people who are putting the files in the “web server extensions\bin” folder so obviously my instructions are not clear enough (or people are not reading). There are some that refuse to put my dll in the GAC which is fine (you can deploy that assembly to the bin folder if you want). And there are others that still have security problems. So I’m doing a couple of things to rectify this. First I’m going to recheck the impersonation code and run it on a portal with an account that absolutely has no permissions. I’ve done this before and it worked fine, but this time I’m going to set it up and screenshot/cast it so you’ll see the step-by-step which should help you configure it in your own environment. Second, I’m going to produce a special single-dll version of the code for the next release so you can just deploy the web part and not have to worry about where this file goes or do any ugly GAC stuff. Finally, I will get an installer working (and maybe take another stab at with the single assembly) but this probably won’t be ready for next release as I have too many things to do before now and then.

    As for the source code, it is going to be posted on CodePlex and no, I’m not hiding anything. I’m just trying to figure out how to get the silly thing up there without having to “upsize” my 2003 project to a 2005 one. I wish the command line would just do a “tf -import” or something but it keeps looking like I have to import every file AND associate every checkin with a package. Oh, how much I LOVE Team Foundation.

    And yes, I still need to post the Calgary Code Camp presentations and code. Watch for that this weekend.

  • Forum update coming after TechEd, CodeCamp code sooner

    Just trying to get ahead of the game here. There's a small update for the SharePoint Forums Web Part coming on June 19th (or so, after TechEd anyways) on the forums. Here's a sample:

    Additions are boxes to quotes (might make this configurable) so you can see them better, better navigation, and a few other goodies.

    Check out the Issue Tracker and Release Road Map to see what's going on.

    I'll be posting the code and slides for the Calgary Code Camp sessions. This includes a complete ASP.NET 2.0 site built during the presentation (I've cleaned up the layout so it doesn't look like a retard built it) and the tools list with some notes.

  • Project OneShot

    Yeah, at first I thought this was more spam for a new porn flick, but alas no. It’s a SharePoint Web Part from those whacky guys at Omnisys.

    If you can’t wait until Microsoft Office SharePoint Server (oh god why is it so long to type this?) 2007, then check this out. It allows getting a single view of all the details from multiple projects (on a Project Server) on a joint time scale.

    Are your legs all a jitter? Mine are.

    Well, no. Not really.

    Okay, so it looks like a pretty slick Web Part and something that’s missing OOTB from Microsoft. Omnisys always has quality stuff so if you’re into looking for something to supplement your Project Server, give it a shot. You can get all the information and download the Web Part from here.

    Man, I should get paid for this junk.

  • Calgary Code Camp, a huge success!

    We’re very happy with the turnout for yesterdays Calgary Code Camp. It was a first for us and yeah, we made mistakes but we had hoped for about 50 people but got around 80. With two tracks running, both rooms we filled well on each session and it seems everyone had fun. I’ll be posting slides and code from my sessions in a day or so after I recover from the event ;)

  • Calgary Code Camp, tommorow!

    Hey kids, it’s almost time for the first ever Calgary Code Camp! Tommorow morning, bright and early starting at 8AM at the 5 Calgary Downtown Suites Hotel we’re going out and doing it.

    I’m giving two presentations at the camp. First is a development session on using ASP.NET 2.0 Web Parts (not SharePoint), Master Pages, and Providers to build your own personal portals and web sites. Right after that I’ll be going through 20 essential .NET tools you can’t do without (20 tools in 75 minutes, that’s 3 minutes per tool plus startup and question time, pretty wild). There’s also plenty of cool presentations all day from John Bristowe, James Kovacs, Richard Campbell, Jean-Paul Boodhoo, and others. Be there or be square.

    There will also be lots of goodies as a couple of the sponsors have some givaways and baggies of stuff so be sure to show up to get yours (because what better way to spend a Saturday in Cowtown than to get free schwag and listen to geeks like us for the whole day?)

    After the camp the files for the presentation will be online on the site with code and slides for you to download.

  • SharePoint Forums Roadmap

    Things are rolling along with the SharePoint Forums Web Part and I’m just mowing through the current various work items. These are either features that I’ve had planned, bugs identified by users, or suggestions from the forums.

    The next release is scheduled for June 19 after I get back from TechEd. You can view the release roadmap for the next version here on CodePlex which will show the current work items assigned to this release. Currently there are 5 closed items (RSS feeds added, a couple of bugs fixed) and 2 being worked on (search and multi-language support). I’ll probably keep this pace of new releases every month until all the features get added that everyone wants.

    Serious work started on the 2007 version of the Forums for MOSS 2007. This will be delivered as a Feature that you’ll be able to make available to a site/farm/server/whatever. There are some nice things in 2007 that will help ease maintenence on the forums like better integration with security.

    Keep things coming by participating in the forums on CodePlex, tracking down bugs, and making suggestions for future improvement.

  • SharePoint Forums, the Domain Model

    Here's the Domain Model for the SharePoint Forums Code.


    This was built in VS2005, but there are some difficulties with the class diagram. All the collections are strongly typed, yet if you try to connect say a property called Messages (from the Topic class) to the MessagesCollection, the designer complains that it's a weakly typed collection. So in some cases it's an assocation, in others it's an association shown as a collection (when the designer decided that it was okay).

    The RepositoryRegistry is a class that handles access to all the Repository classes. The various domain entities (Forum, Topic, Category, Message) are shown with their associations. The Repository classes are access points for the Web Part class (not shown) to access the list data (through a data access service that lives in the Common assembly). The Mapper classes translate domain objects to list structures (and vice-versa). The ListBuilder (and various builders) along with the ListDirector implement the Builder pattern that create the lists (if needed) on startup.

    There are no SharePoint objects here (except a reference to the SPUser class in the ForumUser class through a property called UserDetails, which lets me not have to duplicate things like email addresses and display names) and everything SharePoint is either in the Web Part class or the Data Access Layer.

    There are a few base abstract classes or interfaces that could be added here (now that I look at the design from this viewpoint) like creating a base Mapper, Dao, and Repository class or interface.

    I haven't uploaded the code yet as I'm trying to figure out how to do this with Team Explorer. Team Explorer lives inside Visual Studio 2005. Unfortunately the forums are still a 1.1 project and I really don't want to create a fork just to upload the files to the server so trying to figure out the command line tools to check the code in to CodePlex.

    Feel free to comment on or ask questions about choices I made in the domain. It's pretty clean overall and well positioned for testing (there are about 80 unit tests in the system) as well as being loosely coupled and easy to add new features.

  • Delete and SharePoint Forums

    So I'm sitting with a quandry and figured I would solicit feedback.

    A long time ago, in an IDE far, far, away I added a ranking system to the SharePoint Forums Web Part. This is the typical ranking system you see on forums. New user joins forum, gets rank of "Newbie" and after some # of posts, becomes a "Member" (or "Journeyman" or "Apprentice" or [insert witty title here]). All is good in the world.

    Currently the Web Part tracks all the posts a user makes. It doesn't track where they make that post, just that they did. Hence if the ranking system was in place, after # number of posts you graduate from one title to the next. Titles are all configurable by the admin. Okay, so the ranking system isn't in the current version (it was pulled late in the game to simplify hunting down any problems the first release would have) but deleting posts affects it and that's where you come in.

    When you delete say a forum from the system (and all topics and a posts in each topic) you skew the numbers. Now the counts are thrown off. Say a user posts 100 messages in a single forum and the admin decides to blow that forum away. Now the user has 100 posts in his profile, but there are only 50 messages in the entire system (and nothing from that user because all his posts were in one forum which is now gone).

    So, is it worth the time/effort/bother to go through and update each users post count as each post is deleted (which can be time consuming) or does it matter that Jimmy has a post count that isn't indicitive of how many posts are in the system (i.e. some users might have higher post counts than the number of messages in the system).

    Like I said, looking for some feedback to determine how important delete is in the system. Feel free to leave comments here, post a message on the forums (I've started a thread here), or email me.


  • SharePoint Forums growing like wildfire

    Hey there. I just wanted to thank EVERYONE for the amazing support, feedback, and collaboration on the SharePoint Forums Web Part. I’m hoping it’s installed for everyone and working for you. I think it meets a need and I’ve got other projects in the oven that will do the same.

    There are a few emails here and there with problems, but mostly it’s people not following all the instructions completely. Again, I do apologize for not putting together a big dummies installer so people are getting a little lost with editing files they’ve never touched before. Feel free to berate me at TechEd (now sold out) later next month.

    As for popularity and growth, the project went onto CodePlex a week ago and has gone from zero to hero. It’s now #2 in activity (just behind the CodePlex project which everyone goes to for talking about the site, so I don’t expect to surpass that) and it’s #3 in popularity (just inches behind the Atlas toolkit, and already leaving MSBee and NUnitLite in the dust). How those numbers are calculated I don’t know but something must be happening (because I can only reload the page so many times a day).

    13,000 hits and 400 downloads. With 3,154,273 trillion (yeah, it’s a big number) installed SharePoint customers out there I suppose I have a way to go to get market share but hey, Rome wasn’t burned in a day you know.

    Keep on contributing and reporting. There’s plenty of docs online now for installing so next step is to start writing user type stuff. I may not be able to react with weekly iterations like the P&P guys, but I will keep the releases fresh with new features and bug fixes. There’s been some awesome feedback in the forums already and the next release is planned for June (probably going to move to after TechEd since I’ll be gone all that week being a Microsquishy monkey).

    There’s an RSS feed here from CodePlex that will give you updates to all changes on the site (wiki, releases, forum postings, etc.) so it’s a little chatty. Also I’ve created a new tag for posts here that will be aggregated to the News Feed tab on the CodePlex project. This is only for posts that concern the web part so if you’re subscribed to my regular feed, you’ll get it anyways.

    From here, it can only get better (and I’m just looking at the changes needed  now for the 2007 version which will be ready when MOSS 2007 ships later this year).

  • Feedburner

    Hi guys,

    If you’re subscribed to this blog (using the default RSS feed) can you please update your feeds to read from feedburner instead ( I can actually do better formatting, trimming, etc. as a provider of the feed to you and in the case this blog moves, you’ll always have the latest. Also if you’re consuming this feed on a mobile device, the feed coming from FeedBurner is much better formatted for that layout.


  • Keeping up with SharePoint development online

    This is way cool (and hot off the presses, thanks L!). As a developer for the new Microsoft Office SharePoint Server 2007 (and Windows SharePoint Services v3) it's good to have a place to go. Now you do.

    Check out the following links that will keep you on top of development for all things related to SharePoint:

    Awesome stuff!

  • Thanks to everyone at!

    Just wanted to thank everyone involved in the upgrade of to Community Server. It seemed to have gone seamlessly and all my posts (with code snippets) survived. Earlier testing of the CS upgrade found that they were stripping embedded HTML out of posts. I use a plugin for Visual Studio called HtmlAsSource that lets me load up some code, select it, copy it to the clipboard, and paste it into a blog post just as you would see it in Visual Studio. I was involved in testing the upgrade a few weeks ago and these posts became gobbly-goop (technical term) so I'm glad to see that fixed.

    The other great thing are the new features. Search is great now so just search on my blog for Forums and you get all the posts about my SharePoint forums web part. Search for TechEd and you'll get all the TechEd posts. Yes, even the snozzberries taste like snozzberries.

    Other nice features are the highlighted tags (where size does matter and shows how many posts are filed under a particular tag), the option to email a post to someone, a single link to post an entry to digg, and subscription features for those that don't want to subscribe to an RSS or Atom feed.

    Anyways, thanks guys. Job well done!

  • It's beta 2 time!

    Hey kids, what time is it? It's beta 2 time!

    The public beta of Office 2007 is now online and available to anyone. The link is here for you to download the files. This includes all of the Office 2007 client (Word, Excel, Powerpoint, etc.) and servers which includes Microsoft Office SharePoint Server (MOSS) 2007.

    With the release of the public beta there are a couple of things to note. You'll have to register and go through a few pages of entering your name, address, blood type, first girlfriends bra size, and other sundry information. After you fill all that in, you'll be whisked away to the download page where your Internet connection will grind away for hours. Note that if you have installation keys for a previous version, you'll still need to go through the registration to get a new set. The old installation keys will not work with this version.


  • Windows SharePoint Services SDK v3

    Seems that the SDK for Microsoft Office SharePoint Services v3 is now available on Microsoft downloads. You can grab it here. This is to compliment the SharePoint Server 2007 SDK that’s available here.

    Get your beta 2 engines started up!

  • Blog is back

    Everything looks good now. Have it reconfigured so it's not that much different (why mess with a good thing). There are some new features like the ability to email or digg one of my posts (yeah, like that will ever happen) and the tags at the side are sized based on the number of posts with those tags.


    Now I just have to figure out how to get BlogJet to support connecting to it (there's no option in BlogJet to post to a CS server) and I'm rockin.

  • Offline for an upgrade, Plumbers @ Work, and Calgary Code Camp

    Just wanted to let you know that my blog (and RSS feed) will be unavailable between 4pm EDT (-5GMT) and Midnight this evening. This is to facilitate an upgrade on the site from .Text to Community Server. The long awaited upgrade will provide a few extras for you as a visitor here so we’ll get those configured once the upgrade happens.

    Our latest episode of Plumbers at Work went online a few days ago (forgot to report it) so check it out here. Plumbers at Work runs off the latest version of Community Server so you can kind of see what to expect this blog to transmogrify into.

    Also next week is the Calgary Code Camp where I’ll be presenting two sessions, one on .NET tools and one on building ASP.NET 2.0 Web Sites with Master Pages, Web Parts, and cool stuff. Be sure to register as it’s free and we’re giving away stuff.

  • What is this CodePlex all about?

    So CodePlex is out in the wild and there are a few showcase projects setup, but what’s it all about? is a simple but highly functional online collaboration venue for distributed, community-collaborative software development. For the last year, a team in Microsoft has been putting together this tool which is the first Visual Studio Team Foundation Server (VSTFS) over the Internet. For Microsoft, their primary objective with CodePlex is to enable Windows and .NET developers to write, share, and consume source code and applications. It’s that simple (and free).

    Korby Parnell and his team designed CodePlex as a replacement for GotDotNet Workspaces, and if you’re like me, it kicks the llama’s ass. CodePlex is written from the ground up in C# utilizing .NET 2.0 technologies and built on VSTFS. CodePlex enables geographically-distributed teams to enjoy the benefits of VSTFS over the Internet which is pretty cool if you’re familiar with the capabilities of VSTS. If not, then you should check it out.

    Much like the multitude of Googles projects, the site is marked as beta but unlike Google, this won’t stay that way for long as this is their final release before production. Between now and the end of May they are on boarding a small number of high quality “Showcase” projects. There’s some cool stuff there like NUnitLite, the Commerce Starter Kit, Atlas Control Toolkit, a meta generator for the BDC, IronPython (a Python implementation on .NET), and of course my SharePoint Forums Web Part (#2 on the activity chart!). The plan is to go public sometime in June where any project can join up and be hosted there.

    The first thing everyone will do is compare this to the highly populated SourceForge. I’ve been a member on SourceForge since 1999 so yes, I think they have a lot to offer. The services have grown with things like the new support for Subversion (which blows CVS out of the water so go get it if you’re on CVS now). Side by side, both CodePlex and SourceForge offer project hosting with similar features (file releases, source code, issue tracker, documentation). The Web Interface for CodePlex seems nicer but it’s the Team System integration where it really shines.

    Once a project has been created for you on CodePlex and you’re ready to upload source files and binaries, you must download and install one of the following Team Foundation clients. Whereas the Web site is designed as the primary interface for project administration (manage members, write documentation, delete off-topic discussion threads, etc.) and project evaluation (download and install SharePoint Forums, engage in discussions, read documentation, submit bugs, etc), all version control and many work item tracking functions must be performed using one of the following VSTFS clients:

    • Visual Studio .NET 2005 Team System
    • Visual Studio .NET Team Explorer, stand-alone GUI client
    • TF.exe, a stand-alone command line interface

    The Visual Studio Team Explorer client comes with Visual Studio Team Foundation Server and is also available for download from the Microsoft Download Center as a CD image file (you can rename this to ISO which is the same thing).

    SourceForge has changed over the years. In writing this blog I wanted to post the stats to the site, which used to be on the front page. This listed the number of projects and users (which was pretty astronomical) but is now missing since the last layout change to the site. SF seems cleaner these days, but cleaner doesn’t mean better. CodePlex is simple and intuitive to view and navigate but can stand some improvement (as demonstrated by the various suggestions we’ve already made in the discussion forums there). Besides all that, hopefully CodePlex won’t become the ad-ridden marketing tool that SourceForge has become where it’s just pimping it’s Enterprise version (in this case, VSTFS).

    Unfortunately, for us with WSS sitting on top of VSTFS now there’s no CodePlex for you to host behind your firewall. Microsoft does not have any plans to release the source code and, according to Jim Newkirk “The software is designed to run in the Microsoft data center, so it isn't something that could realistically be hosted in another environment.” Bummer. I’m sure some people will cry foul because they can’t get the source code but free is good so we’ll take anything at this point. It does show you that such a beast can be built and TFS can be used, like SharePoint, as an application delivery platform (if of course you have a year and a lot of smart softie brains). 

    Microsoft expects CodePlex to emerge as one of the most popular, if not the de facto collaboration venue for community software development projects that target or extend Microsoft products and platforms. CodePlex is and will remain a free, Internet-based edition of Visual Studio Team Foundation for the use of Microsoft valued developer and IT Pro customers.

    Will CodePlex turn into just another SourceForge, with thousands of abandoned or empty projects? To prevent project spamming and to ensure that CodePlex remains a bastion of the highest quality open and shared source projects rather than empty test projects and code-free wonders, the CodePlex team is reviewing and approving/denying all new project requests (with the help of a few CodePlex community members) through the end of the calendar year. 

    Time will tell.

  • Installing and Configuring the SharePoint Forums Web Part

    I’ve detailed and completed the instructions for installing and configuring the Forums Web Part for your systems. There’s been a lot of people who have either never editing web.config to add SafeControl entries, or never created a custom security policy file and are a little lost in step 3 or 4.

    You can find the complete instructions here on the CodePlex Wiki. Each step contains a link to a more detailed page outining what has to be done (with examples). Hopefully these instructions are complete enough for everyone.

    Yeah, the system really needs an installer.

  • Test Driven Development guidelines done right

    Remember all the bruhaha a while ago when Microsoft published a document about their concept of Test Driven Development guidelines. We were all up in arms as they tried to define the process to match Visual Studios auto-test-generation and all that and well… it just blew.

    So they’ve republished the paper here with all the right stuff. I checked it out and was going over everything in my head, hoping it wouldn’t be another series of blogs telling MS they screwed up again.

    Red, green, refactor. Cool.

    Write the minimal amount of code to pass. Awesome.

    Refactor to design. Superb.

    Of course the author is a TDD leader in his own right, so it doesn’t surprise me it’s a mucho-better document than before and now something you can point your kids at. Thanks J!


  • Cool CodePlex Feature

    Yeah, I'm groking CodePlex and loving it. There's a great feature that I just did for the first time. A user posted a message in a forum (the first forum post! And there was much rejoicing!) about clicking on categories which would cause nothing to happen. This is due to a change in the way forums were being retrieved and something I had to fix. You select the forum post and click on "Convert to Work Item". This does two things.

    First it creates a Work Item where you can track the feature/bug/whatever. The second thing it does is post a message to the thread saying it's been converted to a Work Item and telling people to track it there.

    This is the way cool technique to implement features and fix bugs. There's no loss of tracking a suggestion (if you choose to create a Work Item) and really ties things like requirements to work done.

    Nice stuff.

  • Documenting the SharePoint Forums Web Part

    I've started putting together the documentation for the SharePoint Forums Web Part (SFWP anyone?) on the CodePlex site so let me know if there's anything you're looking for specifically (and feel free to jump into the discussion forums there to get some open discussion around features, bugs, etc. started). I've also started a FAQ here that you can use for a quick reference on things if you're not into reading lots of text (like most of us are).

    Also note that I've removed the download link that used to be on and all downloads of the Web Part need to be done through the CodePlex download link here (this will require you to agree to the license agreement). The Web Part is released under the Creative Commons Attribution-ShareAlike 2.5 License. This basically means that:

    • Commercial use of the Web Part is allowed
    • Modifications (including derivative works) of the Web Part are allowed as long as they are released under the same license as this one

    Please respect this when using, modifying, and sharing the Forums Web Part.

  • SharePoint Forums on CodePlex

    CodePlex kicks ass. There. I said it.

    And my SharePoint Forums Web Part project has a new home. On CodePlex. Cool.

    CodePlex is the brainchild of Microsoft and is basically a public facing Visual Studio Team Foundation workspace (the first one that I know of) for hosting and sharing of community projects. If you’re familiar with sites like SourceForge and GotDotNet, it’s very similar. SourceForge is closer to what CodePlex offers (or the other way around if you prefer) in that you have discussion forums, file releases, news, source code, a Wiki, etc. except that rather than hosted on Linux and using CVS/Subversion it’s all ASP.NET 2.0 baby and Team Foundation Server.

    Although (and feel free to quote me on this) GDN just plain blows monkey chunks. When I go there, navigation is a nightmare and half the time I end up looking at the main page when I thought I was in a project. Also (just today for instance) I joined a new project, was approved and all that then tried to download the project files and was asked to join. I gave up after signing in a dozen ways to Sunday (oh and how I just love Passport). Nuff said.

    I really love SourceForge and it’s served me well (and the other 60,000 projects hosted on it). Will CodePlex be the next SourceForge? I don’t know but I do know I’m going to enjoy working with CodePlex that much more. Complete Visual Studio integration, wikis, work items, tracking, forums, etc. That just works for me.

    Okay, some people will gripe and say SourceForge (or the much improved GForge) is much easier to use and doesn’t require a $15,000 client to access it. Fear not as you can use the “tf” command line tool to use even if you don’t have Team Suite (which means you can still use say the free Express edition for development but still access your project on CodePlex). That’s the beauty of TFS, it’s open ended and I’m sure the command line client won’t be the last one you see (hint: hey TortoiseCVS and TortoiseSVN guys, it would be great if someone could put together a cool TortoiseTS project).

    The main thing that I’m digging is the Wiki support so I’m just going to fill the site with documentation on the Web Part so I don’t have to keep posting tidbits on my blog or through emails. The collaboration features of CodePlex are going to be quite cool too since I could (eventually) have a team around the world working on the Web Part, all checking stuff in etc. in a nice interface without having to leave the comfort of Visual Studio.

    Yeah, I know. You’re all saying Bil has just become a Microsoft brainwashed addict and has gone off his rocker spouting gobs of Team Server propaganda. Like we care since so many other sites have done far more for far less so what’s the big deal. I’m sure people will continue to say sites like SourceForge (and others) far surpass what CodePlex could ever be. Guys, don’t review the movie just from the trailer. Sure, CodePlex isn’t something that we haven’t seen before but it’s a damn better step forward than what GDN offers and (IMHO) can only get bigger and better. Time will tell.

    I’ve just got the Forum project site setup and will be adding documentation, releases, and source code to it over the next week or so. There are some forums there, so feel free to sign up on CodePlex (it’s free of course) to ask questions, share experiences (good, bad, or ugly), suggest features, and all that jazz. Feel free to visit the site for updates as well and collaboration on the project (and I’ll be posting updates here but most of them will redirect to pages on CodePlex) and let’s make it the most popular one on the system (at least until something better comes along).

    Oh yeah, while this is my first project on CodePlex (and from what I was told, the first non-MS project hosted there) this certainly won’t be my last project on CodePlex.

    You can check out my SharePoint Forums CodePlex site here. I’ve also posted the file as a release now so please use this link to grab it (this includes a license agreement page you need to agree to in order to download the file) as I’ll be removing the old one. SharePoint Forums is released under the Creative Commons Attribution-ShareAlike 2.5 License.

    P.S. sorry for the over abundant use of the word “cool” in this blog. It’s been a good (and long) caffeine enriched day.

  • SharePoint 2003 and .NET 2.0

    Personally I’m seeing more and more people asking questions and being generally confused about building Web Parts with Visual Studio 2005 and .NET 2.0 for the current version of SharePoint. This is of course compounded by the fact that ASP.NET 2.0 has a class called WebPart, can do Web Parts but they’re completely different from the SharePoint 2003 ones.

    My advice to you, weary traveller, is to simply don't bother with VS2005, ASP.NET 2.0 and SharePoint 2003 (WSS or otherwise) today. Yes, there are bloggers and MVPs out there that have instructions/sessions/presentations on how to do it however you can make it happen only under certain circumstances, and if you sacrifice the correct number of chickens (or virgins if you prefer) in the correct order on the correct night of the full moon. It's really just a big bother for very little gain IMHO.

    Wait until later this year when you can just build stuff right out of the box. Trust me, VS2005 and SharePoint 2007 works like a dream.

    Click, code, create.

    No mess. No fuss.

  • More SharePoint Forums Web Part Fun

    Just a minor glitch and a quick update. Some people are experiencing problems with security and installation of the web part. Primarily this is usually caused by the AppPool id for the SharePoint site to be running as NETWORK_SERVICE (which generally doesn’t have any privileges). If you use a local or domain account, this problem should go away (and is a recommended setup anyways).

    Also on the point of hosting the Web Part. I built it so it can live anywhere (a portal area, a WSS site, a document library) however for Web Part Pages in Document Libraries, the forums are having a little trouble figuring out it’s own home. After posting a message or editing something in the Admin panel, you might find it “kicks” you out to the Document Library or the main site. I’ll see about fixing this in a drop later this week or early next (don’t want to do a release just for one bug) so if you can either host it on a WSS site (on the main page) or a Portal area, you’ll be laughing. Otherwise you might think things are behaving weirdly.


    Is that a word? Sounds like a member of the episode of the Flintstones where they had the creepy family.

    Weirdly Gruesome.


  • Forum irregularities

    First off, sorry if this week is going to be filled with posts about the forum web part. It's popular and I just want to make sure everyone gets it, gets it installed, and gets it working in their environment.

    There's some irregularity with adding the web part to a portal vs. a WSS site. The web part is designed for both but for some odd reason it behaves weirdly (yes, that's a technical term) when deployed to a portal (probably due to the fact that the user lists are different).

    In any case, you might get an error loading the web part, but just refresh the page (by visiting the link again) where you deployed it and it should appear normally.

    If you're an admin on a portal area and don't see the Admin option, email me and I'll send you info on how to access the list directly (if you haven't already figured it out) and you can edit yourself to be an admin (you still need update rights in that area to do this so it's not open).

    Again, most of the issues are due to the fact that all actions in the web part (creating lists, adding/editing entries across multiple lists) are always done by the AppPool user and not the user in the system (although the Web Part keeps track of who you are and distinguishes between you and the AppPool user). This was done just because I didn't want you, the user, to have to maintain security on 5 different lists.

    I think I made the right decision, but there's some fancy footwork that needs to be cleaned up here which will come in time.

  • SharePoint Forums Updates

    I haven’t got the site for submitting bugs, discussions, etc. for my SharePoint Forums Web Part but that should be along shortly. Some of you might be wondering where some of the features of the Web Part are (like RSS feeds). These are coming but due to time as I got into building it, I went for quality over quantity.

    Here’s a list of the features that are being worked on and those that are planned (my wishlist).

    Currently Being Worked On For Future Release

    • Import tool to read in and convert existing discussion list messages (not sure how the mapping to categories will go here)
    • Ability to sync a forum up to an external NNTP server and newsgroup(s)
    • Language support for more than just U.S. English
    • Topic/message search

    Wish List
    These are items that have been requested, were planned, but have yet to be scheduled or decided on.

    • RSS feeds (web part, forum, topic)
    • Email notifications from topics, replies, etc.
    • Locking of topics (so nobody but admin can add posts)
    • Password protect forum (not sure if this is needed)
    • Sticky topics/announcement type posts
    • Active topics list (return a list of all topics with replies)
    • Inactive topics
    • New topics (show topics since your last visit)
    • Print topics
    • Supports smileys/emoticons
    • Todays topics
    • Jump to forum feature (a small drop down box on the page to quickly navigate around)
    • Mark all unread messages read (messages don’t have a read/unread state now so this will be a large change)
    • Paged navigation of topics

    Some of these features will come automatically (like RSS and Email) with version 2.0 which will ship with SharePoint 2007 (and is being actively worked on so you’ll have a release as soon as the product is ready later this year). If you have any more feel free to send them my way.

    Expect a new release every 3–6 weeks (depending on my schedule). Once the new site is up, you’ll be able to add your own items, download the source code, etc.

  • SharePoint Forums... go get 'em

    I’m very happy to say that the SharePoint Forums Web Part is ready for you to install. I cleaned a few things up from the last week with the testers but most people reported no problems and only suggestions (which is always a good thing). There were a couple of problems with permissions however if you follow the installation instructions below you should be golden.

    I do apologize for not putting together an MSI or something. I did go down that path using WPPackager, however two problems. One is I couldn’t get the permission setup correct and the second thing is that the Forums uses a common library that I’m giving out which needs to go into the GAC but the Forum Web Part assemblies can go into the bin directory. I couldn’t find a way to split this up and then couldn’t get WPPackager to just package a regular file so it either meant doing it by hand (which is what I did) or building a two installers using two different tool sets.

    In any case, installation does require a bit of configuration but it’s painless. If some adventurous soul out there wants to put together an installer I’ll throw you a cool SharePoint prize.

    You can download version of the Web Part from here. For those that have previous versions installed, please remove them and delete your forums. If you really want to retain the old forums I can tell you how to do this but email me privately as it involves some extra steps.

    Here are the web part installation instructions. These instructions are also in the zip in a text file called DRINKME.TXT.

    Step 1
    Install “BilSimser.SharePoint.Common.dll” to the GAC

    Step 2
    Copy "BilSimser.SharePoint.WebParts.Forums.dll" and "BilSimser.SharePoint.WebParts.Forums.Core.dll" to your SharePoint web site bin directory (if it's the default, it's c:\inetpub\wwwroot).

    Step 3
    Add the following SafeControl entries to your web.config file:
    <SafeControl Assembly="BilSimser.SharePoint.WebParts.Forums, Version=, Culture=neutral, PublicKeyToken=e516dadc23877c32" Namespace="BilSimser.SharePoint.WebParts.Forums.Controls" TypeName="*" />
    <SafeControl Assembly="BilSimser.SharePoint.WebParts.Forums, Version=, Culture=neutral, PublicKeyToken=e516dadc23877c32" Namespace="BilSimser.SharePoint.WebParts.Forums" TypeName="*" />
    <SafeControl Assembly="BilSimser.SharePoint.WebParts.Forums, Version=, Culture=neutral, PublicKeyToken=e516dadc23877c32" Namespace="BilSimser.SharePoint.WebParts.Forums.Controls.Common" TypeName="*" />
    <SafeControl Assembly="BilSimser.SharePoint.WebParts.Forums, Version=, Culture=neutral, PublicKeyToken=e516dadc23877c32" Namespace="BilSimser.SharePoint.WebParts.Forums.Controls.Base" TypeName="*" />

    Step 4
    Add the following to a custom policy file (PublicKeyBlob split for clarity but needs to be one line):

    This entry needs to go AFTER the FirstMatchCodeGroup and BEFORE the ASP.NET UnionCodeGroup!

    Step 5
    iisreset (or recycle your AppPool)

    Step 6
    Import SharePointForums.dwp onto a WSS site or SPS area page where you are an Administrator.

    Step 7
    Configure, and have fun!

    I’ll post a quick set of docs (somewhere) on doing basic stuff but watch for blog entries on various tricks you can do. Email me at if you have problems, questions, suggestions, small marsupials, concealed logging chains, etc.

  • Meet the "new" SharePoint Community

    SharePoint is all about community. Whether it’s forums or newsgroups or blogs, everyone is always trying to find information. This was difficult before and required ninja Google skills to find what you needed. Microsoft stepped up to the bat to rectify this problem with initiatives like Microsites and Communities. Unfortunately, the SharePoint community wasn’t that great and offered a few links that really didn’t help much.

    Now that’s changed with the launch of the new SharePoint Products and Technology Community.

    Here’s what the old community site looked like:


    And here’s a new one:


    A vast improvement.

    The new community has a set of small components that offer dynamic content. This content is pulled from various places so for example you can see the most active discussions from the SharePoint newsgroups (with links to that topic in the web based newsreader), the latest blogs, and links to all the SharePoint MVP profiles.

    Consider this your starting place to find SharePoint information in the future and check it out here.

  • SharePoint Forums and Common code

    Just a quick note that testing is going well by everyone and there are a few small things I’m fixing along the way. I’ll be doing the public release for next Monday (May 15) which gives me time to fixup any last minute problems and put things together in a nice installer for you guys and some much needed documentation. They’ll be a site setup just for the forums web part that will provide online documentation, a wiki, a place for you guys to submit bugs, etc. but this isn’t ready yet (but you’re going to love it when you see it).

    Also with the release of the forum web part is the release of a library that I’ve been building for awhile. It’s a common library with a set of classes, routines, etc. that you can use in your own web parts or SharePoint projects. It gets installed to the GAC with the forums and will be used in other projects I have coming soon. I’m hoping that the common library grows and provides some useful things for your projects. API documentation will be provided with this along with source code when the forums source code is released.

  • Looking for ChalkTalk ideas at TechEd 2006

    Hey guys, I’m going to be at the Office DevTrack area for most of TechEd 2006 next month (June) hanging out, talking, and generally telling you whatever you want to hear about SharePoint 2007. While we’re there, there are sometimes scheduled Chalk Talks. Chalk Talks are short sessions (no more than 20 minutes) with you, me, a few of your friends, and a whiteboard (or flipchart). We can discuss architecture, implementation, development, whatever. Just something short and focused and fun.

    I’m looking for some ideas on hosting a Chalk Talk or two while I’m there so if you’re interested in getting into something, email me (or leave a comment here) on something you’re interested in and I’ll see if I can schedule it in. I can’t promise we’ll get it slotted as there are only so many spots available, but if something interests you about Microsoft Office SharePoint 2007 (or 2003 for that matter, but we would prefer to talk about 2007) then now’s your chance to ring in.

    I’m also hosting a BOF session so that will cover talking about what to prepare for as a developer, but I’m open to anything in the Chalk Talk area (as long as it’s Office/SharePoint related). Also note that we haven’t confirmed the schedule of when we (the Office track guys, myself and AC and a couple of others) will be in the lounge but once it’s confirmed we’ll let you know when to avoid the area.



  • Lost another camera

    I have the worst luck with cameras. On my trip to PDC last year, I lost my digital camera somewhere between the airport and my hotel going in. On Sunday I lost the replacement camera I bought down in L.A. (a Olympus C60, 6MP nice camera) on the way from the Vancouver airport to home.

    Oh well, guess it's off to buy another one. Any suggestions? I'm very happy with Olympus but willing to take a look at something else.

  • SharePoint Forums off to testing

    Whew. Finally. The forums have been sent off to the testers. I’ll be doing a few final changes this week while they have it for the public release later this week. Source code will be available in the near future, but watch for a special announcement about that (yes, the source will still be available). Here are some shots of the finished product that you’ll be getting soon.

    Multiple forums with categorization (setup to mimic some of the ASP.NET forums)


    Admin screen for managing forums, categories, and permissions


  • Removing static calls in your Repositories

    I was putting together some code this morning for a demo and saw that my Repositories started to look a little wonky. I wasn't happy with the fact that I had static methods on all of them because this would make for testing difficult. After posting the question to the DDD mailing list, a couple of good ideas came up that I implemented in my solution.

    A Repository is a class that represents all objects of a certain type. It's basically a collection (sometimes an in-memory version of a database) but with querying capabilities. The machinery behind how it stores or retrieves them from whatever persistance layer is hidden from the client as it only deals with domain types.

    So in our client we would access the repository like so:

       48 public class MyClient

       49 {

       50     public void LoadCustomerList()

       51     {

       52         CustomerCollection coll = CustomerRepository.GetAll();

       53         DataGrid grid = new DataGrid();

       54         grid.DataSource = coll;

       55         grid.DataBind();

       56     }

       57 }

    Our client (say a web app but could be anything) needs to display a list of all the customers. It talks to the repository to retrieve that information (in the form of a CustomerCollection object, derived from CollectionBase). This removes the implementation of how a repository retrieves the data request from and we can work with domain objects.

    If you're going across multiple tiers, you might return a CustomerCollectionDto, an ArrayList, an Array of Dtos, or whatever you need but for the purpose of this example we're getting a collection of domain objects.

    As I started out, my repository looked like this:

       59 public class CustomerRepository

       60 {

       61     public static Customer GetById(int id)

       62     {

       63         CustomerDao dao = new CustomerDao();

       64         Customer obj = dao.FindById(id);

       65         return obj;

       66     }

       67 }

    This was typical and would provide me with a way to access whatever persistance layer I implemented in order to reconstitute my domain objects (in this case, as Customer). I started to add more methods but things started to smell.

       31 public class CustomerRepository

       32 {

       33     public static CustomerCollection GetAll()

       34     {

       35         CustomerDao dao = new CustomerDao();

       36         CustomerCollection coll = dao.GetAll();

       37         return coll;

       38     }


       40     public static Customer GetById(int id)

       41     {

       42         CustomerDao dao = new CustomerDao();

       43         Customer obj = dao.FindById(id);

       44         return obj;

       45     }

       46 }

    Now I've got duplication of my calls to my DAO as well as these static methods that are looking a little ugly. I could remove the code duplication by declaring the DAO in the class, but the methods are static so it would have to be static too. Also this is just plain difficult to test because I don't necessarily want to implement a full blown DAL just to test my repository.

    Enter the Registry pattern to the rescue. This is a class that acts as a gateway or controller class to all of your repositories (or whatever object you need to talk to). You create static accessors to the inner repositories, but the nice thing is we can use an interface to our repository which allows us to build any kind of registry so we can create some mock test objects without having to drag along extra infrastructure.

    Okay, we'll get our registry class started with some .NET plumbing:

       69 public class RepositoryRegistry

       70 {

       71     private static readonly RepositoryRegistry instance = new RepositoryRegistry();


       73     static RepositoryRegistry()

       74     {

       75     }


       77     protected RepositoryRegistry()

       78     {

       79     }


       81     private static RepositoryRegistry GetInstance()

       82     {

       83         return instance;

       84     }

       85 }

    Now we've got the beginning of our registry. The static instance variable is how we'll access it (as a singleton) and is set to readonly so it can only be created at startup. A private GetInstance() method allows us to access this as well as a static constructure to keep .NET happy.

    With the repository created, now we can add our CustomerRepository. This is done by a) creating a public property to access it and b) creating a protected method to instantiate it.

       69 public class RepositoryRegistry

       70 {

       71     protected CustomerRepository GetCustomerRepository()

       72     {

       73         return new CustomerRepository();

       74     }


       76     public static CustomerRepository CustomerRepository

       77     {

       78         get { return GetInstance().GetCustomerRepository(); }

       79     }

       80 }

    So the property is exposed publically and static (so we can call it from our client) but the implementation of the creation is done in the GetCustomerRepository method. This method is marked as protected so we can subclass the RepositoryRegistry and create say a MockRepositoryRegistry. Then we only have to implement (override) the GetCustomerRepository method and return whatever a CustomerRepository whatever way we want.

    Now we have two changes to make this work. First, we have to remove the static calls on our CustomerRepository because we don't need them anymore. Second we have to change our client call to get the collection of customers. Since we're removing the static calls in our Repository, we can remove the duplicate code to the DAL now and clean things up a little. Here's the updated CustomerRepository:

       31 public class CustomerRepository

       32 {

       33     private CustomerDao dao = new CustomerDao();


       35     public CustomerRepository()

       36     {

       37     }


       39     public CustomerCollection GetAll()

       40     {

       41         CustomerCollection coll = dao.GetAll();

       42         return coll;

       43     }


       45     public Customer GetById(int id)

       46     {

       47         Customer obj = dao.FindById(id);

       48         return obj;

       49     }

       50 }

    And now we can talk to the Registry class via our Client. Note that we're calling a static property on the class (CustomerRepository) but it's being created internally by the Registry class. So our new client code looks like this (only the call to get the collection has changed):

       86 public class MyClient

       87 {

       88     public void LoadCustomerList()

       89     {

       90         CustomerCollection coll = RepositoryRegistry.CustomerRepository.GetAll();

       91         DataGrid grid = new DataGrid();

       92         grid.DataSource = coll;

       93         grid.DataBind();

       94     }

       95 }

    Nice. So we still have a single call in our client (which is nice and readable) but we're getting rich objects returned from our domain and we don't need to know how the Registry is getting us the objects (or how the underlying Repository is either). This is a good way to remove statics from your repositories and keep your domain clean from persistence. It also gives you the flexibility to build any kind of implementation for testing.

    Other things you can do here is to build a repository interface and have it returned rather than the concrete class and maybe do something better through calling your persistance layer, but you get the idea.

    Many thanks to Ramon Leon, Greg Young, Stephen Molitor, Roger Stasko, and Steve Eichert for contributing to this as they really did the heavy lifting. I just did the grunt work to show you what it would look like in .NET.


    EDIT: Greg Young summed things up very nicely on his blog post recently that I missed (thanks Greg!):

    "The starting point to using repositories effectively in a domain is the creation of abstract contracts for the repositories. These abstract contracts should be the only publicly visible forms of our repositories. Internally we only use the abstract contracts to refer to our repositories and in many cases we also allow such things as dependency injection of repositories into our domain, we will generally use either a service locator or a static accessor to an instance. We also at this point create our first unit tests to test the abstract contract of a repository; we can at a later point use these unit tests as integration tests with a repository that is hooked to a real database."

  • Off for the weekend

    It’s 2:15 AM and there’s something not right.

    So I have to delay the test release to the small group out there until I get back from a brief getaway in Vancouver this weekend. I’m bringing my laptop with me, but not sure how much time I’ll have to get at it, if at all (hey, it is a vacation after all). In any case, I’ll get it fixed (I think I know what I screwed up, assuming I haven’t lost all my brain cells in the last few hours of the night) and get it ready for Monday when I get back.

    Have a great weekend and don’t run over any chipmunks, they’re just so damn cute.

  • Blame Scott Hanselman

    If there’s on person on this dilapidated planet that will cause my ADD to kick into high gear, it’s Scott Hanselman. He always comes up with the coolest links, toys, and little things about .NET that make you go Hmmmm...

    He and I share a love affair with a tool (yeah, that’s pretty silly when you read it, so take it in and have a drink or two). He hooked me onto it with this podcast on his Hanselminutes show about it, and I’ve been awe-struck ever since my head blew off (about 10 minutes into the podcast, during which time I downloaded the “toy” shell and gave it a whirl with the commands he was piping out).

    Anyways, for your Monad fans (I flat out refuse to call it PowerShell, what a stupid name. Sounds like some weekend project on Tucows or something) Scott brings a great tip (and .INF file) for adding the “PowerShell Prompt Here” command to your right-click menu in Explorer. Check out the tip and grab the file from here.

    Now if I can just get it to work with FAR Manager (another tool I’m in love with now, after ditching Midnight Commander, again... courtesy of Scott and this blog).

  • Stupid SharePoint Tricks #32,174 - Alt+S to save forms

    Do you get annoyed by entering a form (maybe a long one) in SharePoint and have to scroll back up to the top to find that crazy “Save and Close” icon? Okay, in SharePoint 2007 it’s improved as they’ve now put the “Save and Close” icon at the both the top and bottom of the form (which is an improvement) but it’s still a PITA. Here’s a shortcut you can use.

    Fill out your form. When you’re ready to save, hit Alt+S then Enter. Voila. Saved. Magic.

    This is all courtesy of, your friend and mine, ACCESSKEY. ACCESSKEY is an HTML attribute you can add to tags (like forms) to provide keyboard access. This was mainly added to the HTML 4.01 specification for accessibility, but comes in handy for those of us that are hotkey junkies. A good description of ACCESSKEY and its use can be found here.

    This tip brought to you by the letters “W” and “C” and the number “3”.

  • Deleting Windows OneCare Backup Files

    I gave it a shot. I tried it out. I thought, hey, it’s Microsoft so it’s gotta be good right?

    Windows OneCare is a comprehensive PC Care service that helps protect and maintain your computer with antivirus, firewall, antispyware, PC performance tuneups, and file backup and restore functionality. It’s aimed at the home user to provide a service (like Windows/Microsoft Update) that’s always on, always up to date, and always avaialble. Not a bad idea.

    So I gave it a whirl, but after balloon messages appearing every 15 minutes telling me my system was safe, and processes launching in the middle of important stuff I was doing (no, not just surfing for pr0n) I just gave up. I’m much happier with a copy of Trend Micro PC-illin, manual scans, and me controlling my system. OneCare isn’t bad, but it’s not for me. Maybe it’s good for grandma who keeps asking you why she should click on Start to shutdown her computer. For the rest of us, I’m going to have to say passola.

    However in the course of using it, I had done a backup to one of my external drives. After removing the OneCare infection from my system, I found that I couldn’t delete any of the backup files. WTF?

    I’m administrator. I’m root. I have absolute power.

    Apparently not.

    It seems OneCare backups will change the security on the folder so that only SYSTEM has write access. Everyone else, even administrators, only have read access. So quick fix. Right click on the folder, choose Security, and give yourself full control.

    Then hit delete.

    Simple, but really bugged the crap out of me. Almost as much as the product itself.

  • Thanks for the help!

    Thanks to everyone who responded to my testers for the SharePoint Forums Web Part. I have 10 lucky stiffs… errr, people now and will be getting them a copy for final testing. Sorry about the delays but it’s been an uphill battle sometimes. Of course SharePoint security didn’t co-operate with me the way I planned so that had to be scrapped and redone at the last minute. Never can plan for these things.

    As for schedule now, the testers will get a copy (sans documentation) in their hot little hands shortly. I’ll be doing some small fixes but mostly I’m away all weekend in Vancouver taking in the sun. On Monday I’ll sift through what the testers come up with and, if all goes well, put together a proper release for you the beginning of next week. Again, apologies for the delays but it’ll be worth the wait.

    Of course once that’s out the door, I still have SharePoint Builder to finish and get out to everyone (the projects never seem to end) and still will be getting the SharePointForge site up and running full steam, along with the other dozen or so little projects tucked away on my hard drive. Nothing like being the busiest guy on the planet.

  • A few good men (or women for that matter)

    No, the forum web part hasn’t been released yet. I need to do a quick test (aka within days) from a small set of willing volunteers. As I was working on multiple users and caching and crazy stuff like this appeared:

    Cache testing for SharePoint Forums Web Part

    It really wasn’t what I was after. I mean, there were 3 registered users on the forum and only 2 of them were online (me and me) so 15 was definitely out of the question. All has been well with things so far, but all of a sudden big, bad SharePoint came along and wrote into the ASP.NET cache object.

    How dare SharePoint!

    How dare they fill my cache with crazy stuff like search box IDs and page output cache. Didn’t they see me putting my user names in there? Why didn’t they just leave me alone?

    So I fixed this problem without too much effort but wanted to do a sanity check before millions of SharePoint installations out there tried things out for real.

    In any case, I want to run the web part through some quick tests with people who have a setup with a bunch of users to pound on it (a guy can only do so much in a single virtual machine with two browsers). What I need is a quick test where you’ll install the web part in whatever environment you want and throw as few or as many people as you want at it, and let me know what the results are.

    Rules of engagement for this test:

    • You can put the web part on as many sites, areas, etc. as you like (it will create it’s own internal lists as needed and hide them) but please don’t use this for “production” or “real” data
    • Please do no provide “feature” feedback right now as I’m already swamped as it is. If you do want to jot ideas down and send me a note later I’ll add it to the wish list for future changes.
    • There is no support on this test but I will listen to any feedback you have and what you have to say. Again, it’s crunch time and I’m interested in getting a good first release out but can’t spend weeks distracted with one-on-one support.
    • The software will be provided as a “raw” install (i.e. no installer). Copy the dll into your bin directory, add an entry to your SafeControls section in web.config and upload the .dwp file. You’ll be responsible for removing things after the test (including lists and data).
    • You may not place this on a SharePoint site that is externally facing to the general public.
    • If you can’t commit to testing it in the short period available (e.g. you won’t get to it until next week because of other commitments) then please don’t ask for a copy. I only want people that can dedicate the time now so we can do a public release asap.
    • There are no guarantees that this is going to work in your environment. I’ve tested it out in various “known” configurations, but you might have some crazy setup that I’ve never seen before. If it doesn’t work, we’ll see about how to get it going and what makes your environment unique, but it may take a few days to get to you.

    NOTE: there are several “features” that will be turned off (like NNTP synchronization) that I’m either still working on or deferring to a later release. This test is going to be a bare bones release and not meant to be used past the test period.

    So if you’re up to the challenge, please email me with your name and I’ll send you off a copy. I’m limiting this to 10 people because I don’t want to try to get into following up with dozens of nameless faces out there. Testing will start when I get the 10 and end about 2–3 days later (if that).

    First come, first served.


  • TechEdConnect Updated

    Leverage Software, the guys that put together the TechEdConnect application, have updated the site with some new, must needed features. The display of groups you’re in is much improved and shows the members of the group (well, duh) which I thought should have been there in the first place. Couldn’t tell who was in the group, even if you managed it. They also improved some search capabilties but I can’t tell what’s changed there (although you can search for a person by name, which I don’t think was there before).

    Again, if you’re heading to TechEd you should get hooked up on TechEdConnect and doing that collaboration thing with people with similar interests. The MVP group (for all you MVPs going) is up to a whopping 9 members and I know there are more of us. At least with only 9 people it’ll be easy to find a place for dinner.

    So check it out the updated TechEdConnect, get connected, and look me up while you’re at it.

  • Calgary Code Camp this month

    If you're a hard core developer in the Calgary area and are looking for a free lunch I have one.

    It’s called the Calgary Code Camp and takes place on Saturday, May 27 at the 5 Calgary Hotel Downtown Suites (yeah, it's an odd name). This is an all day workshop by developers for developers and we’ll be covering various .NET aspects (2.0) and .NET tools. All code, no static presentations or marketing fluff. It’s free and takes place on a Saturday so won’t cut into your business schedule but will cut into any family/social stuff (hence the hard core aspect, or those that want to kill a day hanging out with nerds).

    If you’re interested, check out the site at and you can register for the event. Sessions haven’t been firmed up yet but will be in the next couple of weeks. If you have any developer friends that might be interested, please feel free to pass the info along to them as well.

  • More TechEd goodness... the Iron Architect contest

    Going to TechEd and want to flex your Architect muscle? Then enter the Iron Architect contest. If you are registered for TechEd this year you are eligible to enter. The Iron Architect contest is a simple contest that, given a scenario, you provide a solution. Easy huh? Here’s the question:

    Bob is the CIO of a large financial institution called Contoso, based out of New York – but with many regional offices throughout the world.  Through a number of mergers and acquisitions, Contoso has itself built up a large number of CRM systems – ranging from Excel spreadsheets that contain customer information, Access databases, SQL databases – right up to large implementations of Siebel and other CRM systems.  At the last IT audit, Bob was told that a total of 52 different sources of CRM data exist in the enterprise. 

    These CRM systems store information about customers the bank is working with – namely contact information, appointment data and activities (e.g. logs of telephone calls).  No CRM system shares the same schema for a customer, and some of the CRM systems also have duplicate records (for example, one customer may be represented twice on different CRM systems).

    Bob wants to fix this.  He needs to harmonize the disparate CRM systems and deliver a unified experience via the tools that the traders use every day – namely Microsoft Outlook and Windows Mobile 2005.

    As chief software architect, Bob has hired you to architect a system that will harmonize the customer data, resolve the conflicts, scale across multiple regions, and create a user experience that fits into the lifestyle of the employees. 

    Submissions must be entered via the submission form on this blog. The more creative the better.

    Submissions will be judged on;  Leadership, Strategy, Communications, Lifecycle Process, Organizational Dynamics, Technology Depth, Technology Breadth

    First prize is a free Architect certification (valued at $10,000). (Winners must go through application process for the certification program and be accepted in order to receive the paid certification).

    So get your Architecture caps on and head on over to the Iron Architect contest site. The submsission form should be up soon.

  • Ready for the weekend

    Hi guys. I’m packaging up the Forums for release shortly and you’ll have it this weekend. I had it planned for release today but some security and performance issues creeped up that I need to take care of. Watch for a release with installation instructions this weekend (not sure when exactly) and a source release to follow. Thanks.

  • SharePoint Forums to be Open Source

    I’ve decided that I’m going to release the source code to my SharePoint forums web part. I think it’s a pretty nice piece of work and figure it can only benefit by having the source code out there and other people contributing to it (or learning from it). The source contains various patterns and techniques that I use such as:

    I won’t be releasing the source with the initial version of the web part (which I’m trying to get out for tommorow) as I need to clean things up and make it consumable by the public, but a couple of weeks or so after the initial release is when you’ll be able to download the source. The only thing I’ll ask is people to contribute back to the codebase if they make any enhancements so I don’t have 10 different forks out there all competing with each other.

    Unlike my Microsoft April Fools joke about Windows SharePoint Services being open sourced (which fooled a few more people than I expected) this announcement is real.

  • Using Calculated Fields in CAML to Display Conditional Images

    Came across a nice gem in the newsgroups that I thought I would share here. Someone had a choice field with three values: failed; pass; re-run; and wanted to display a red image for items in the list matching the failed value, green for pass, and yellow for re-run (oh yeah, can you see where this is going).

    I pointed them immediately to Ian Morrish’s article here on conditional formatting using a DataView Web Part which works nicely for this. However Colin Gardner came up with a nice solution that used the RenderPattern tag in CAML for a list to do the job. Here’s his solution:

    1. Edit the FieldTypes.xml file (make backups for safety) and look for the row definition for the calculated field type (search for <Field Name="TypeName" DisplayName="TypeName">Calculated</Field>).

    2. Modify the deafult render pattern in the <FieldSwitch> statement so that it handles the values returned by a calculated file in such a way that will return you an image/icon/traffic light.  You will see that the <FieldSwitch> statement handles Boolean, Number, Currency and DateTime field types but anything else falls through and is processed by the code in the <Default> tag which is: <Column HTMLEncode="TRUE" AutoHyperLink="TRUE" AutoNewLine="TRUE"/>

    You need to replace this default rendering with you're own custom logic.  In my implementation I replaced it with another complete switch statement like the one below:

    <Case Value="giF">
    <HTML><![CDATA[<IMG SRC="]]></HTML><Column HTMLEncode="TRUE"/><HTML>"</HTML>
    <Column HTMLEncode="TRUE" AutoHyperLink="TRUE"

    In this example the the Switch <Expr> calles the GetFileExtension function which processes the value in the calculated field and tries to extract a file extension.  You can then use a Case statement to render the value returned by the calculated field in a way that makes sense. In the example above - if the GetFileExtension returns the string "giF" then I process the value as an image and render it as an HTML <IMG> tag.

    Note that I chose to take advantage of the fact that the comparison is case sensitive but the source url for the image is not.  This means that if my calculated field returns a string that ends with ".gif" rather than ".giF" then it will slip through the case statement and be rendered as before i.e. not as an image.

    Of course you can modify the above to handle jpeg or any other graphics format that WSS can render.

    3.  Save the modified FieldTypes.xml file.

    4.  Create a Caluclated field in your list in the standard way with a formula that checks the value of your Choice field and returns a URL (relative will work) to the appropriate graphic file making sure that it is a format that will be handled by the newly modified render pattern.  Something like:

    =IF(Choice="A","/imagepath/red.giF", IF(Choice="B", "/imagepath/yellow.giF", "/imagepath/green.giF"))

    Now you can use the calculated field wherever you like.

    This is pretty elegant and nice to do since a) you don’t need to create a DVWP and therefore unghost a page b) it uses CAML which is always cool and c) you can set up a list with this in it so anyone creating a new list of this type will get the results. RenderPattern is a pretty powerful little thing because basically you can do anything in it, including conditional logic.

    NUnit test results stored in a SharePoint list anyone? Yeah, who needs Team Server Foundation when you do stuff like this.

  • An Architect is an Architect, is it?

    Arno Nel recently posted a question about what is Architecture on his blog and some people disagree with what he suggested it was (to be fair to Arno, he asked the question of what people thought about the questions he asked, but I don’t believe he thinks this way).  

    I came across this fairly elegant definition for architecture that tend I agree with and try to emulate in my work:

    "Architecture is the use of abstractions and models to simplify and communicate complex structures and processes to improve understanding and forecasting."

    It’s simple and gets right to the point covering the various aspects of solution or software architecture (at least IMHO).

    Robert Bogue followed up with his own views and the general result was he disagreed with a lot of points Arno made.

    I tend to agree with most of what Robert said where he disagreed with Arno's. We do care about methodologies (maybe not the extent a developer does, but we need to know about the process in order to facilitate communication about and around it). I think Robert hit home with his last point about Architecture being about translating the business problem into IT solutions, not translating IT into Business as Arno stated. I would rephrase this to be communicating business needs using IT solutions, but maybe that’s just mincing words.

    Architecture is about communication and collaboration. I think communication is the key cornerstone in what makes a good architect. Yes, you can draw pretty UML pictures and talk about the fantastic abstractions you did as a child but can you really communicate a business model to an IT guy so much so that he/she can go away and build something that meets the needs of the client? That’s the secret to success. You can build a system that, technically is architecturally perfect, but if it’s not what the customer wanted or explained to you they were looking for, you might as well have built them a pole digger (or insert witty but useless item of your own liking here).

    I used to be a building architect and now I'm a software architect. Is there a difference? From one perspective, lots. From others, not so much. I could probably blog for hours on that subject. Maybe a cup of coffee or a beer next time I’m out at a geek fest (hook up with me at TechEd for example). Now that would be an interesting discussion!

  • Identity and your Domain Model

    I’ve been struggling with a concept today that I wanted to flesh out. I may ramble on but I think there’s a point to be had deep down here (somewhere).

    How often do you see a class begin its life like this:

        5     public class Customer

        6     {

        7         private int id;


        9         public Customer()

       10         {

       11         }


       13         public int Id

       14         {

       15             get { return id; }

       16             set { id = value; }

       17         }

       18     }

    Looks innocent enough, but many times that Id value is there because

    • an object of this class has to eventually persist into a database and someone thought it would be easy to store it here
    • that database uses an identity column and thus, the value in your business entity has to be an integer to maintain a reference to it
    • someone wants to use it in a UI layer so they can retrieve details about the item (DisplayCustomer.aspx?Id=3) (or someone wants to show a “nice” number to a user)

    An identity column (more of a SQL Server term, Oracle can pull it off but it’s a little more involved) is a column that provides a counter for you. In it's simplest form an identity column creates a numeric sequence for you.

    More often than not though, it gets tied (directly or indirectly) to a class design. This is where the fun begins.

    What happens when I want to test this class? When I want to write a test checking that two objects have a unique identity I might write some tests that look like this:

       21     [TestFixture]

       22     public class CustomerFixture

       23     {

       24         [Test]

       25         public void TwoCustomersAreUnique()

       26         {

       27             Customer firstCustomer = new Customer();

       28             Customer secondCustomer = new Customer();

       29             Assert.IsFalse(firstCustomer.Id == secondCustomer.Id);

       30         }

       31     }

    With the above code, my test fails because I haven’t initialized Id to anything so they’re the same. However, in order to initialize them to something unique (each time) I need something to do this. Since Id was put there because someone knew this object was eventually going to be stored in a database it’s easy. Create the customer and when it’s saved (and loaded back into my object) a new Id is created. Voila. Test passes.

    This is great but it means I’m inherently tied to my data source layer (in order to get an identity) to create my business entity. That’s no good for testing.

    Maybe with a mock customer I can fix this, but again I would have to create some kind of mock system that generated id numbers on the fly. Not as easy as it sounds (especially when they have to be unique). In any case, it doesn’t model my business domain and at the end of the day, why do I need some number floating around that tells me what record # my object is in some database somewhere. That has nothing to do with the problem at hand.

    I’m not saying an object couldn’t/shouldn’t/wouldn’t have identity, but a domain objects identity is not it’s ordinal position in a database.

    Eric Evans makes a great statement about this:

    “When an object is distinguished by its identity, rather than its attributes, make this primary to its definition in the model.”

    I completely believe this and try to follow it as best as possible. Given an object (say a bank transaction) where each transaction has to be unique, identity is an important thing. However imagine if you tied bank transactions identities to an endless numbering system in SQL Server? How can I guarantee uniqueness when I have multiple data stores (say an active and passive one). Or a data warehouse. Or an internationally distributed system where I have to generate two unique transaction numbers on each side of the planet. What if someone resets/restarts the identity counter?

    Okay, maybe I’m getting carried away here but eventually, IMHO, the identity approach falls short and you need something better.

    Relying on infrastructure for your domain objects is a bit of a cheat and while even using something like a GUID isn’t perfect (and requires infrastructure as GUIDs are generated from things like hardware) it is pretty much guaranteed to be unique no matter what. Even creating one in Java and one in .NET, on the same machine, at the same time will get you a unique identifier (although I’m not sure if a dual-core system would never generate two GUIDs but I’ll leave that for the weary traveller to test out).

    So if we change our Customer class to use GUIDs for identity we get something like this:

        6 public class Customer

        7 {

        8     private Guid id = Guid.NewGuid();


       10     public Customer()

       11     {

       12     }


       14     public Guid Id

       15     {

       16         get { return id; }

       17         set { id = value; }

       18     }

       19 }

    Now the test we wrote before passes correctly because we have two unique identities for each object, no database required. Much better.

    So all I’m saying is (to quote Jimmy Nisson) “Get rid of those nasty IDENTITY/sequences…” and “let the model set the values, for example by calling a simple service at the right place/time”.

    Just something to consider when you’re building out your classes. Sure, what’s a system without storing it but it doesn’t mean you have to pollute your model with multiple numbers to keep track of something in a database system somewhere. Identity in a database is just that, and not something that you should rely on in your domain (especially if you’re doing TDD and don’t have one).

    Try using GUIDs (or some other method if you prefer, like a service) that will help you keep your domain model pure of what it needs to operate with, and leave the non-business stuff like tracking numbers to the infrastructure layer.

    Note: if you’re still hung up on using identity and SQL to generate ids for your business objects, check out Don Schlichtings article here on getting the right identity.

  • Quick note to start the week

    Just a quick note as I try to wake up and consume large quantities of bucks this morning. I’m still working on the forum web part today. Ran into some security snags (don’t you just love those descriptive error messages, “An error has occurred”) so need to rework some things. Watch for an update shortly.

  • Plumbers at Work - Episode #5 - Pan Galactic Gargle Blaster

    Okay, it’s a couple of weeks later after my other plumber dudes posted this but check out Episode 5 – Pan Galactic Gargle Blaster of the show on our Plumbers @ Work site. In it James, John, and I cover:

    • IronPython v1.0 Beta 4
    • The 73+ Languages in .NET 
    • Windows Workflow Foundation (WinWF) v2.2 CTP 
    • SQL Server 2005 SP1 CTP 
    • Visual Studio SDK CTP 
    • Matt Hawley’s eWorld Controls
    • Multi-Core CPUs and Moore's Law
    • and Leeroy Jenkins
    • Blackberry .NET Development with AppForge's Crossfire
    • Multi-Platform Frameworks
    • Scott Hanselman and DasBlog at Alberta .NET User Group
    • Calgary Code Camp - May 27, 2006
    • Vance Morrison - CLR Performance Dude
    • James on Locks and Lockless Programming
    • Double-Check Locking and CPU Architectures
    • MSDN Canada realDEVELOPMENT_06
    • Time Management with
    • Halo and Aliens

    Podcast Link

    I’m only posting this as we just wrapped up taping Episode #6 tonight so we should have the new show out this week. It was a great show and (at least we) think we’re getting better with each podcast.

    At least let us believe that okay so we don’t crush our already fragile and delicate egos.

  • SharePoint Forums Web Part

    A lot of people have been asking me about my SharePoint Forums Web Part that I posted about at the middle of January. It’s been a busy time since then and I’m working furiously right now to finish it and get it out to you guys as soon as possible.

    It’s a self contained web part and generates all the lists it needs the first time it runs (if they’re not available). All editing operations are performed by the AppPool user so nobody has to have contributor access to the various lists. You define who has what access through the Web Part interface. Here are some more screenshots of the current build and feature set:

    Quoting of previous messages in a thread:


    Fonts and formatting:


    Threaded discussions with all the features:


    Expect a release by the end of the week as I’m just getting the final work done on it. I may have to release it with no documentation but I would rather do that to make it available this week rather than letting it go any longer. Hope you like it!

  • Back to basics, AreSame vs. AreEqual

    I thought I would do a little back to basics today as I was working with some people (new to unit testing) and had to explain the difference between calling Assert.AreEqual vs. Assert.AreSame.

    On the surface, they look identical. They both test expected and actual items and the test will fail if the items don’t match. So here's a simple test:

    public void TestAreSameStrings()
      string expected = "MyString";
      string actual = "MyString";
      Assert.AreSame(expected, actual);

    So this test fails if the strings are different. Obviously they are the same but imagine if we retrieved the string from a property, web service, etc. Then we might be testing the return value from a business entity against a known string value. This test written using Assert.AreEqual instead of Assert.AreSame will be the same result, pass (or green in the NUnit GUI).

    However what if we use integers instead of strings like so:

    public void TestAreSameIntegers()
      int expected = 1;
      int actual = 1;
      Assert.AreSame(expected, actual);

    This test actually fails. It looks like it should pass as it's no different than the string test above right? Let's take a look at this code in IL form using ILDASM:

    IL_0000: ldc.i4.0
    IL_0001: stloc.0
    IL_0002: ldc.i4.0
    IL_0003: stloc.0
    IL_0004: ldloc.0
    IL_0005: box                [mscorlib]System.Int32
    IL_000a: ldloc.1
    IL_000b: box                [mscorlib]System.Int32
    IL_0010: call               void [nunit.framework]NUnit.Framework.Assert::AreSame(object, object)
    IL_0015: ret

    Don't worry about some of the gobbly-gook here, but pay attention to IL_0005 where it calls box. This is known as boxing in .NET and basically converts value types to objects and vice-versa. For more information on boxing check out this article.

    So we know it's loading our integer values but then boxes them into Int32 object types. So when the compare is done, we're comparing two new Int32 objects against each other. While their values are the same, the objects are not (for example every object has a ReferenceEquals method which will return a unique reference). Since we have two different boxed objects here, they are not the same. Strings on the other hand are not boxed so that test works (more on this later).

    The obvious thing we might do is to change the test to use Int32 types instead of int. This will eliminate the boxing problem. Unfortuantely, again, this won't work because we're creating two different objects and the AreSame method is expecting to fail if the entire object is different, not just the value.

    So the rule of thumb here is use AreEqual if you're just comparing values, use AreSame if you really want to compare things at the object level (and you can create two objects that are the same).

    One thing that might be bugging you is the first test with the strings. Surely .NET boxed the strings into a native object so why didn't it fail? If you create this test (and look at the IL code generated) you'll see that strings are reference types already (plus the fact that they're immutable) and thus will produce duplicate items (at the object level). There's a good article here on strings in .NET that you may want to check out. Also you can use "String" and "string" interchangable, as one is just an alias for another. 

    I know this post is basic and it may boil down to NUnit documentation saying "use AreEqual for values, use AreSame for objects" which you can find here but this was a bit of a mystery to some people so I thought I would elaborate here.

  • Pay no attention to the man behind the curtain

    I’m a happy camper. Not only am I be going to be at TechEd and working for the man (read:Microsquishy) as a Technical Expert in the Office System Track at the Technical Learning Center (yeah, just ask me silly questions about SharePoint like you always do) but my Birds of a Feather session, “Getting Ready for the next generation of SharePoint” has been officially accepted by the powers that be.

    Way cool.

    The discussion is tentatively scheduled for Tuesday, June 13, 2006 at 1:00 PM so make sure you bring your popcorn and get your dialog caps on as we’ll be having a rockin’ time chatting it up about Microsoft Office SharePoint Server (MOSS) 2007. As BOFs are really discussions and not presentations, lectures, or sessions, you guys fill the content. I’m really just the goofy looking geek that might take notes and throw in some pithy observations from time to time. In any case, it’ll be a lot of fun. And if things get really boring, we’ll make SharePoint shadow puppets on the wall and balloon animals of your favorite Office assistant (I call dibs on Clippy!).

    See you there and thanks to everyone who voted!

  • Going to TechEd? Get Connected!

    I stumbled across this post from Andrew Connell, a little thing called TechEdConnect. It’s a personal networking system for TechEd so rather than the blog entries of “where are you d00d?” and “let’s all go to the lobby” popping up on your IM, you can hook up with people based on interest, groups, location, number of balloon animals they can make while intoxicated, whatever you want.

    It’s a great idea and while the implementation is a little to be desired (for example I can’t figure out how to find someone based on name) it’s interesting. There are message boards (sort of) for groups so you can chat about where you want to go, etc. and a system for suggestion group meetings (which is great). I’ve added myself to some groups like the “MS SharePoint Users” and “Canadians Invade TechEd”. So if you’re heading down there check out TechEd Connect. Note that it’s a different system than the TechEd registration (and confused me for a bit) so you can sign-up (free) but you need to use the same email you used when you registered for TechEd. Your TechEd username and password will not work there so you need to create a new one.

    I’ve also created a new group called “MVPs” because, for some reason, I can’t see a list of MVPs going to TechEd. So if you’re an MVP and want to join up, add it to your groups and start networking!

    Go ahead, get connected.

  • Hard Core Logo resources

    Here’s the slide deck and links from my presentation at SharePoint Connections last week “Hard Core Logo: A Deep Dive into SharePoint Branding”.

    Slides from Presentation

    Resources referenced
    Branding SharePoint Portal Server Part 1
    Branding SharePoint Server Portal Part 2
    Customization Site for SharePoint
    Heather Solomons Blog

    Tools used
    Style Under Cursor CEWP
    Internet Explorer Developer Toolbar
    SharePoint Style Designer
    SharePoint Predefined Theme Selectors

    Just a note about the last item. This is an aspx page that I have but I can’t track down where I got it from. If you’re the author, let me know. Just drop this file in anywhere (the LAYOUTS directory is a good place as it’s accessible anywhere) and point a page viewer web part at it. It’ll render all the CSS classes on your SPS/WSS page using the styles that are available.


  • Paving your main desktop

    Just a bit of a diversion for a second while I get the DevConnections postings up. I’ve always found that, from time to time, you just have to pave that XP desktop. Even if it’s your main one like I have, every year or two it just gets so screwed up with so many apps being installed/uninstalled/reconfigured that it really needs a fresh restart. I’ve always found that I just pave it over with a new install of whatever the current OS is (or maybe take a leap and run Vista, but I want to be productive here so I might save that for my laptop) and after the install, everything works lickety split.

    However I think I’m at that crossroads again but don’t want to take the leap in the lions mouth.

    I have a zillion programs installed so it’ll be a few days of just figuring out what I have, what I want, and where those disks are. That alone is telling me to keep my current setup going.

    I have gobs of data with My Documents filling up about 150gb on a 350gb drive. This would include a giant collection of eBooks, MP3s that keep me sane, pictures that I really should upload to Flickr and delete them from my system (but I can’t!), and a host of other snippets of stuff.

    All of which is just too much to backup onto tape/cd/dvd/marsupial. I mean, I would need a blank 350gb drive (about $250 bucks these days) just to back everything up which might be an option, but even the backup will take forever and a day.

    There’s just so many things you have to worry about. Favorites, cookies, pst files, local settings, application data, configuration files, wallpapers, etc. The list goes on. Some of these things are just plain impossible to actually backup (try backing up your local settings folder when Windows is running). Also try restoring some of this stuff as it’s in a weird state that sometimes you can’t just copy it in from a backup (sometimes you can, but not always like cookies).

    So anyone with suggestions or ideas? What do you guys do. I mean, I know my system has dust bunnies and I’ve tried a million of the “clean your system better than Windows can” products, but nothing really works that well. The only way I ever find to clean your system is to pave it and re-install. Maybe someone has some alternative options I could explore.

  • Comment spam! Grrrr... Argh...

    Okay, I've had to set the comments to be moderated for now. I've been hit the last few days but some jerk off maggot spambot who enjoys filling my blog comments with links to penis enhancement drugs. The first batch didn't work so like I really need more of those. Anyways, comments will be moderated for now until the drugs stop pouring in. Hey guys, where is our CS upgrade for

  • DevConnection slides to come

    Hi guys, I’m just in the middle of an install of Vista (yeah I know, what a great time to pull that rabbit out of my butt) and have two blog postings to do (probably one of them later tonight once the external drive is free from being backup slave). The first is the slide deck and links to tools for my branding session I gave and the second is the TDD session I gave. No code for the first session but links to all the tools. The second session has all the code for the following demos:

    • NUnit with SharePoint
    • TDD with SharePoint (complete with the Northwind site data)
    • Mocking with SharePoint using PocMock

    Back later!

  • SharePoint Connections - Orlando - Day 6: Survival of the Disney and the Flight Home

    We survived the day yesterday after miles of walking, pounds of eating, and thousands of screaming rugrats. Maybe a post on the days events is yet to come but since we couldn’t convince the Disney organization to switch to SharePoint from their silly DisneyPoint software, this blog isn’t the place for it.

    Of course, I can’t get that freakin’ song out of my head right now.

    Goodbye from Walt and Mickey

    You can check out the full set of pictures here on my Flickr page.

    Now for a day of security probes, checking in bags, flying around the country, airport terminal food, and landing on concrete sometime 12 hours later.

  • SharePoint Connections - Orlando - Day 5: Goodbye DevConnections, Hello Mickey!

    DevConnections is over and we’re off today to visit the Magic Kingdom. No blog entry later on how Goofy I got, but check my Flickr site for pics (DevConnections Set, Orlando Set). Then tommorow it’s airplane day as we spend the better part of the day in large metal tubes floating over the planet as we return to the western part of Canada and Earth again.

    Goodbye Orlando

    It was great seeing old friends (Julie Lerman, Brad Smith, Bob Mixon, Michael Herman, Daniel Larson, etc.) and meeting new ones (Mark Miller, Carl Franklin, Rick Strahl, Scot Hillier, etc.). Hope to see more people at TechEd 2006 in Boston with many more blogs in between.

    Back inna few days!

  • SharePoint Connections - Orlando - Day 4: Back from the Future

    Well I survived my first DevConnections, hope you had the same experience. This day has been pretty busy with two sessions, a few hours in the sun and some R&R. I’m wiped and just taking it easy tonight as tommorow we’re off to the Magic Kingdom to live amongst the screaming kids.

    I have two blog entries I need to put together for each session that you’ll be getting in next couple of days. Each will contain the updated slide deck for each presentation I did (the decks I was using are modified from the CD in your bag), the source code and files that I put together in each session, and links to all the tools I used in each session and where you can get them. Like I said I just need a couple of days to recover, visit Pooh, and put together the notes for you guys.

    Mark Miller goes insane

    Thanks for everyone who came out today. My second session on branding SharePoint seemed to go better than the morning one, but then I was a little more awake and the demos were a little more co-operative with me. Hope you enjoyed them if you were able to catch them and you’ll be seeing follow-up posts with more TDD, branding and SharePoint stuff to come!

    Back tommorow with lots of crazy pictures of Goofy and us trying to get Disney to go SharePoint.

  • SharePoint Connections - Orlando - Day 4: Here we go

    Finally got to my sessions this morning. My first one was Test Driven Development with SharePoint. I did the presenter faus paux and miscalculated my time. I thought I had an hour and a half + time for questions but I only had an hour, so I didn’t get to the mocking demo. I think it was okay and people were engaged. TDD is a hard topic to begin with and it’s hard to cram unit testing, creating tests, making design decisions, etc. in an hour and end up with valuable content (especially when you toss SharePoint infrastructure on top). In any case, it’s an interesting topic and some people said they were going to get into it more (most people, at least based on the feedback, had never heard of unit testing before). I’m not making excuses here, just wish I had more time.

    I’m just going over my branding and customization session now for this afternoon. It’s mostly demo based so lots of SharePoint stuff, few slides (which I prefer) so we’ll see how that goes. I want people to be honest with feedback so if I suck, tell me. I won’t bite. There’s also a Q&A period for half an hour for everyone and a bunch of us will be on stage for that (as well as giving away prizes) so be sure to make your way there at 3:00pm.

    Rob Howard and his IBM

    Anyways, all the code for the sessions along with the slide decks will be available tonight or tommorow. The code isn’t going to be a lot of use because you need some understanding of why it’s written that way, but if you do download it and need more information just fire me off an email and let me know.

    Back later on how the afternoon goes.

  • SharePoint Connections - Orlando - Day 3: MVP for another year

    Hey kids, guess who’s most annoying SharePoint MVP is back again for another year? Yup, my anniversary came up and I lucked out and Microsquishy wants me back for another year. It was tense going there so I figure I got the sympathy MVP vote but for what it’s worth you got me as a SharePoint MVP until next April. Time to celebrate with some alligator tails and other slimy Florida fare.

  • SharePoint Connections - Orlando - Day 3: Sessions, sessions, sessions

    It was a slow(er) blogging day yesterday at the show as I was running around madly getting updated with the vendors here, meeting new people, making trouble in the speakers room, and generally enjoying the Florida sunshine. Mos the day the speakers were in the speakers room, wildly typing up code, tweaking presentations and generally having fun (although at times it was pretty intense in there). I think Carl Franklin and Rick Strahl were in the the entire day (although Carl claims he did leave for a bathroom break a couple of times).

    I had a great chat with Mark Miller of DevExpress about Code Rush and Refactor. I’m slowly shifting from ReSharper over to the CodeRush camp as various people like Hanselman totally convinced me (watch this guy code with these tools, he’s a machine). Mark really knows his stuff and they have a great attitude towards their customers and the community. If you haven’t seen the training videos yet, please do but they’re only part of the magic that is Code Rush. Also, the DxCore, the engine that runs Code Rush, is completely free and very, very powerful. There are some great things you can do just with DxCore so be sure to check that out. Mark is so confident (and well versed) with Code Rush that he’s got a crazy session today. He’s going in with no code, no slides, nothing. Just the notion that he’s going to build an add-on, tool, or whatever using Code Rush based on audience participation. This is writing code in a straightjacket at it’s finest. We think he’ll do fine (even if he is insane).


    Lunch was fun as we jammed with Fitz and Tom Rizzo between their sessions. They presented a few tandem sessions on Microsoft Office SharePoint Server 2007 (MOSS) which was nice (if you didn’t catch the info at PDC or the Office dev cons yet). Lots of great demos and even some code with even more great questions. This is going to be the best year for SharePoint. Not only are there more SharePoint vendors at this conference than any others, but the number 1 selling book at the conference is SharePoint 2003 Advanced Concepts by Jason Nadrowski and Stacy Draper (which I’m going to pick up to check out now). Since I couldn’t snap a picture of him on stage I figured I would do the next best thing, catch him eating. This is truely Microsoft Unplugged.

    Butter Fitz

    Today it’s sessions, sessions, sessions and I’m off to pop in to see various people and tweak my sessions for tommorow. Back later with more pics and updates.

  • SharePoint Connections - Orlando - Day 2: Let the tips begin

    I’m in the speakers room with some great people like Billy Hollis, Carl Franklin, and others.

    Billy mentioned a tip that most of us here didn’t know. By default, in IE6, there’s a scripting section in the Advanced tab of the Security settings and it enables peeking into the the Windows clipboard. You can test this by going to Project IP to see your settings. Scroll down to the bottom and if it’s turned on (the default) whatever is on your clipboard will be there. You can turn this off (and I suggest you do this) so sites can’t exploit this “feature”.

    Okay, that’s my sane tip for the day. Back to the screwy life that is DevConnections.

  • SharePoint Connections - Orlando - Day 1: Here there be alligators

    Yup, alligators. I said it right. There are alligators here in Orlando. Not only that, but at dinner tonight I ate one. Well, a tail anyways. Very odd as we were having dinner tonight and there was Florida Gator Tail on the menu. I had to do a second look but it was there. The waitress confirmed it and yup, gator was being served up at $9.50 a basket. Since I snapped a picture of the sign warning us of gators, I figure they just would go out to the lake and wrangle up one to serve for the night. Nothing like fresh amphibian to start of the evening. I just had to try some so I ordered it, even though I’m sure I’ve violated at least 9 separate PETA by-laws and a half dozen infractions for eating the poor little bugger. And yes, you guessed it. It tasted like chicken.

    Beware of aligators!

    I missed Scott Guthries keynote as I favoured chowing down on some gator instead (sorry Scott). It was good (the keynote, the gator was a little rubbery) and covered a lot of Atlas stuff (Web 2.0, blah, blah, blah). Atlas is a big part of the conference here and you’ll find a lot of it (including Atlas and SharePoint integration). You can catch a video of an Atlas demo which is very similar to what Scott presented at tonights keynote here (although I think his keynote might be available online via the DevConnections sight shortly). The rest of the night here was mostly spent schmoozing (official word) with the vendors. SharePoint vendors dominate a large part of the booths here and there are some great people presenting great products.

    The CorasWorks guys are here with their products. I was involved with CorasWorks way back when they started (I think I was like their 9th customer or something). They’ve just passed their 650th customer and keep growing. It’s guys like these that enhance what SharePoint can do out of the box, and provide really nice web part frameworks that do cool stuff. If it’s a choice between spending a couple of weeks building stuff or buying a supported third party product like theirs, I choose them hands down. It’s vendors like these guys (and others) that fill the gap that SharePoint misses or enhances what SharePoint provides. Remember they were the first with “roll-ups” and while it’s going to be a standard in the 2007 product, 3rd party products like these are always value-added and worth taking a look at so check them out.

    The CorasWorks Guys

    Not to be out done by the two guys and a small dog setup at CorasWorks, I stopped by the Bamboo Solutions booth to chat with the gang there. Yes, those are real girls in the picture and they hang out and know SharePoint stuff. So what if there’s a 5:1 ratio of women to men, they make cool web parts. They’ve been putting together a lot of little web parts that make sense and again, fill a gap where SharePoint might fall a little short. If you’re down at the conference and have a chance to check them out, drop by and say hi and see what they have to offer. Who says IT isn’t exciting?

    The Bamboo Solution Babes

    Finally I stumbled over a few MVPs and other presenters here. Some I knew, others I met for the first time. These shows are always a great place to get to meet old friends, create some new ones, and avoid the ones you don’t want to talk to. Brad Smith is doing a session on SOA and SharePoint here and like the last picture I snapped of him at the MVP Summit, here he is in his typical Brad pose, drinking his face off. Man, what a great job he has to be shuffled off to conferences to drink. Keep the faith Brad!

    Brad and Adam

    So remember to hunt me down at the conference and say hi. Tell me you hate my blog. Profess your love of SharePoint to me. Bore me with a story about your latest SharePoint installation. I’m easy.

  • SharePoint Connections - Orlando - Day 1: The Beauty of Orlando

    Wow. All I can say is wow. Being in Calgary, I’m not easily impressed. I mean, when you live next to the Rocky Mountains and wake up in the morning to see 3,000,000 tons of rock jutting up into the landscape it does take your breath away sometimes. We’ve only taken a quick walk around here but even the pictures I snapped from the hotel room are jaw dropping (and that’s saying a lot as I’m a craptastic photographer). Anyways, here’s the view out of our room.

    Hyatt Regency Grand Cypress

    Nice huh? Bet you were here huh? Huh Andrew huh?

    Registration is complete as I picked up my official secret decoder ring for the conference and the uber cool shirts they gave us. The keynote starts at 6:30 tonight and there are a few workshops going on right now. Also the expo hall opens tonight around 8, so expect the swag posts to kick in (I already have a little swag from the initial bag but I’ll post my ill-gotten booty later tonight after I raid the vendor booths).

    For the photobug in you I’ve created a couple of sets in Flickr to view my pics. I have an Orlando set which will just be boring vacation type pics. They’re nice if you’re looking for a sunny disposition. I also have a DevConnections April 2006 set which will contain pics from the conference (and the wild debauchery that will take place after hours).

    If you’re around the conference IM me or look for the geek who’s taking all the pictures.

  • SharePoint Connections - Orlando - Day 0: Elvis has landed

    We have arrived, and the world is still standing. Wow, I have to say the Hyatt Grand Cypress is simply fabulous. It’s been a long day with getting up around 6am (Calgary time) and we checked in around 12am (Florida time). So that’s about 20 hours or 1 complete download of Windows Vista. I’m, in a word, beat.

    Hyatt Grand Cypress

    The day started off okay. We had to take an exhausting flight from Calgary to Toronto, then hop on down to Florida. Okay. The Calgary flight wasn’t so bad other than the fact we had none other than Cruela DeVille on board. Seriously. This chick had bleached white hair with some black “highlights” in various places. Either she was a bad reject from a Disney casting call, or really wanted to form the first punk band with an all 50+ crew. In any case, I couldn’t snap a pic of her without her beating me within an inch of my life so you’ll just have to use your imagination on this but trust me, she was the real deal.

    Put that camera away

    We pulled into Toronto and had to hop over to Terminal 2 to board for the States. Terminator 2 is more like it as it was desolate of any real form of life. That is until we got through customs and saw what was waiting for us.

    200 screaming kids, teens, and burnt out surfers all heading home for the holidays.

    Oh god.

    My brain started to melt and if I wasn’t in an airport, I was going to scream bloody blue murder and kill everyone of the little buggers on the spot (especially the 10 year old who kept insisting on “skating” by with her stupid roller runners). Not only that, we hunted desperately for some semblance of reality called the internet. Yeah, we found it. A lonely terminal that you had to slip a credit card into and use their keyboard and monitor. With no chair in sight.

    What the hell is wrong with Toronto?

    I’m originally from the greater T.O. area and moved out to Cowtown a lot more years ago than I want to admit. At least in Calgary we could get WiFi through Telus (for a price). In Toronto, nothing. Not even a blip. A vast wasteland of emptyness. This is superior western technology? Someone needs to right some wrong in Terminal 2.

    Terminal 2

    Like I said the room and hotel is fantastic as we mow down on some late night cheesecake and pepsi however there is one complaint. The internet connection blows Grand Cypress chunks. Not only did I have to pay $30 bucks for 5 days worth of connctivity, but my Flickr upload tool doesn’t seem to work, RSS Bandit is choking on a few simple tasks, and I fear I’m not going to be able to upload this posting using BlogJet. It’s a direct connection in the room, but there’s some wonky proxy setup which is just screwing with everything here. At least they’ll have a connection down in the conference for us, but I need to get some work done in my room so I’m just going to be grumbling all week about it.

    I’m uploading all the pics from the trip to my Flickr site and tagging the conference pics with “devconnections” so feel free to do the same and let me know. Maybe we should get a public pool going.

    Anyways, pushing the 20+ hour mark means it’s bedtime for bonzo so we’ll be back in the morning with pics of all the little Disneyites and that process we call conference registration.

    You can keep up to date on the goings on at the DevConnections blog here (and of course tune in to my blog, same bat time same bat RSS channel).


  • Windows SharePoint Services To Be Open Source With 2007 Microsoft Office Release

    This kind of caught me by surprise, but then us MVPs are always the last to know. It seems with the release of SharePoint 2007 later this year, Microsquishy will be opening up the source code to Windows SharePoint Services. Here’s an excerpt from the press release:

    REDMOND, Wash. — Apr. 1, 2006 — Microsoft Corp. today announced that the source code for its upcoming 2007 Microsoft® Office system product, previously code-named Microsoft Office “12,” will be released by the end of 2006. The 2007 release is designed to increase individual impact, simplify collaboration, streamline business processes and content management, and improve business insight. The source code is the human readable scripts that tell programs what to do. Windows SharePoint Server 3.0 is the cornerstone for the Office 2007 Server products and forms the key element in creating collaboration solutions. Microsoft will make available both supported and non-supported packaging options to make it easier for customers to select what is right for them and download solutions that best meet their unique business needs.

    Sounds very cool for a lot of us who want to not only know how the unpinnings of SharePoint work, but also how to best write tools and utilities against it. You can read the full press release here.


  • SharePoint Connections... here we come!

    It’s about 12 hours before I hit the airport to head off to Orlando for SharePoint Connections. After that it’s a few hours flight to Toronto, hang out in airport for a couple of hours sans wireless (thanks airport jerks) and then fly down into the land of oranges. Seriously, why is it that airports can’t offer free wifi? Is it really that difficult to help out a guy who has to hang out for a couple of hours in a terminal by giving us a free connection to check our mail? If I flew as much as some people did, I would get the Verizon coverage where it’s $40 per month and you get worldwide coverage. Well, at least there’s Timmies and my unexhausted supply of double-doubles.

    I’ll be heavily blogging from here until next week with dialy pics of the conference, the crazy “Geeks Gone Wild” after hour parties, and the wonder that is Disneyland (or is it Disneyworld down there?). So if you enjoyed my coverage of PDC, expect the same thing. Otherwise tune out of my blog for the next week and go read Scoble or something. There’s a DevConnections blog that will be updated with information about the conference so check that out for the aggregation of what’s happening down there.


  • TDD isn't enough

    There’s been a bit of a bru-ha-ha recently with Rocky Lhotka’s comments on TDD (which I’m listening to for a refresher). This touched off a few posts, but unlike the Microsoft got TDD wrong incident a few months ago, discussions are pretty level headed all around. Jeffrey Palermo had a good post to get things started and Rocky has followed up with an excellent post called Forests, trees, testing and design. All good stuff for those that are interested and juxtaposing positions of arguments is usually the best way to elevate awareness of something and introduce discussion. This one certainly has.

    As I’m giving a session next week on TDD and SharePoint I thought I would stress the fact that TDD isn’t the be all and end all to development. Just like unit testing. Just like any practice. As Jeffrey Palermo stated “A comprehensive testing strategy is a must, and testers should have a good testing plan.”. Actually I would say developers should have a good testing plan. The line is slowly being blurred between developers and testers, just like it’s happening between developers and designers and it’s important to know what needs to be done.

    I don’t subscribe to the TDD purists about 100% tests written for 100% lines of business code. That’s a nice utopia to think about, but there still is user acceptance testing, functional testing, etc. and some things that, while they might be able to be automated, can’t be realized up front. There’s a term in Agile called Big Design Up Front (BDUF). You’ve probably seen it before. The developer comes out with a giant UML/Class diagram with all kinds of classes and methods specified. As a guy that practices and tries to strive for a clean object design, I usually question a lot of classes when I see them. To the guy who made that big diagram it probably makes sense to him but when you pose the question to him (and this happened recently for me) they usually get to the point of saying “Well, I guess we really don’t need that set of classes”. With TDD you get this up front (or can) so I would much prefer to see my domain evolve as needed, based on requirements (rather than some developer saying we need this class and that class).

    In any case, practising TDD and always writing tests first isn’t always enough. It’s a small part of a larger world. You do want to test your business functionality, but in a lot of applications I keep seeing there’s very little real “business logic” and more “access logic”, “transaction logic”, and “dependency logic”. Access logic is where you put some kind of rule in a business class getter like this:

        5 public class Customer

        6     {

        7         private string firstName;


        9         public Customer()

       10         {

       11         }


       13         public string FirstName

       14         {

       15             get { return firstName; }

       16             set

       17             {

       18                 if(value.Length > 50)

       19                     throw new ApplicationException("First Name is too long.");

       20                 firstName = value;

       21             }

       22         }

       23     }

    So you do want a test to ensure that you’re not exceeding your string length here, but this is pretty simple and could be done using either TDD or building the object first (yes, the example is a bit lame because I probably wouldn’t throw an exception here and you could use attributes on the property instead, blah, blah, blah, blah). Is this business logic? Maybe, and it does need a test but probably only one will suffice and you certainly don’t need TDD to arrive at this.

    Transaction logic is where you end up doing a lot of testing just to make sure something gets in one end and out the other. I see so many examples of this where someone passes a DataSet to a method, fills it, throws it back (or uses a ref object), lather, rinse, repeat. This is so non-OO it’s not funny so writing tests or calling this business logic is just plain silly. Yes, objects need properties set to be of any value (for the most part) but OO is about behaviour not data.

    Dependency logic is the big, bad, wolf of the BDUF syndrome and if you create that giant class diagram, expect to see this a lot. Take a look at this test:

        9 [TestFixture]

       10     public class ActivityTestFixture

       11     {

       12         [Test]

       13         public void PlannedManHours()

       14         {

       15             Activity activity = new Activity(new Template(new Job(), new Discipline()));

       16             int expectedHours = 100;

       17             int actualHours = activity.PlannedManHours;

       18             Assert.AreEqual(expectedHours, actualHours);

       19         }

       20     }

    It was for testing something and get some estimate of hours. The test looks REALLY ugly because as we fleshed it out (using TDD) it became immediately apparent that we needed to create 3 separate classes (in a certain order) just to get the object we really wanted to test. Not the best class design I’ve seen and something that looked okay on a big class diagram but when you got down to it, you realize that you have this crazy dependency between your classes and in order to test them, you need to create a giant hierarchy of objects. TDD would have brought this out at the forefront (or at least identified it early or helped with the design a little better).

    Okay, so I got a little off track here but really it’s about balance. TDD by itself as a testing methodology or a design methodology just doesn’t work. It needs help from other things. Sometimes those things are class design, unit tests, etc. and they all balance each other in order for you to get your job done. Whether you use TDD or not is up to you of course but you need to use a multitude of things to balance it out. It’s like SharePoint. It’s a mish-mash of technologies as just one isn’t enough. Use what you need when you need it, and try to keep it level across your solution.

    Now playing: Carl Franklin - CSLA.NET 2.0 with Rocky Lhotka

  • Hanselman hits Calgary

    Yesterday the Alberta.NET User Group hosted a session with the glucose pilot himself, Scott Hanselman. Scott presented an overview of DasBlog, the blogging software he currently is the keeper of, and some ideas around how to leverage concepts that DasBlog uses (like having people use RSS in say a Bug Tracking system rather than filling up your inbox with emails). This is a key concept in that it’s not that RSS is just a tool for blogs (yeah, they use them) but it’s a mechanism that you can employ in your own business apps.

    Product Placement

    One example he gave was a crappy COM application (that will remain nameless) that he wrapped a .NET assembly around and then RSS enabled it with code from DasBlog. The result? An RSS feed that you could consume in any aggregator from a legacy tool that was written long before RSS was a wet dream. Scott is the chief architect at a company called Corillian and one of the examples he showed was using the RSS component from DasBlog in his finance software for retrieving bank balances and account information. RSS isn’t just for blogs.

    Intense Coding

    I highly suggest you to check out DasBlog if you haven’t already. The source is available and contains a lot of great examples and patterns of good design and implementation (and some not so good, but hey, it’s an evolutionary process).

  • Look kids, new technology!

    You know, when Microsquishy lifted the NDA ban on us lowly MVPs (and others) to go forth and blog about Office 2007 (and specifically SharePoint) we all thought there would be a flood of cool new stuff? Where’s the flood? Okay, I’m as much to blame since I was all biting at the bit to get going yet I haven’t posted a single screenie. Anyways, Mart Muller broke the silence and has a great SharePoint 2007 tip on versioning in document libraries, complete with lots of cool screenshots so you can take a peek at the new interface.

    Also I stumbled across a very cool NavigableCmdletProvider widget for Monad which lets you use the new Microsoft shell and treat SharePoint sites like a file share. This is a new technology that Monad enables via a provider and Oisin Grehan put together (through some poking around in Reflector) his own provider to talk to SharePoint. It’s just a start and he hasn’t implemented everything, but gentlemen, this is the very cool thing that cool things are made of. I mean, new web parts, 2007 screenshots and cool tools are great, but who would have thunk to put together Monad and SharePoint this way? Major geek points in my books for this add-in which you can check out here.

  • Voting closes tommorow for BOF sessions at TechEd 2006

    If you’re heading to TechEd 2006 in Boston June 11–16 then you’ll want to vote on your favorite topics in the Birds of a Feather sessions on the coolest things like say, SharePoint! Okay, so you’re probably not heading to TechEd and even if you were, why on Earth would you want to listen to me for an hour blubbering about, of all things, SharePoint?


    Okay, I got nothing but my session will be about 2007 and what you, as a developer, want to know as we dive head-on into the wacky ASP.NET 2.0, workflow enabled, security trimmed world that is Microsoft Office SharePoint Server 2007.

    Anyways, I’m just going to keep moaning and complaining about it until you vote and send a geek like me to camp. So please vote for my session, just because a nerd needs all the popularity he can get these days and hey, what’s another hour out of your day.

    While you’re at it, there are some pretty cool other BOF sessions you should check out as well. Heather Solomon has one that sounds pretty slick about customizing the SharePoint interface, John Lam and Scott Hanselman dives into Ruby and .NET which will be interesting (and I might finally learn something about Ruby), and don’t miss Jeffery Palermo and his discussion on Agile and .NET. Should be a blast so vote for your favorites and then just vote for me.

  • Oracle gets into the "Express Edition" game

    As the latte kicks in this morning, I thought this was interesting. With Microsoft touting their free line of Visual Studio Express and SQL Server 2005 Express products to get developers interested in building .NET systems, it seems Oracle has finally broken down and done the same thing.

    They now have an entry-level database with a small footprint and of course, free (not sure if that’s free as in speech or free as in beer, as I always get confused when beer is involved). Built on the same code base as Oracle Database 10g Release 2 so if you’re building apps or want to maintain compatibilty with the big, bad, expensive machine called Oracle then this might be for you.

    Here’s the rather bizzare link to download your own copy (the original link I got redirected about a million times to this page, gotta love those crazy database guys).


  • TechEd 2006, Birds of a Feather, DevConnections, and Hanselman in Calgary

    Just a reminder of a couple of things coming up as I get a few things in order. Next week I’m at SharePoint Connections and presenting on Wednesday. It’s going to kick and we’ll be doing some pretty cool stuff during the sessions (I’m still tweaking things, updating code, and generally polishing the presentation for you now). Slide decks and code will be online after the presentation and I’ll be blogging everyday about what’s happening in other areas as Microsquishy talks about Office 2007 and SharePoint. I’ll be around the entire conference so hit me up for some mashing or something. Whatever mashing is.

    Also my TechEd 2006 Birds of a Feather session proposal “Getting Ready for the next generation of SharePoint” is still avaiable for public viewing so please vote here (you have until Friday). I think it’ll rock and we’ll have some fun so show your support, vote, hang out, send emails, talk amongst your friends and hit me up for some mashing or something. Still don’t know what mashing is.

    Tonight we’re meeting Scott Hanselman as he braves the cold (it’s really not that cold here today) and comes to Calgary to present “Anatomy of a Successful ASP.NET Application - Inside DasBlog” to the Alberta .NET User Group tommorow. There’s still space to register so head to the website because you can’t miss seeing Scott and his presentation kung-fu. Watch for pics coming soon here.

  • Scrumm for Team System, free as in beer

    Conchango is a consultant services provider focused on delivering solutions to improve the business performance of companies through the application of information technology. I’ve been testing their Scrum for Team System product for awhile now and now they’ve released it as freeware.

    Scrum for Team System is a free Agile Software Development Methodology add-in for Microsoft Visual Studio Team System and was developed with the help of Ken Schwaber (the father of Scrum). It’s a process template for Team Foundation Server that enables Microsoft's lifecycle tools to express their behaviour in terms of the processes, terminology and artefacts of Scrum. The add-in is pretty slick and covers all the major aspects of Scrum and is a much better implementation (IMHO) over something like MSF for Agile (that comes OOTB with TFS).

    So check it out if you’re looking to adopt the Scrum process into your Team Foundation Server world. You can download the add-in for free from here (registration required, but free remember).

  • Mashing it up in Calgary in June

    In May and June of this year (that would be 2006 for those that are not paying attention or just lost track of time) the Canadian Developer Evangelist group are  heading out on the Real Development Tour to 5 Canadian cities:

    • Tuesday, May 30, 2006 – OTTAWA
    • Thursday, June 01, 2006 – TORONTO
    • Tuesday, June 06, 2006 – MONTREAL
    • Thursday, June 08, 2006 – VANCOUVER
    • Tuesday, June 13, 2006 – CALGARY

    The tour will focus on Web Development (morning) and Security (afternoon). All details (and a pretty cool animation :-) ) can be found at

    There will be some mashup sessions during lunch and towards the end of the day. I’m not sure if I’ll make it as TechEd 2006 overlaps with this date, so we’ll see where I end up (and who will listen). The final session will be more attendee driven (that would be you) so it might be really fun with some demos that address common painpoints in developer land.

    Hope to see you out there so register early!

  • Addison-Wesley announces definitive SharePoint book

    Okay, so how definitive? Like would you ever buy another SharePoint book in your life? I guess that’s all relative. Anyways, here’s the marketing blurb for Addison-Wesleys latest SharePoint book.

    SharePoint 2003 Advanced Concepts: Site Definitions, Custom Templates, and Global Customizations

    • By Jason Nadrowski, Stacy Draper. 
    • Published by Addison Wesley Professional. 
    • Series: Microsoft Windows Server System Series.

    In SharePoint 2003 Advanced Concepts, two world-class SharePoint consultants show how to make SharePoint "jump through hoops" for you-and do exactly what you want.

    Jason Nadrowski and Stacy Draper have built several of the world's largest SharePoint implementations for a number of Fortune 50 enterprise customers. Now, drawing on their extraordinary "in the trenches" experience, they present solutions, techniques, and examples you simply won't find anywhere else.

    SharePoint 2003 Advanced Concepts addresses every facet of SharePoint customization, from site templates and definitions to document libraries and custom properties. The authors cover both Windows SharePoint Services and SharePoint Portal Server 2003 and illuminate SharePoint's interactions with other technologies-helping you troubleshoot problems far more effectively.

    Next time you encounter a tough SharePoint development or administration challenge, don't waste time: get your proven solution right here, in SharePoint 2003 Advanced Concepts.

    • Construct more powerful site and list templates
    • Control how SharePoint uses ghosted and unghosted pages
    • Use custom site definitions to gain finer control over your site
    • Build list definitions with custom metadata, views, and forms
    • Troubleshoot WEBTEMP, ONET.XML, SCHEMA.XML, SharePoint databases, and their interactions
    • Create custom property types to extend SharePoint's functionality
    • Integrate with other systems and SharePoint sites so that you can use their information more effectively
    • Change themes and edit Help, one step at a time
    • Customize email alerts and system notifications
    • Extend the capabilities of document libraries
    • Control document display and behavior based on extensions

    They have Online Sample Chapters available here on custom SharePoint 2003 templates. Enjoy!

  • And thus the NDA was lifted, let the blogging begin...

    As of today, Microsoft has lifted the NDA for Office “12” beta testers. So now we’re free and clear to blog about Microsoft® Office SharePoint® Server 2007. The floodgates are open, now there’s a surf building that will be unleashed shortly. This is great news as there are so many fantastic features and information that we want to show you before the public beta later this year. Now we can. Here’s the official word from Microsoft on this:

    As of March 21, 2006, Microsoft is officially lifting our previous request for non-disclosure of Office Server products. This change in our NDA policy is driven by the open nature of the Office Developers Conference and the information that is being covered at that event.

    The following things are now public:

    • Product naming and packaging
    • All Client applications, including Groove 2007 
    • All Server applications, including both capabilities and feature-level server details 
    • Key investment areas (collaboration, Business Intelligence, Enterprise Content Management, Enterprise Project Management).

    There are still a few things that will be kept under wraps, but nothing vital so stay tuned from now until Beta 2 as we discuss capabilties and features of SharePoint Server 2007. No post right now as I’m just getting caught up on a million emails and such, but will be coming back with new information and details about the next version of SharePoint for you (this goes to say that I’ll still blog about the current version, but mix in the new SharePoint Server 2007 products and features along with it from time to time).

  • A little bit of everything

    I'm woefully behind on blog posts and getting things done (although I think I'll take a look at the whole GTD wave to see if it has any more value than the Richard Simmons diet). There are a ton of great things happening and I'm crazy busy between running around and getting ready for Orlando at the end of the month. Basically between now and then there's a heap of things happening including demos, presentations, DotNetNuke, SharePoint, Forums, dasBlog, and a wealth of other things. I'll try to keep you guys as informed as possible as there is a LOT of cool stuff coming.

    On the homefront, we've setup the Calgary Code Camp site. The original Code Camp was a conglomeration of ideas by many different people across the development community. The idea was simple – provide an off hour forum for the development community to speak and share ideas for them to come and enjoy. Code Camps are about the developer community at large. They are meant to be a place for developers to come and learn from their peers. Topics are always based on community interest and never determined by anyone other than the community. Code Camps are always free for attendees.

    The Calgary Code Camp site is up and running so we're looking for speakers, volunteers and attendees. The date will be May 27, 2006 (location to be announced) so get your coding crayons together and come down for a killer day in Calgary.

  • Life, the Universe, and Everything

    I’m about a week late on posting this but we finished taping last nights episode of Plumbers @ Work. Here are the shownotes and links from the last show. Both  Dan and myself were absent from that one so it was John and James all the way.

    Next show in a couple of weeks should have all 4 plumbers back and the show we taped last night should be online soon (I keep saying “taping” but it’s really recording isn’t it. I’m so dated eh?)

    • Introduction
    • News Bytes: Renaming of Office "12" to Office 2007
    • News Bytes: Release Date for Team Foundation Server (TFS)
    • News Bytes: WSCF 0.6
    • Developer Destination: HanselMinutes
    • Discussion about Reflector
    • Discussion about SysInternals
    • Developer Destination: .NET Kicks
    • Developer Destination: DNR TV
    • Discussion about Screencasting
    • Calgary .NET User Group
    • Site Navigation in ASP.NET 2.0
    • WebParts in ASP.NET 2.0
    • Upcoming Speakers for Calgary .NET User Group
    • Discussion about AJAX and ASP.NET "Atlas"
    • Test Driven Development (TDD) in AJAX
    • Dan Sellers' WebCast Series - Security on the Brain
    • Canadian Developers Blog
    • Discussion about WinFX
    • Overview of Windows Communication Foundation (WCF)
    • Overview of Windows Presentation Foundation (WPF)
    • Overview of Extensible Application Markup Language (XAML)
    • Overview of Windows Workflow Foundation (WF)
    • Discussion about Workflows and Activities
    • Windows WorkFlow Foundation (WF) versus BizTalk Server (BTS)
    • Overview of the Windows Shell (AKA, "Monad")
    • Don Box's Weblog Post on SOAP versus REST in WCF
    • Overview of SOAP and REST
    • Multi-Core CPUs and the Future with Concurrency

    Running time: 56:34

    Here’s the link to the episode page (with links to all the references and the recording itself). We’ve also upgraded the Plumbers @ Work site to Community Server 2.0 and it looks great.

  • Calling all non-admin SharePoint developers... uh, help?

    I try to be a good citizen, I really try. I tried to take the plunge today to create a non-admin user account to do SharePoint development. Yes, I’m the evil MVP that for the last few years has been running as, gasp, Administrator. I found that when I do a run-as command and launch Internet Exploder, some sites don’t render propertly. They’re fine if I log on as the user but not if I do a run-as.

    Anyways, I figured it was about time I stopped using the God account and tried the least-user privledge approach on my Windows 2003 Server (I’m sure my place on the respecto-meter will go up with Dan on this). So I created a new regular Joe User account and started tweaking things to make sure I wasn’t able to be uber-admin guy accidently.

    All is fine and well and I can build Web Parts, deploy, etc. but I’m screwed for debugging. I’ve added the account to the following groups: Debugger Users, IIS_WPG, and VS Developers. This is the standard thing everyone tells you to do (IIS_WPG is for SharePoint, otherwise the other two will work for regular VS development). When I launch the debugger in VS2003, I get the infamous dialog:

    What’s a girl to do. I’ve tried every suggestion I’ve seen out there but the dialog is pretty un-informative. Any tools out there that I can use to see what right the system is trying to do so I can set it up? Note that the dialog says “Access is denied” but I have no idea what access it’s referring to. Kinda sucks so I’m temporarily flipping back to my Administrator account until I can get this to work.

    Like I said, everything works fine except for debugging (which if I had complete coverage on my tests I probably wouldn’t need to debug, but that’s another blog).

    Note: I’ve tried the following pages and suggestions so please don’t tell me to visit these as they don’t work in my case (for SharePoint development, even Angus’ post)

    Note: My favorite tool, SharePoint Explorer, seems to be hard coded to only run for a local admin. Any ideas on this issue as well? There are some solutions out there (MakeMeAdmin is one) but it seems SharePoint Explorer really needs the user to be the local admin and not just an elevated user. Pity.

  • Finding NUnit Examples

    It's sometimes hard to learn a new talent when you have nothing to go on. Software development is like that. You learn the mechanics and get the lingo down, master the tools, yet you're still looking for that elusive way to get going. Each person learns differently and those of us that learn by example are sometimes left out to pasture when you're talking about learning things like unit testing.

    Unit testing is an art as much as it is a science, so for those that are looking for good examples, we often turn up the same AddBalanceToBankAccount test that keeps coming up. There are great examples out there, but they are examples written for the purpose of providing an example rather than a real test in the context of a real system. So where are the real projects with real tests?

    I've put a list together of projects that have unit tests available to them. As these are all open source and you're welcome to just look at them for the learning value of seeing what a set of unit tests in a system look like. What makes a good test and how does it relate to problems people thought needed testing. There are some very good examples here (and some projects that have oodles of tests, like Mono and Microsofts Enterprise Libraries).

    You can find the sample page on the Wiki page here. While it’s a page on the site (which is .NET based) it does contain Java and other language references but I figured it would be a good thing for completeness (XPlanner has a great set of tests to look at). After all, reading Java and C# is like the difference between color and colour.


  • Going to TechEd? Vote for me, vote for me, vote for me

    Are you going to TechEd 2006 this June? What better chance to spend some time kicking back and talking about the next version of SharePoint from a developers perspective. Want to mellow out with me and a room of screaming geeks for an hour or so? Want to be the ruler of your own nation?

    I’ve submitted a Birds-of-a-Feather session called Getting Ready for the next generation of SharePoint that I would love to see happen. Birds-of-a-Feather sessions are a one-hour open, moderated discussion on any topic of great interest to TechEd conference attendees. Birds of a Feather sessions are not presentations or panel discussions. There are no speakers and no slides. A microphone and whiteboard will be available, but there will be no projection equipment (BYOBA[1]). Here’s the blurb for my submission:

    The next version of SharePoint has a new name, a new face, and a plethora of new features that are just itching to be scratched by the development community. Come share your questions, concerns, and ideas with others heading towards the same path. It's casual and we'll have an informal developer rap about the potential to unlock some of the great new features of the system. Discuss with others, passionate about the new technology, and how you can ahead of the curve for developing your own solutions, big, small, or otherwise with the next version of Microsoft Office SharePoint Server 2007.

    So if you’re heading to TechEd and want to see the session happen, please vote for it. If you’re not going to TechEd, then you might as well vote for me as I can blog about it after the fact and all the cool stuff you missed out on because your company was too cheap to send you to Boston for a conference. Oh hell, just vote for it. It’ll be better for everyone in the end.

    [1] BYOBA: Bring your own balloon animals

  • Ask the Doofus

    Yup, today you can drop by the TechNet BUILD '06 show at Paramount Chinook here in Calgary. I’m there most of the day hanging out, answering questions, signing autographs, sneaking into movies. You know, geek stuff.

    There’s an Ask The Experts booth (although there’s only one of me so you can hardly call it “Experts”) so drop by and say hi. We’ll make balloon animals and connect USB ports to them.

  • Know the difference between SPWeb.Users and SPWeb.SiteUsers

    Getting lists of users is easy, when you know how. There are some subtle differences that might trip you up when you’re looking to retrieve a list of users from a SharePoint Site or Portal Area. The SPWeb class has two properties, Users and SiteUsers. Here’s the documentation on each:

    SPWeb.Users Gets the collection of user objects belonging to the Web site.
    SPWeb.SiteUsers Gets the collection of all users belonging to the site collection.

    There’s just a *slight* difference in wording here. After all, SPWeb.Users gives me the user objects of the web site right? Not really.

    As this was something that was bugging me with a problem I had, I decided to do a small spike to prove (or disprove) what was going on. When you have a design problem or a technical complexity that has to be addressed (before staring your work to reduce the risk) you create a spike, a small side project apart from your current work. The spike solutions are developed to solve or explore critical problems. Ideally those programs will be thrown away once every developer gets a clear idea about the problem.

    So we’ll create the SSWP[1] with the following RenderWebPart method defined:

       63         protected override void RenderWebPart(HtmlTextWriter output)

       64         {

       65             SPSite site = SPControl.GetContextSite(Context);

       66             SPWeb web = site.OpenWeb();

       67             output.Write(string.Format("<strong>Information</strong><br>User Count={0}, Current User ID={1}</p>",

       68                 web.Users.Count, web.CurrentUser.ID));


       70             StringBuilder sb = new StringBuilder();

       71             sb.Append("<table border=1>");

       72             sb.Append("<tr><td colspan=3><strong>SPWeb.Users</strong></td></tr>");

       73             sb.Append("<tr><td>ID</td><td>LoginName</td><td>Name</td></tr>");

       74             foreach (SPUser user in web.Users)

       75             {

       76                 sb.AppendFormat("<tr><td>{0}</td><td>{1}</td><td>{2}</td></tr>",

       77                     user.ID,

       78                     user.LoginName,

       79                     user.Name);

       80             }

       81             sb.Append("</table>");

       82             output.Write(sb.ToString());


       84             sb = new StringBuilder();

       85             sb.Append("<table border=1>");

       86             sb.Append("<tr><td colspan=3><strong>SPWeb.SiteUsers</strong></td></tr>");

       87             sb.Append("<tr><td>ID</td><td>LoginName</td><td>Name</td></tr>");

       88             foreach (SPUser user in web.SiteUsers)

       89             {

       90                 sb.AppendFormat("<tr><td>{0}</td><td>{1}</td><td>{2}</td></tr>",

       91                     user.ID,

       92                     user.LoginName,

       93                     user.Name);

       94             }

       95             sb.Append("</table>");

       96             output.Write(sb.ToString());


       98             try

       99             {

      100                 SPUser currentUser = web.SiteUsers.GetByID(web.CurrentUser.ID);

      101                 output.Write(string.Format("</p>Current user is {0} (ID={1})",

      102                     currentUser.LoginName, currentUser.ID));

      103             }

      104             catch(SPException e)

      105             {

      106                 output.Write(string.Format("</p>Error getting user ({0})", e.Message));

      107             }

      108         }

    So what’s this thing doing? Not much but basically:

    • Get a reference to the SPSite object using the GetContextSite method of SPControl
    • Open the SPWeb object using the OpenWeb method of the SPSite
    • Write out some information about the number of users and current user id
    • Create a small table with the id, login name, and display name of each user in the SPWeb.Users collection
    • Do the same thing but with the SPWeb.SiteUsers collection
    • Retrieve the SPUser object from the Web using the GetByID method and display information about that user

    It’s the last part (wrapped in a try/catch block) that you should pay attention to.

    Here’s the output of the Web Part logging in as LOCALMACHINE\Administrator when displayed in a SharePoint Portal Server Area:

    And here’s the same Web Part when displayed in a Windows SharePoint Server site:


    When you create an area or site, several users are automatically added behind the scenes. In the case of an area on the portal, you’ll see that SiteUsers contains more names than what’s in the WSS site. It adds in a “BUILTIN\Users” domain group (ID 4) and adds the “NT AUTHORITY\Authenticated Users” at the end (ID 6) in an area. In a site, “NT AUTHORITY\Authenticated Users” takes up the #4 slot, and the “BUILTIN\Users” is nowhere to be found.

    Also when you create a site, it adds the creator (in this case “Administrator”) to the list of users (go into Site Settings | Manage Users to see the list). In area, the creator of that area shows up in the SPWeb.Users list, but it’s not present on the “Manage Security” page.

    Here’s a rundown on the user ID slots that are filled in automatically:

    ID Description
    1 User who created the site or area
    2 Not sure on this one? Sorry.
    3 Application Pool Id, crawler account.
    4 BUILTIN\Users on Portal, NT AUTHORITY\Authenticated Users on WSS
    5 Additional individual users you add to the site, or any new users who happen along.
    6 NT AUTHORITY\Authenticated Users on Portal only, otherwise the next user you add or visits the area.

    Note: these values are from most setups I’ve done, the way you configure your portal (turning on anonymous for example) might change these values somewhat so use them as a guideline, not a set of stone tablets that someone hands down to you after taking a siesta in the mountains.

    You might say, “But Bil, I really only want the current user so SPWeb.CurrentUser should be good enough right?”. Maybe. What if you want to retrieve a user by ID (that might be stored somewhere else, but corresponds to the same ID # in the site). Or you want to display all the users in the site. This will become important when I blog later this week about Impersonation (everyone’s favorite topic).

    So here’s the same Web Part, but being rendered by a regular Joe user (spsuser) who has read access to the site. He’s been added manually to the WSS site, but he’s a member of the Readers group at the Portal and doesn’t show up in the SPWeb.Users list. First, the Portal Area rendering:

    Now the WSS site rendering:

    Remember when I said to pay attention to that try/catch block? If you had used a bit of code like SPWeb.Users.GetByID (instead of using the SiteUsers property) you would have got an exception thrown while looking for a user with an ID of 5. As you can see in the SPWeb.Users list, it doesn’t exist because this will only display domain groups and indvidual users who have been manually added to the site (and Administrator got added automatically when the site got created).

    Another thing that’s interesting is that if you did add “spsuser” to the site manually he would show up in the SPWeb.Users list above. However if you removed him, he would vanish from SPWeb.Users but he would still show up in the SPWeb.SiteUsers list. His ID # is reserved so the next user you added manually would have an ID of #6 (in the case of the site) and if you re-added “spsuser” at a later date, he would re-appear in both lists with an ID of #5.

    So in a nutshell… if you’re going after a list of all users or want to retrieve a user from the list but he’s part of a group, then use the SiteUsers property instead of Users. Otherwise, he might not be there.

    Okay, this post might have been a little confusing as we’re flipping around between Users and SiteUsers and all that but hopefully the code and images describe it for you. Let me know if you’re totally confused, otherwise… enjoy!

    [1] Super-Simple-Web-Part: Just a web part where we hard code the values in the RenderWebPart method. Nothing fancy here. No Domain Objects. No DTOs. No Layers. Just write out some code. 

  • Size does matter

    Invirus sent me a note about a product they have to opimize virtual machine images. Finally got around to trying out the product and it’s pretty slick. It basically rips through your VMs and shrink them down without affecting the OS inside of them. VM Optimizer 2.0 will work with files from both VMWare and Virtual PC/Virtual Server vhd files (although in my test I tried shrinking an identical file of both types and for whatever reason, the Virtual PC file showed better compression).

    What was useful for me was that I had a large (7GB) VM that I wanted to move to another external drive that was FAT16 formatted (most USB drives are so they’re compatible with Macs and Windoze). The external drive in this format doesn’t support individual files larger than 4GB so this was a problem. Not anymore. I ran the optimizer and it shrunk it down to 3.3GB and was able to transfer it. The reduced size also decreased the load time of the VM by a bit, so there’s some savings there if you’re starting and stopping these things all the time.

    There’s a 30 day trial available which is a full version so you can try out all the features and see if it works for you. Check it out as it’s a cool product and doesn’t seem to have any adverse effects on VMs, other than making them smaller. And remember, size matters.

  • Goodbye ReSharper, hello Refactor! Pro

    I was a little split on tools tonight. Like most of us, we spend most of our waking day inside an IDE writing and designing so we want the best use of our tools that we use. I’m always looking for ways to better my codebase and refactoring is a technique that I employ all the time. Little tweaks make things easier to read and generally make my code more maintainable. However it’s always hard to tell what the right refactoring is and when it should be applied.

    I use ReSharper from JetBrains, but lately they’ve been a little lax with updates. Their VS2005 product isn’t final yet, many people (including myself) have tried it but then uninstalled it when your stable IDE becomes unstable. So I thought about looking at other options. Scott Hanselman is big fan of CodeRush and the DevExpress products and they have a refactoring tool called Refactor! Pro (and hey, if Scott likes it then it must be good right?).

    Refactor! Pro has a nice set of features that take it above what ReSharper offers. It’s the same price point ($99USD) so anything it offers above ReSharper is just icing on the cake. Here’s a few that I like which gave me the swing vote for the product.

    There’s a nice little animation that is displayed when you hover over a return statement that shows where it returns to (makes for visibility of the code you’re about to skip that much more potent).

    Here’s one that I’m mixed on using, Inline Temp (or mixed on, using Inline Temp if you prefer). The idea is that instead of doing this:

      101                 int cultureId = Thread.CurrentThread.CurrentUICulture.LCID;

      102                 if (string.Empty != LayoutsDir)

      103                 {

      104                     if (string.Empty != StyleSheet)

      105                     {

      106                         // Both LayoutsDir and StyleSheet specified

      107                         styleLink = string.Format(

      108                             "<link rel=\"stylesheet\" type=\"text/css\" href=\"/_layouts/{0}/styles/{1}/{2}\">",

      109                             cultureId.ToString(), LayoutsDir, StyleSheet);

      110                     }

      111                     else

      112                     {

      113                         // LayoutsDir but no stylesheet (kind of useless though)

      114                         styleLink = string.Format(

      115                             "<link rel=\"stylesheet\" type=\"text/css\" href=\"/_layouts/{0}/styles/{1}\">",

      116                             cultureId.ToString(), LayoutsDir);

      117                     }

      118                 }

    You remove the introduction of the cultureId variable and do this:

      101                 if (string.Empty != LayoutsDir)

      102                 {

      103                     if (string.Empty != StyleSheet)

      104                     {

      105                         // Both LayoutsDir and StyleSheet specified

      106                         styleLink = string.Format(

      107                             "<link rel=\"stylesheet\" type=\"text/css\" href=\"/_layouts/{0}/styles/{1}/{2}\">",

      108                             Thread.CurrentThread.CurrentUICulture.LCID.ToString(), LayoutsDir, StyleSheet);

      109                     }

      110                     else

      111                     {

      112                         // LayoutsDir but no stylesheet (kind of useless though)

      113                         styleLink = string.Format(

      114                             "<link rel=\"stylesheet\" type=\"text/css\" href=\"/_layouts/{0}/styles/{1}\">",

      115                             Thread.CurrentThread.CurrentUICulture.LCID.ToString(), LayoutsDir);

      116                     }

      117                 }

    Personally I think creating a variable once and using it (as long as the variable has a good name) works better and is it just me or isn’t calling a method 3 times rather than referencing a variable is more expensive? Okay, we’re talking about milliseconds here, but sometimes every line of code counts.

    When you select a line there are different options. Here it’s asking me if I want to do an Extract Method refactoring, using the HtmlWriter parameter and a local variable as parameters to the new method. The arrows show where it’s getting all the info from (and there are additional popups that didn’t get captured like the tooltip explaining the refactoring).

    When you hover over strings, you can invoke the Introduce Constant refactoring, replacing that string with the constant value. I always find this a pain as I just naturally type in quoted strings rather than stop, go create a variable, then come back to the point I left. It interrupts the natural flow of things. Some would argue that going back and doing it after the fact takes more time, but again if it’s automated like here then I think it’s faster in the long run.

    Finally as you hover over the three little dots Refactor! Pro puts under your variables, methods, and such it creates the pulldown menu (sometimes there are multiple refactorings you can do on a variable) a small tooltip explaining the refactoring. Nice if you don’t know exactly what it will do but also helps for newbies that have never used a certain refactoring before.

    A really powerful thing is that you can create your own refactorings and apply them. While the base product supports all the known refactorings out there, this makes the product shelf-life that much longer as new ideas are discovered or even if you do something on a regular basis, you could build your own here. Yes, it’s like a glorified macro tool that is already built into Visual Studio but it has some smarts and looks like it could be powerful (especially if there’s a way to get new refactorings from the community at large).

    I think the key thing is that it supports both VS2003 and VS2005 with the same product. This is key for me as I have dozens of tools that I buy, I have to be a little picky over what I purchase. With ReSharper I have to purchase two separate SKUs and pay for it. Refactor! Pro seems to offer both of my IDEs the same tool for the same price. Kudos to them as I like this in any product (and probably because I’m miffed that I now have to buy an XBox 360 version of my Burnout Revenge because my XBox version of the same game isn’t compatible with the 360).

    There are other advantages and disadvantages. I don’t think Refactor! Pro highlights errors like ReSharper does, but it’s hard to tell (especially when you have both products installed at the same time). Refactor! Pro doesn’t show all refactorings with ones that don’t apply greyed out so the menu is smart and only shows you what’s relevant so I’m not sure the full set of refactorings that it supports, but I’m sure they’re all there (in my testing, it was “Good Enough”). The only big thing which swings me to looking at buying CodeRush as well as Refactor! Pro is the code templates. ReSharper has them built into their product, so you get the refactorings but you can also type in “tcf”, press TAB and get a try/catch/finally block. Refactor! Pro is just about refactoring and doesn’t seem to have this capabilty built-in but if you go the extra step you can buy CodeRush and get that feature (along with the other 10,000 things CodeRush does). Still, it was good enough for me to switch but YMMV.

    Also as a note, refactoring is not about tools it’s about understanding when to refactor and apply the right refactorings. Tools can help you and make things quicker for you, but you need to know why you’re doing it. Like a skilled craftsman with a chisel, he can get the job done twice as fast with a plane but he needs to know how to do it first in order to be called a craftsman. Developers are the same and I try to teach people manual refactorings first so a) they know the pain and suffering you go through to refactor manually (it can be tedious sometimes) and b) they know why they’re refactoring and it’s not just a click of a tool to move code around. Only then do I talk to them about tools and how they can get the job done quicker. So learn why you refactor first and the raw mechanics of it, then look at automation to help out.

    P.S. why must people put Pro or Advanced or something after their product names? There is no Refactor! Standard product, just Refactor! Pro. Is it a selling gimmick? Maybe I should start creating products with Pro in the name (but not offer a standard version). Must be me but then I’m also still looking for a copy of Microsoft Windows Amatueur edition. I know it’s out there.

    There, I think I’ve said the word refactor so much that this blog post will hit the top of Google in a day or two now.

  • Creating Multilingual Web Parts

    Ahalan. Parev. Goddag. Saluton. Bonjour. Guten Tag. Aloha. Hola. Shalom. Hello.

    We live in a multi-lingual world. Everyone speaks a different language (unless you’re a slacker like me who barely comprehends the English one) and when we build an uber-cool Web Part (say a new Discussion Forum) that we want the world to use, it needs to support whatever language is out there (yes, including Esperanto).

    A lot of SharePoint documentation (including the SDK) talks about implementing the LoadResource method and use the ResourcesAttribute to mark your properties or enum values in order to localize your Web Part properties. This is great if you want to create a property for every string you’re going to display, but what if you don’t want to do that? In some Web Parts, that’s a heck of a lot of Properties. Maurice Prather posted a simple HOWTO about using this method here, but it doesn’t really cover multiple languages for say strings that you would display on your Web Part (and don’t want to create properties for everything).

    While it's certainly possible to develop a multi-lingual application with the tools provided with ASP.Net, there are a number of limitation which make the task less than a happy-happy-joy-joy experience for anyone. Some of the key problems are:

    • Resource files are embedded into assemblies
    • Resource files can't return strongly-typed objects
    • Web controls aren't easily hooked up with resource files

    While this may seem trivial, the above three issues can be quite serious - with the first being the worst. For example, since resource files are embedded into assemblies, its very difficult to ship a product which provides the client with the flexibility to change simple things like text on the screen. Do you really want to recompile your entire assembly when the translation department wants to change some text, stop the IIS process and copy the .dll into the bin folder (grant you might be able to get away with copying the file and not stopping IIS or the AppPool, but still… hey, walk with me on this).

    A Simple Approach

    This is a fairly basic approach but accomplishes a few things. First, resources are now externalized from your Web Part assembly(ies) and you can update them anytime you need without recompiling (say for spelling mistakes or you feel a strong desire wash over you to change “Exit” to “Leave”). Second, with some small changes we do here we can support any language automatigically (and fall back to say a default one if we can’t find the one we want).

    One note is that you can accomplish multi-lingual Web Parts using a resx file, resgen, blah, blah, blah, blah so this article is an alternative to that. Personally I prefer this, but YMMV.

    Create a Web Part

    Yes, you know how to do this. Create a new Web Part Library Project using the Visual Studio templates. Let’s give it a name like ItsRainingMen.

    Okay, fine. Let’s not so feel free to call it whatever you want. You’ll probably call it something boring like WebPartLibrary1 right? Whatever. Breathe. Move on.

    Fields You Need

    First we’re going to create a few fields in our Web Part that will help us manage the language and resources. We can always retrieve the current language setting (1033 for English) from our Web Part through the Language Property, but we’re going to put the language value into a Property of our own and let the user override and change it (hint for developers, this is a good thing as you don’t have to do something crazy like change your server settings in order to test other languages, just change a property at run-time and refresh your page). We’ll also create an XmlDocument to hold the contents of the resource file (which is going to be Xml as it’s easiest to implement) from where we’ll retrieve the language strings.

       22         private const string defaultLanguage = "1033";

       23         private string language = defaultLanguage;

       24         private XmlDocument resourceFile;

    So create two new fields, one XmlDocument and the other string for the language (with a default of “1033”). If you want to get fancy, this could be a drop down list of all the languages SharePoint supports and you can let the user pick it in a custom tool part. Again, more work than what I want to do here so we’ll make the users enter this manually. Why use 1033? We’ll get to that later.


    We’ll override the OnInit method in the Web Part in order to load our resource file. This may sound crazy, that we’re loading a resource file every time the Web Part is loaded but it’s a small file and takes less than a tenth of a second to load so get over it. If you really have your knickers in an uproar over it, you can always take a different approach and load the file once, toss it into a Cache and create a cache dependency on the file so if the file ever gets updated, the contents will get reloaded. I’ll leave that as an exercise for the reader.

       38         protected override void OnInit(EventArgs e)

       39         {

       40             try

       41             {

       42                 SPWeb web = SPControl.GetContextWeb(this.Context);

       43                 DirectoryInfo directoryInfo = new DirectoryInfo(this.Page.Server.MapPath("/wpresources/ItsRainingMen"));

       44                 FileInfo[] languageFileInfoArray = directoryInfo.GetFiles("*.lng");

       45                 for (int n = 0; n < languageFileInfoArray.Length; n++)

       46                 {

       47                     FileInfo fileInfo = languageFileInfoArray[n];

       48                     if (fileInfo.Name == (web.Language.ToString() + ".lng"))

       49                     {

       50                         this.language = web.Language.ToString();

       51                     }

       52                 }

       53                 if (this.language == "")

       54                 {

       55                     this.language = "1033";

       56                 }

       57                 this.resourceFile = new XmlDocument();

       58                 XmlTextReader reader = new XmlTextReader(this.Page.Server.MapPath("/wpresources/ItsRainingMen/" + this.language + ".lng"));