Access SharePoint Remotely


Published on

This is my presentation in Cairo Code Camp Feb 2010.
Learn how to write applications that access SharePoint content without installing code on the server. This session will explore the Client Object Model in its three different flavours, .Net, Javascript (ECMA Script) and Silverlight.

Published in: Technology
1 Comment
  • Good introduction.
    Here are some posts which I have written.

    Client Object Model:

    All SharePoint 2010:

    Samples and examples:

    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • This diagram displays how the transport mechanism worksManage client OM = .NET / SilverlightAll communication goes through the client.svc WCF serviceMicrosoft implemented the client OM by decorating the core SharePoint OM with attributes if it was “client aware”[ClientCallableType(Name=“Web”,[…]),[…]]public class SPWeb {}Then a code gen tool generates the client OM assemblies and JavaScriptThis ensures that there’s fidelity between all the client OM’s and the server equiv
  • Access SharePoint Remotely

    1. 1. Access SharePoint Remotely<br />Mohamed Yehia<br />February 2010<br />
    2. 2. Ana Meen?<br />Technical Architect<br /><br /> @mohdyehia<br /><br />
    3. 3. Why?<br />SharePoint is used as: <br />Data repository<br />File sharing<br />Social network<br />Record management<br />Collaboration<br />Simply, make data available<br />Integrate LOB<br />
    4. 4. Challenges<br />SharePoint Object Model available on the server<br />Web services require XML and CAML<br />Major request to increase web services<br />Different from server side code.<br />
    5. 5. Client Object Model<br />Simple API<br />an abstraction layer to return results as recognizable SharePoint objects<br />.Net CLR<br />Silverlight<br />Javascript<br />
    6. 6. Under the Hood<br />ECMAScriptControlsand Logic<br />Browser<br />JSONResponse<br />Server OM<br />ECMAScript OM<br />Client.svc<br />XMLRequest<br />Proxy<br />XMLRequest<br />Proxy<br />Contentdatabase<br />Managed OM<br />JSONResponse<br />ManagedClient<br />Managed Controls and Logic<br />SharePointServer<br />
    7. 7. Not Another Object Model!<br />Efficiency<br />SQL Like<br />Batch processing<br />Network traffic<br />Server Resources<br />Productivity<br />
    8. 8. .Net CLR – Client Object Model<br />Assemblies<br />Path<br />%ProgramFiles%Common FilesMicrosoft Sharedweb server extensions14ISAPI<br />Microsoft.SharePoint.Client.dll<br />Microsoft.SharePoint.Client.Runtime.dll. (145 kb)<br />Compared to <br />Microsft.SharePoint.dll (15.3 MB)<br />
    9. 9. demo<br />.Net CLR – Client Object Model<br />
    10. 10. .Net CLR – Client OM, Tips<br />ClientContext is the center of the universe<br />Remember to always ExecuteQuery<br />Use LINQ to load what you really need<br />Use CamlQuery to access Lists<br />
    11. 11. Silverlight – Client Object Model<br />Assemblies<br />Path<br />%ProgramFiles%Common FilesMicrosoft SharedWeb Server Extensions14TEMPLATELAYOUTSClientBin<br />Microsoft.SharePoint.Client.Silverlight.dll <br />Microsoft.SharePoint.Client.Silverlight.Runtime.dll<br />
    12. 12. demo<br />Silverlght– Client Object Model<br />
    13. 13. Silverlight – Client OM, Tips<br />ExecuteQuery is always asynchronous<br />Callback methods are executed on another thread <br />Use Invokes to update the UI<br />
    14. 14. Javascript – Client Object Model<br />Add link to SP.Js<br />%ProgramFiles%Common FilesMicrosoft SharedWeb Server Extensions14TEMPLATELAYOUTS <br />Debug versions available<br />Automatically adds<br />SP.Core.js,<br /> SP.Runtime.js<br />
    15. 15. demo<br />Javascript– Client Object Model<br />
    16. 16. Javascript– Client OM, Tips<br />ExecuteQuery is always asynchronous<br />Use jQuery<br />Use with <br />Applications Pages<br />Dialog framework<br />Web parts<br />
    17. 17. The Site is the Limit<br />Anything under SPSite<br />Create / delete subsites<br />Create/ delete/ manage lists<br />Create custom actions<br />Create Fields<br />Etc.<br />
    18. 18. Alternatives<br />OOB Web Services<br /> ADO.NET Data Services <br />sitrurl/_vti_bin/listdata.svc<br />Develop your WCF/ Web services<br />
    19. 19. Learn More<br />MSDN (<br />TechNet (<br />Twitter Search #SP2010<br />
    20. 20. Coming Sessions <br />When MEF meets Silverlight – Amr El Sehemy<br />What’s New in SharePoint Designer 2010 – Ayman El Hattab in C 7.02<br />Session 4 : Architecture of SharePoint 2010 Alexander Meijers C 7.01 <br />
    21. 21. Thanks<br /><br />@mohdyehia<br /><br />