次の方法で共有


SharePoint To Go! Part 2

Now I can expound on the demo I delivered at TechEd SEA 2008 called SharePoint To Go. There's a long title to it, but let's just leave it to SharePoint To Go. I don't mean SharePoint is to go away anytime soon, it means the same as "take away" in this part of the world. When I was planning what session to deliver, I saw a similarly titled session at TechEd North America 2008. I wanted to build a demo that is the synergy of existing frameworks, app blocks, and patterns. So in the end, I decided to use one of the tutorials in Sync Framework RC3 (which has since RTM on 5 Aug), and the Disconnected Service Agent QuickStart sample in the Smart Client Software Factory - April 2008.

The demo is about synchronizing 3 sync providers which are hosted in a WinForms application. 2 of them are in-memory providers, which stores the data (which consists of a customer name field, and phone number field) in a SortedDictionary instance. The third provider I have is to behave as the local replica of my SharePoint List, with full knowledge of synchronizing with the SP List on the server.

In order to do this, I created a proxy client of the SPList Web service, called WSSListAdapter class, which implements the CRUD methods, as well as two methods to get all items from the SP List, and the changes since the last sync. This is the architecture of my demo:

image

The WSSSyncProvider is a derived class of the GenericSyncProvider class which was provided by the 2nd tutorial sample in the Sync Framework tutorial. I need not write any code to handle the knowledge (sync changes) into the metadata store because all this is provided in the GenericSyncProvider, and the Sync Framework itself. All I had to focus is how to perform CRUD on my SP List.

When you load up my SharePointToGo solution in Visual Studio 2008, you should see the following projects:

image (see how that corresponds to the sync architecture diagram above).

In the bookmarks window below, you should see the following:

image

Just check out the bookmarks, which are ordered according to the sequence of steps.

In order to run my demo, you would have to create a list in your SharePoint site. You can call it Simple List, for simplicity. However, follow the pre-requisites in my Visual Studio 2008 bookmarks (they're there in the VS solution). The first couple of bookmarks require you to do the following:

  1. Change the URL of the Lists.asmx.
  2. Get the GUID of your SP List (you may refer to your online search as to how to get the GUID of your newly created SP List).

You would also have to allow the right credentials in SharePoint Central Administration tool to allow the Windows user which you are using to run the WinForms app to access your SP List. Again, please refer to any documentation that you can find on the Live Search on this.

Here are a few comments I got from my TechEd session and my responses:

  • Too much codes

My response: My session was of Level 300 and as such it does show you what's under the hood, which means plenty of codes. You should be fortunate I did not type each line of code in front of you. I realize that many attendees are still not familiar with our session's code levels. Perhaps we should have a session on that.

  • Don't assume that participants have SharePoint development skills

My response: I don't. I have already informed the audience that one of the pre-requisites of my session is that you have some SharePoint development knowledge. But even if you don't, no worries. If you're interested in SharePoint development after my session, you would want to learn about it anyway. Look, it's only a 1-hour session, how could I possibly cover everything. If I have to cover all the pre-reqs, I'll have to lock my audience in the hall for 5 days straight. :p

I appreciate all the feedback, and it's been a wonderful experience interacting with the audience, and getting them laugh at my jokes. I constantly look at ways to make my presentation and demo to be better next time. Till the next TechEd.

Comments