Navigate Up
Sign In
Supporters of Developer
Web

SharePoint: Advantages and Disadvantages of the Client Object Model

Item is currently unrated. Press SHIFT+ENTER to rate this item.1 star selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+ESCAPE to leave rating submit mode.2 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.3 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.4 stars selected. Press SHIFT+ENTER to submit. Press TAB to increase rating. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.5 stars selected. Press SHIFT+ENTER to submit. Press SHIFT+TAB to decrease rating. Press SHIFT+ESCAPE to leave rating submit mode.

You may also be interested in: SharePoint Hosting by Fpweb.net

 

Editor's note: Contributor SC Vinod is a SharePoint Developer at Hexaware Technologies. Follow him @scvinod

2012-04-29-ClientObjectModel-01.pngI have implemented the Client Object Model (COM) extensively in Silverlight as well as in ECMAScript. I've failed many times in accomplishing certain tasks and succeeded many times too. You may love or hate COM but you cannot ignore it if you are a SharePoint 2010 developer.

So, I’m going to list the advantages and disadvantages of COM that I have faced while implementing it. Let's look at the advantages first.

Advantages:

  1. As mentioned often, when using COM we can access SharePoint data from the client side browser itself with Silverlight and ECMAScript applications.
  2. Web parts with very rich user interface can be developed with the help of Silverlight and jQuery. For example, we can create web parts like video and image galleries with beautiful animations.
  3. COM along with JavaScript or jQuery can be implemented with just a Content Editor Web part within the browser or from SharePoint designer without opening Visual Studio. You can read about it here.
  4. When you save your site as a template. The application developed with an ECMAScript or Silverlight application implemented with Client Object Model would come along with the template which would be very helpful during migrations though we need to take care of any hard coded values.
  5. No IISREST is required while deploying a Silverlight or an ECMAScript application implemented with COM.
  6. We can have SharePoint accessed from the client desktop using Windows forms applications implemented with COM. We can develop desktop gadget kind of applications which would display the new announcements added to the “Announcements” list.
  7. No SharePoint installation is required in the development machine. Only the dll’s are required if you are going to develop Silverlight applications.

Disadvantages:

  1. We cannot elevate the privilege or Impersonate in COM as in the Server Object Model. That is, we cannot use the RunWithElevatedPrivilege kind of a delegate. Therefore, the result retrieved using COM will always be security trimmed by default.
  2. The range of classes available to access SharePoint data is very limited in COM. For example, we do not have Classes for accessing User Profiles. Though it can be accomplished by using SharePoint web services.
  3. We cannot access the objects of another site collection in COM while implementing in Silverlight or in an ECMAScript. We will get “The security validation for this page is invalid.” if we try to do so. So, we cannot develop applications to read the data from another site collection.
  4. Silverlight web parts fail to load by giving an error message saying Could not download the Silverlight application or the Silverlight Plugin did not load. To re-configure the Web Part or to provide a different Silverlight application (.xap), open the tool pane and then click Configure.if it takes more than 5 seconds to load. This means we have to finish loading the SharePoint data within 5 seconds.
Categories: dev; jQuery; Content Editor Web Part; Silverlight; SharePoint Designer; MOSS; WSS; 2010

Comments

Notify me of comments to this article

E-mail:
   

Add Comment

Title:

 
Comment:
Email:

   


Name:

 
Url: