
13
The Client Object Model
and jQuery
WHAT’S IN THIS CHAPTER?
Objects supported by the Client Object Model
➤
Updating the site title using the Client Object Model
➤
Common list operations
➤
Using jQuery with SharePoint 2010
➤
There are two basic approaches to accessing data programmatically in SharePoint. The fi rst
approach is to use the SharePoint API on the server. When you run code directly on the
SharePoint server, the SharePoint API gives you complete control over all aspects of SharePoint
and the data. If your application is not running on the server and needs to access the
SharePoint data, you need to use the SharePoint web services. The web services offer similar
functionality compared to the SharePoint API, although not every function is covered.
In SharePoint 2010, you have another option when programming against SharePoint data: the
Client Object Model. The Client Object Model is a new approach to remotely programming
against SharePoint data. Although using web services gives you broad coverage to SharePoint
features, using the programming model and API is very different from using the server API.
This makes it diffi cult for developers, as they need to learn two completely different program-
ming models. Also, calling web services from JavaScript clients is complicated and requires
a lot of manual XML creation and manipulation. The Client Object Model solves all these
issue ...