Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

OData – Super Cola W3


Published on

Published in: Technology
  • Be the first to comment

OData – Super Cola W3

  1. 1. 34ª Reunião Lisboa - 08/12/2012 OData – A Super Cola W3! Jorge Gonçalves & Manuel Costa
  2. 2. Jorge GonçalvesFormador responsável .NET na Rumos SAFundador da Consultora SimpleFactorAdministrador de Sistemas na DGITAAnalista Programador (Altitude Software, BES, BCP, ...)Manuel CostaConsultor .NET na PT Sistemas de Informação área do Portal Web de Vendas da PT.Co-fundador da Factor Digital Informática em2000, onde desenvolveu sobre plataformas webpara a Microsoft, a TMN, a Priberam, os HotéisDom Pedro, a Nestlé… Sempre em .NET
  3. 3. Agenda: OData – The Web “Glue”!• The What’s and Why’s• CRUD: “REST in peace”• Writing OData Services With .NET• OData Clients
  4. 4. What is OData• “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.”• “OData does this by applying and building upon Web technologies such as HTTP, Atom Publishing Protocol (AtomPub) and JSON to provide access to information from a variety of applications, services, and stores.”
  5. 5. Why use the Open Data Protocol?• “Provides a uniform way to expose, structure, query and manipulate data using REST practices and JSON or ATOM syntax to describe the payload. OData also provides a uniform way to represent metadata about the data, allowing computers to know more about the type system, relationships and structure of the data.”
  6. 6.
  7. 7. OData - REST “in Peace”• URI Conventions$metadata• System Query Options ?$skip=2&$top=2&$orderby=Rating&$filter=Price le 200 and Price gt 3.5 &$select=Price,Name &$inlinecount=allpages &$format=json
  8. 8. URI Conventions using IE 10 + Chrome LinkPad Fiddler
  9. 9. Writing OData Services using .NET• Web Application / Web Site – Add New Item -> WCF Data Service...• Create Class derived from DataService – Reflection Provider – Entity Framework Provider• Configure Entitity/Operation access• Add custom operations• Interceptors
  10. 10. Writing OData Service using .net - IQueryable - EF (Northwind DB)
  11. 11. OData Clients: .Net• Project -> Add Service Reference...• Security / Authentication [1]
  12. 12. Consuming OData Service using .net
  13. 13. OData Clients: Javascript• Javascript – JSON • V3: Accept: application/json;odata=verbose• DataJS• JayData• KendoUI• XSS Issues (JSONP Support!)
  14. 14. Consumint OData Service usingJavascript
  15. 15. OData Clients: Excel
  16. 16. OData Clients: LightSwitch
  17. 17. Useful Tools• Fiddler• Tcptrace• LinqPad
  18. 18.
  19. 19. Questões?
  20. 20. Referências• Open Data Protocol (What’s and Why’s) –• OData - REST “in Peace” – – –• Writing/Consuming OData Services – MSDN “Open Data Protocol by Example” • – CodeProject “OData Services” • – Authenticating with ADO.NET Data Services •
  21. 21. Patrocinador “GOLD”Twitter: @PTMicrosoft
  22. 22. Patrocinadores “Silver”
  23. 23. Patrocinadores “Bronze”
  24. 24. Questões?
  25. 25. Próximas reuniões presenciais• 08/12/2012 – Dezembro (Lisboa)• 26/01/2013 – Janeiro (Lisboa) 23/02/2013 – Fevereiro (Lisboa) 16/03/2013 – Março (Lisboa) Reserva estes dias na agenda! :)
  26. 26. Obrigado!