Archives / 2006 / April
  • 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