SharePoint Wrappers 0.10

Back in the middle of last year, I had created a set of .NET classes that let me access SharePoint through Web Services. I generally was frustrated with having to always create the web service, assign credentials, etc. and then if I wanted to connect to another server/site, I had to create a different reference or re-use one and set a bunch of properties. The big problem was that almost anything anyone wanted to do had to happen on the server and frankly, I despise running client tools (even if they're utilities) on a server. Servers are meant to run well, servers. Workstations are meant to run clients. How often do you see someone running Office 2003 from a server? The other problem I saw was that SharePoint Web Services, while great and all, didn't always give me everything I needed from one service. Sometimes I had to call on 2 or 3 different services at the same time to accompish a single task.

Anyways, this led me to create a set of wrapper classes. Classes that let me deal with SharePoint servers, libraries, lists and whatnot like real objects and simple methods. I've created a new project on SourceForge to house these and uploaded the initial revisions into CVS (here's the link to CVS through your browser). You can grab them from the site here through anonymous CVS access (instructions here). I haven't done an "official" release yet but you can compile it and create the API doucmentation with the built-in NAnt script. There are plans to do both a Gui and Web based set of sample programs (like a non-runat-server version of SharePoint Explorer). I chose SourceForge over something like GotDotNet just because it has a few more services that I like and I run a bunch of similar projects off it. If GotDotNet adopts the SharePoint platform as some discussions have been going on and there's a source control plug-in, then maybe things will move.

These do not mimic the SharePoint object model 100% as it was a lightweight solution to providing access to remote clients. It can grow, however I probably wouldn't want to see it completely do everything the OM does. The intent however is to provide enough capabitilies so you don't need to run applications on a SharePoint server (so you can build desktop and non-SharePoint web based tools for SharePoint). What can you do with these things now? Plenty and it's pretty simple. You can easily:

  • Connect to a SharePoint Server, get its properties, and enumerate sites
  • Connect to a SharePoint Site, get its properties, and enumerate lists
  • Create lists, doclibs, and list items
  • Upload documents to a document library
  • Get all versions of a document in a library

How do you use them? It's fairly simple:

SharePointSite site = new SharePointSite(url);
foreach(SharePointSite subsite in site.webCollection)

If you do have suggestions or would like to signup for the project, drop me an email. More updates on this in the coming week with some samples, additions to functionality, etc. and whatever suggestions you guys have. Here's to expanding the project to be a useful tool in your SharePoint arsenal!


Comments have been disabled for this content.