Hurlman.Tech

/* Blogging when the NDA allows */

As Daniel mentioned in his comment to my last post:

Is it me or now in version 1 the installation checks if WSS are installed in the computer (invalidating XP as development platform)?

As it turns out, no, it's not just him - and I'm mildly annoyed by it.  Only mildly because there's probably a good reason why you need SharePoint installed locally (though I really hope it's not due to shoddy coding) - but still annoyed that there was no mention of this when I created my SharePoint projects using the extensions during the beta.

So, I spent the last day building out a MOSS 2007 development environment inside of my virtual machine of choice, and found myself constantly going back and forth downloading things when I'd realized one thing or another.  SO - I've listed everything I found that I needed, in order - maybe other folks will find it useful too:

  1. Windows Server 2003 R2 Enterprise Edition (Standard Edition should work too, but I wanted to make sure I could set up clustering if that came up)
  2. Windows Server 2003 Service Pack 2
  3. Sql Server 2005 Developer Edition
  4. Sql Server 2005 Service Pack 2 (for the SharePoint / Reporting Services integration goodness)
  5. .Net Framework 2.0
  6. .Net Framework 3.0
  7. Microsoft Office SharePoint Server 2007 Enterprise Edition (I guess you could get by with Standard Edition or even plain ol' WSS3.0, but I do lots of corporate work)

Now, that's all the server stuff (completely disregarding configuration of course).  If I were you (and I'm not, but let's just say, mmk?), I'd save my VM at that point as a straight server build, and then install all the client stuff on a new VM.  That said, you need all this to actually do the development:

  1. Visual Studio 2005 Professional Edition (at least - I'm using the Team Suite Edition)
  2. Visual Studio 2005 Service Pack 1
  3. SharePoint Server 2007 SDK & Enterprise Content Management Starter Kit (The Starter Kit gives you VS project templates for SharePoint specific workflows)
  4. Visual Studio 2005 Extensions for Windows Workflow Foundation
  5. Windows SharePoint Services 3.0 Extensions for Visual Studio 2005

It's that last item that requires SharePoint to be installed, which requires a server OS, which for most of us means we need to set up a VM.  PITA, but we're probably all better off doing these the "right" way anyway.


Creative Commons License This work is licensed under a Creative Commons License.

I know, I know... It must've only gone online but a few hours after my last post, but Pierre Vivier-Merle kindly pointed out to me that Microsoft has finally published the RTM version of the SharePoint extenstions for Visual Studio 2005!

Download the Windows SharePoint Services 3.0 Tools: Visual Studio 2005 Extensions as soon as you can if you do any kind of serious SharePoint development.


Creative Commons License This work is licensed under a Creative Commons License.

Link to Download details: Windows SharePoint Services 3.0 Tools: Visual Studio 2005 Extensions for Windows SharePoint Services 3.0

The WSS 3.0 Add-in for VS 2005 has been stuck on the November 2006 CTP version, since, well, November 2006.  It's halfway thru March '07 now - are we ever going to see an update?  A beta?  RTM?  Both WSS/MOSS and VS are released products, making them work nicely together shouldn't be much more of a challenge.

No mention of anything that I've seen from any SharePoint blog, Microsoft or otherwise, and every link I see is pointed back to the same November CTP.  Honestly, between things like this and the horrible API documentation - does Microsoft expect any real developers to start pushing these products, or are they content to just leave it up to people that can just configure the web parts they're given?


Creative Commons License This work is licensed under a Creative Commons License.

SharePoint 2007 Googlefood

More and more over the last two weeks, I have become increasingly amazed about two things.

First off, the good people at Microsoft that coded up the API for SharePoint 2007 (and, I hear, 2003) decided to provide either no or meaningless documentation on just about any useful object in the object model.  On any project I managed, one of my unbreakable demandments was that any public-facing function, object or object property had to have at least the default "triple-slash" XML documentation filled out in a meaningful way before it was considered done.  Maybe I've been living in a general .Net framework shangri-la for too long, but I expected at least as much from Microsoft for a platform they are pushing at the enterprise level.

Secondly, I am even more amazed at the general lack of good searchable SharePoint solutions to fairly low-level programming tasks out there on the web.  I've been through way too many examples of this in the last couple weeks, but the one that surprised me the most was one just now, when I was searching for a definition of what the ContextInfo object was in the MOSS 2007 JavaScript API.

I found lots of examples of people using the object to cobble together context menus and submenus of various shapes and sizes, but nowhere did anyone show more of the object than what they used in their code.  I suspect that the reason for this is that SP developers with any amount of time under their belt have grown used to digging through the shipped DLLs and JavaScript files on their own, looking for the knowledge they seek.

That's just nonsense.  There should be some sort of effort to make experienced .Net developers with little SharePoint experience a little more at ease.  So, I'm taking it upon myself to start posting any bits of information I find that will soon seem "obvious" to me as well as I travel down the MOSS path... but just as it wasn't obvious to me in the past, it won't be obvious to new developers coming behind.

Now, without further adieu, the goods:

The structure of the SharePoint ContextInfo object, as found in C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\LAYOUTS\1033\core.js on a default MOSS 2007 install:

function ContextInfo()
{
    this.listBaseType=null;
    this.listTemplate=null;
    this.listName=null;
    this.view=null;
    this.listUrlDir=null;
    this.HttpPath=null;
    this.HttpRoot=null;
    this.serverUrl=null;
    this.imagesPath=null;
    this.PortalUrl=null;
    this.RecycleBinEnabled=null;
    this.isWebEditorPreview=null;
    this.rootFolderForDisplay=null;
    this.isPortalTemplate=null;
    this.isModerated=false;
    this.recursiveView=false;
    this.displayFormUrl=null;
    this.editFormUrl=null;
    this.newFormUrl=null;
    this.ctxId=null;
    this.CurrentUserId=null;
    this.isForceCheckout=false;
    this.EnableMinorVersions=false;
    this.ModerationStatus=0;
    this.verEnabled=0;
    this.isVersions=0;
    this.WorkflowsAssociated=false;
    this.ContentTypesEnabled=false;
    this.SendToLocationName=""
    this.SendToLocationUrl=""
}

You'll have to figure out what they all mean, I only found it just now myself - but most of them seem pretty self-explanatory (about time something did).


Creative Commons License This work is licensed under a Creative Commons License.

About the author

Greg Hurlman
Software Development Manager at Avanade, mostly focused on SharePoint related projects these days.