none
which is best -Sharepoint server object model Vs Sharepoint client object model RRS feed

  • Question

  • Hi,

       I am having the requirement to create a new list item in the list using silverlight web part with SP Foundation 2010. I have implemented the functionality using WCF services with Sharepoint client object model and with some complex code. I heard that some functionality can implement with Sharepoint server object model with less code. I would like to know what is the difference between Server object model and Client object model. When it will be used under which conditions and purposes. Both have achieved the same functionality, but which is best to implement for my requirements.

     


    Balaji
    Wednesday, December 29, 2010 5:54 AM

Answers

  • Hi,

    Server-side APIs that enable you to retrieve, add, edit, and delete SharePoint data programmatically. SharePoint 2010 also includes the new LINQ to SharePoint technology that enables you to work with SharePoint data efficiently and easily.

    Client object model that enables you to create SharePoint solutions that run remotely from the SharePoint server farm. For example, the client object model enables you to consume and manipulate SharePoint data in Windows Forms applications, Windows Presentation Framework application, console applications, Silverlight applications, and ASP.NET Web applications.

    For your scenario, you should use client object model to create Silverlight application.

    Hope the information can help you.


    Xue-Mei Chang
    • Marked as answer by balaji_rcs Thursday, December 30, 2010 7:57 AM
    Thursday, December 30, 2010 7:17 AM
    Moderator

All replies

  • Hi

    SharePoint server object model can be used when you want the code that you write to run on the server in a Sharepoint context. (example: Visual Web part)

    But when you create a Silverlight web part, the code that you write runs on the client side.

    If you want to write code to work with a sharepoint site remotely(code does not execute on the server) you cannot use the server object model.

     So you have to use client object model for that.

    Wednesday, December 29, 2010 8:20 AM
  • Hi,

    Server-side APIs that enable you to retrieve, add, edit, and delete SharePoint data programmatically. SharePoint 2010 also includes the new LINQ to SharePoint technology that enables you to work with SharePoint data efficiently and easily.

    Client object model that enables you to create SharePoint solutions that run remotely from the SharePoint server farm. For example, the client object model enables you to consume and manipulate SharePoint data in Windows Forms applications, Windows Presentation Framework application, console applications, Silverlight applications, and ASP.NET Web applications.

    For your scenario, you should use client object model to create Silverlight application.

    Hope the information can help you.


    Xue-Mei Chang
    • Marked as answer by balaji_rcs Thursday, December 30, 2010 7:57 AM
    Thursday, December 30, 2010 7:17 AM
    Moderator
  • Hi Xue-Mei Chang,

       Thanks for your reply.


    Balaji
    Thursday, December 30, 2010 7:58 AM