Ishraq Ahmad
Blog for .net Architects & Developers looking to learn WPF, Silverlight, WCF and ASP.net MVC.
Client Side Programming in SharePoint 2010
Client side programming in SharePoint has been a hassle and was not fully supported. Although, there were solutions to deploy Silverlight and Ajax based pages in SharePoint 2007 or older versions but still there was no native support by SharePoint. But now, SharePoint 2010 provides client side object model similar to server side object model and natively provides three Client Object models. SharePoint client object models are,
-
Silverlight
It’s defined in Microsft.SharePoint.Client.Silverlight.dll and Microsft.SharePoint.Client.Silverlight.Runtime.dll assemblies.
-
JavaScript
It’s defined in SP.js file.
-
Managed
It’s defined in Microsft.SharePoint.Client.dll and Microsft.SharePoint.Client.Runtime.dll assemblies.
Keep an important thing in mind, Client object model is not equivalent to Server object model rather it’s a subset. These client object models communicate with SharePoint through Windows Communication Foundation (WCF). WCF service is named as Client.svc. Communication between client and server object models looks like this,

As, you can see above, every request from client comes as XML request and gets JSON response back. To understand clearly, let’s compare server side model with client models.
| Silverlight/JavaScript/Managed Client | Server |
| ClientConext | SPConext |
| Site | SPSite |
| Web | SPWeb |
| List | SPList |
| ListItem | SPListItem |
| Field | SPField |
In next posts, we will develop various small applications to find out how easy it is to interact with SharePoint 2010 from client side.
Related posts:
Tags: SharePoint 2010, Silverlight