1 / 62

Speaking OData to SharePoint 2010 in a RESTful manner

Speaking OData to SharePoint 2010 in a RESTful manner. Michaël Hompus | Principal Developer | Winvision. Speaking OData to SharePoint 2010 in a RESTful manner. Michaël Hompus. Principal Developer michael.hompus@winvision.nl http://blog.hompus.nl @eNeRGy164. REST. OData.

race
Télécharger la présentation

Speaking OData to SharePoint 2010 in a RESTful manner

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Speaking OData to SharePoint 2010in a RESTful manner Michaël Hompus | Principal Developer | Winvision

  2. Speaking OData to SharePoint 2010 in a RESTful manner Michaël Hompus Principal Developer michael.hompus@winvision.nl http://blog.hompus.nl @eNeRGy164

  3. REST • OData • SharePoint 2010

  4. REST • OData • SharePoint 2010

  5. Wikipedia Representational State Transfer (REST) is een software-architectuur voor gedistribueerde mediasystemen zoals het World wide web. ”

  6. Client-server • Stateless • Cachable Uniform interface * Code on demand Layered system

  7. Client-server

  8. Stateless

  9. Cachable

  10. Uniform interface

  11. Identificatie van resources Elke resource binnen de applicatie heeft zijn eigen adres, bijv. een unieke URL. Een resource heeft een representatie, bijv. in de vorm van HTML, XML of JSON. Manipulatie van resources d.m.v. de representatie Met behulp van resource en bijbehorende metadata kan een resource gewijzigd of verwijderd worden. Bijvoorbeeld door gebruik te maken van HTTP methods zoals GET, PUT, POST en DELETE. Zelf beschrijvende berichten Door middel van mime-types wordt doorgegeven hoe de client de informatie kan verwerken, ook de cachebaarheid wordt meegegeven. “Hypermedia” als motor van “state” Om van state te veranderen kan de representatie van een resource bijvoorbeeld hyperlinks bevatten. Zo’n link kan wijzen naar gerelateerde informatie. Uniform interface

  12. Layered system

  13. * Code on demand

  14. Bekende REST API’s

  15. OData.org The Open Data Protocol (OData) is a Web protocol for querying and updating data that provides a way to unlock your data and free it from silos that exist in applications today. ”

  16. Open Data Protocol (v2.0) • Open Data Protocol (v1.0) AtomPub [RFC5023] JSON [RFC4627] XML, etc HTTP(S) [RFC2616] TCP [RFC793]

  17. DEMO

  18. OData feed AtomPub feed

  19. Feeds

  20. Entries

  21. Typed data

  22. Relaties tussen entries

  23. Adressering http://services.odata.org/OData/OData.svc http://services.odata.org/OData/OData.svc/$metadata http://services.odata.org/OData/OData.svc/Categories http://services.odata.org/OData/OData.svc/Categories/$count http://services.odata.org/OData/OData.svc/Categories(1) http://services.odata.org/OData/OData.svc/Categories(1)/Name http://services.odata.org/OData/OData.svc/Categories(1)/Name/$value http://services.odata.org/OData/OData.svc/Categories(1)/Products http://services.odata.org/OData/OData.svc/Categories(1)/Products(1)

  24. Query operaties …/OData.svc/Products?$orderby=Rating …/OData.svc/Products?$orderby=Rating asc …/OData.svc/Products?$orderby=Rating,Category/Name desc …/OData.svc/Products?$top=5 …/OData.svc/Products?$skip=5 …/OData.svc/Products?$skip=2&$top=2&$orderby=Rating …/OData.svc/Products?$select=Price,Name …/OData.svc/Categories?$expand=Products

  25. Atom (XML) JSON

  26. DEMO

  27. http://localhost/_vti_bin/ListData.svc

  28. http://localhost/_vti_bin/ListData.svc/Documents

  29. http://localhost/_vti_bin/ListData.svc/Documents(1)/CreatedByhttp://localhost/_vti_bin/ListData.svc/Documents(1)/CreatedBy

  30. DEMO

  31. .../Shared Documents/Gears Sales History.xlsx

  32. .../_vti_bin/ExcelRest.aspx/Shared Documents/Gears Sales History.xlsx/Model

  33. .../Gears Sales History.xlsx/Model?$format=workbook

  34. .../Gears Sales History.xlsx/Model/Tables

  35. .../Gears Sales History.xlsx/Model/Tables/Table('Table2')?$format=atom

  36. .../Gears Sales History.xlsx/Model/Tables/Table('Table2')?$format=html

  37. .../Gears Sales History.xlsx/Model/Charts('Chart 3')?$format=image

More Related