AN INTRODUCTION TO THE NEW CLIENT OBJECT
                   MODEL
             IN SHAREPOINT 2010




OR: WE DON’T NEED NO...
Developing applications using
the SharePoint 2010 Client APIs.

 G. Scott Singleton - Principal SharePoint Architect
 i3so...
Learn from yesterday, live for
 today, hope for tomorrow.
The important thing is not to
     stop questioning.

       Alb...
I do “Code Solutions”.
None of this “No-Code”
crap.
There’s no way to take advantage of all of the rich client
experience ...
Gotcha! Bet you didn’t think you would see the
 new SharePoint pie in a developer session eh?
Working with SharePoint
Client Applications Today
      in WSS 3.0...
Accessing SharePoint Data

    SharePoint Data (SQL)


       SharePoint API        SharePoint /
                         ...
Working With SharePoint
Client Applications NOW
   in SharePoint 2010
Tomorrow
 ‘RESTful’ Architecture
 ADO.NET Data Services Framework
     Formerly Known as “Astoria”

     ADO.NET Data Serv...
JSON? WTH?
 WASN’T HE IN MY ADVANCED PHYSICS LAB BACK
 IN CALI?
JavaScript Object Notation



   {"menu": {
     "id": "file",
     "value": "File",
     "popup": {
       "menuitem": [
...
phew! I need a REST!
Using the REST API
                      Representational
                       State Transfer

REST API provided through...
A Quick note on Data
 Services Compatibility
If you want to try out Data Services with the SharePoint 2010 Beta today you
...
Atomized Data via REST
By using The REST API We can retrieve atomized
             data directly from a list
RESTful api Demo
cross your fingers!
Available QueryString
parameters
 Default Parameter is item ID and enclosed in parens. ( Links(1) )
 $filter - formatted li...
Client Object Model
Simple API to Add, Retrieve and Update data within
SharePoint 2010
Supports three major client develop...
Benefits of Client Object
Model
 A Richer User eXperience (UX) than the simple
 WebForms post-back model
 Reduces impact on...
What we currently do
.NET CLR client code
Using the client OM in
SilverLight
  Silverlight is Asynchronous by Nature
  Provides both an ExecuteQuery() and
  Execute...
DEMO - .NET and Silverlight
CLR - Cross your fingers!
Client Object Model Summary
  Similar constructs and naming convention as Server
  Object Model; reduces developer ramp-up...
Don’t forget to fill out your
 speaker survey forms.
   scottsingleton on twitter - follow me foo
   scott.singleton@i3solu...
SharePoint 2010 Client Object Model
SharePoint 2010 Client Object Model
SharePoint 2010 Client Object Model
Upcoming SlideShare
Loading in...5
×

SharePoint 2010 Client Object Model

8,775

Published on

Discussion on the new features of the Client Object Model (Client OM) in SharePoint 2010.

Presented at SharePoint Saturday Richmond 11/18/2009

Presented at SharePoint Saturday Virginia Beach 1/13/2010

Presented at SharePoint Saturday Boston 2/27/2009

Published in: Technology
1 Comment
7 Likes
Statistics
Notes
  • Nice. I also have updated my blog with good articles on SharePoint 2010 client object model as shown in here.
    http://praveenbattula.blogspot.com/search/label/SharePoint%202010
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
8,775
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
1
Likes
7
Embeds 0
No embeds

No notes for slide





























  • SharePoint 2010 Client Object Model

    1. 1. AN INTRODUCTION TO THE NEW CLIENT OBJECT MODEL IN SHAREPOINT 2010 OR: WE DON’T NEED NO STINKIN’ GOLD-PLATED WEB-SERVICES!
    2. 2. Developing applications using the SharePoint 2010 Client APIs. G. Scott Singleton - Principal SharePoint Architect i3solutions, Inc. - Sterling, VA. Involved with SharePoint 2010 since May 2009 One TAP project and three current RTM projects
    3. 3. Learn from yesterday, live for today, hope for tomorrow. The important thing is not to stop questioning. Albert Einstein
    4. 4. I do “Code Solutions”. None of this “No-Code” crap. There’s no way to take advantage of all of the rich client experience gains in SP 2010 without code. Why waste 40 hours looking for that no-code solution when you could have developed the code-solution in 1/3 the time. Hell, that’s why we make the big money.
    5. 5. Gotcha! Bet you didn’t think you would see the new SharePoint pie in a developer session eh?
    6. 6. Working with SharePoint Client Applications Today in WSS 3.0...
    7. 7. Accessing SharePoint Data SharePoint Data (SQL) SharePoint API SharePoint / Server SharePoint Custom Web Applications Web Services Services Your Client Application
    8. 8. Working With SharePoint Client Applications NOW in SharePoint 2010
    9. 9. Tomorrow ‘RESTful’ Architecture ADO.NET Data Services Framework Formerly Known as “Astoria” ADO.NET Data Services (CTP 2) Required on Server for Beta, RTM for Release Candidate JSON - JavaScript Object Notation Client Object Model (Client OM)
    10. 10. JSON? WTH? WASN’T HE IN MY ADVANCED PHYSICS LAB BACK IN CALI?
    11. 11. JavaScript Object Notation {"menu": { "id": "file", "value": "File", "popup": { "menuitem": [ {"value": "New", "onclick": "CreateNewDoc()"}, {"value": "Open", "onclick": "OpenDoc()"}, {"value": "Close", "onclick": "CloseDoc()"} ] } }} basically a string containing the javascript code to create the object in memory
    12. 12. phew! I need a REST!
    13. 13. Using the REST API Representational State Transfer REST API provided through ADO.NET Data Services Framework via WCF /_vti_bin/ListData.svc is base service -- and it is case sensitive Can be used to bind to data services from client applications with ADO.NET Data Services CTP 2 (or Data Services Update for .NET 3.5 SP1 )
    14. 14. A Quick note on Data Services Compatibility If you want to try out Data Services with the SharePoint 2010 Beta today you have to use CTP2 of Data Services v1.5, because unfortunately the Data Service RTM version, aka the Data Services Update for .NET 3.5 SP1 is incompatible with the SharePoint 2010 Beta. This is a point in time issue – when SharePoint RTMs it will work seamlessly with the Data Services Update for .NET 3.5 SP1. Alex James Program Manager Microsoft
    15. 15. Atomized Data via REST
    16. 16. By using The REST API We can retrieve atomized data directly from a list
    17. 17. RESTful api Demo cross your fingers!
    18. 18. Available QueryString parameters Default Parameter is item ID and enclosed in parens. ( Links(1) ) $filter - formatted like a CAML query $expand - returns parent object (lookups, relations, etc) $orderby - Sets return order by $skip - Skips x items $top - Returns top x ($top=2 returns top 2) Can be stacked together example: $orderby=Title&top=1
    19. 19. Client Object Model Simple API to Add, Retrieve and Update data within SharePoint 2010 Supports three major client development languages. .NET CLR JavaScript Silverlight CLR Gives you consistency and efficiency across the development platforms Unfortunately you’re still stuck with CAML for the initial query to the server.
    20. 20. Benefits of Client Object Model A Richer User eXperience (UX) than the simple WebForms post-back model Reduces impact on server by executing more processes on the client’s machine Normalizes calls between three available client architectures. Batches calls to reduce roundtrip Provides Asynchronous ability for better UX performance Late stage data retrieval - returns all the data you need, but only the data you need.
    21. 21. What we currently do
    22. 22. .NET CLR client code
    23. 23. Using the client OM in SilverLight Silverlight is Asynchronous by Nature Provides both an ExecuteQuery() and ExecuteQueryAsync() Method -- but if you’re updating the UI you MUST use the Asynchronous call. Must provide success and failure callbacks for UI Updates Must hand off UI work to the dispatcher Similar nomenclature to the .NET CLR
    24. 24. DEMO - .NET and Silverlight CLR - Cross your fingers!
    25. 25. Client Object Model Summary Similar constructs and naming convention as Server Object Model; reduces developer ramp-up time. Reduction of server overhead by offloading processes onto the client Improves the client’s UX dramatically Reduction of round-trips to server via late-stage batching No need for messy custom web services All around cool
    26. 26. Don’t forget to fill out your speaker survey forms. scottsingleton on twitter - follow me foo scott.singleton@i3solutions.com http://www.i3solutions.com Looking for SharePoint Consulting? -- Call us! Looking for a challenging career in SharePoint development with one of THE leaders in Microsoft’s Mid-Atlantic region? -- Call us!

    ×