Destination:\ SharePoint > Destination:\ SharePoint 2013 > Posts > Introduction to Client Object Model in SharePoint 2010
June 16
Introduction to Client Object Model in SharePoint 2010
Title: Introduction to Client Object Model in SharePoint 2010 Part I

Details: A set of new feature and functionalities are add to the SharePoint 2010 that support client application interactions. Well how? and what's the need for it? Let's see them in detailed now.

The need: Why do we need Client Object Model? - Have you ever tried connecting the SharePoint source from outside the context? If yes, then you know exactly what we are talking about here. There is no direct connectivity to the context from outside the world apart from using the webservices of MOSS 2007. One need to use this webservice to pull / push the information to the SP System or we need to write our own services inorder to achieve the same. Well so far so good. But how many references we might need to pull up in ordre to support x number of outside systems? Well the answer is simple its x again.
For instance, if I have a thick client (say windows application) thats trying to connect to SharePoint database and read through its rich API, this becomes 1 service reference. If n applications start doing it you need n references. Does it feel good, is SharePoint capable of handling this? Well the answer is that it's no extendible and at first place its not built for it.
Secondly, Does MOSS support asynchronous callback mechanism to its API (out of the box)? This is a tough argument. I am sure people would come back and say hey I can use XMLHTTP, 3rd party controls like Telerik , Devexpress so on and so forth. Well, I am not talking about those. Do we have some thing OOTB?

What's with Client OM: A new set of functionalities emerged out with the release of SharePoint 2010. Client OM provides capabilities to talk directly with SharePoint and can provide the results exactly similar to what we have in the Server API (traditional coding). Well in that case is it replacing Server API? Absolutely not!! Client OM cannot perform every action that a Server API can perform. Client OM cannot communicate beyond Site level; its built to speak with Site and below. However, for any regular, transactional operations this much is sufficient and pretty much enough. Afterall we are not trying to build a monument out of sand :-)

Architecture: Client OM comes with its own set of binaries that we need to refer for communication and Client OM itself comes in 3 flavours.

Each of the above 3 have their own set of communication methods. For instance Managed code references Microsoft.SharePoint.Client.dll, Silverlight uses Microsoft.SharePoint.Client.Silverlight.dll and Javascript or ECMA uses sp.js file as their object references. When using these references they infact speak to the Server API Services (wcf services) and bridge the communication between these models.

Security: Next question that would pop in our minds is if we can communicate with Client OM, what happens to the security? Worry not!!! Client OM supports again 3 modes of security model. Anonymous, Default and Forms. For more details on how-to click here.


Introduction to Client Object Model in SharePoint 2010

Post migrated by Metalogix - The SharePoint 2010 Administration Experts
9/11/2010 12:38:28 PM
 Commented by Metalogix Software Corp. on 9/11/2010 12:38:28 PM

Srini SistlaNo presence information on 9/11/2010 11:43 AM

client OM code sample

i need some code sample (vb*  or c# )
*more needed
 on 2/2/2011 7:29 AM