19
.NET Framework V3.5+ & RESTful web services Mike Taulty Developer & Platform Group Microsoft Ltd [email protected] http://www.mtaulty.com

NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

  • Upload
    others

  • View
    44

  • Download
    0

Embed Size (px)

Citation preview

Page 1: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

.NET Framework V3.5+ & RESTfulweb services

Mike Taulty

Developer & Platform Group

Microsoft Ltd

[email protected]

http://www.mtaulty.com

Page 2: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

Agenda

Windows Communication Foundation V3.5

Released

Visual Studio 2008/.NET Framework V3.5

ADO.NET Data Services

Preview – framework and tooling

Latest is the December CTP, ships H1 2008

Has strong links to ADO.NET Entity Framework

– Both are part of ASP.NET 3.5 Extensions Preview

Page 3: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

RESTful?

Page 4: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

RESTful?

Resources

Res 1

Res 2

Res 3

Res 4

HTTP RequestURL

VERB

Payload

HTTP Response

Status

GET

POST

PUT

DELETEXML JSON

Payload

XML JSON

Page 5: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

RESTful?

REpresentational State Transfer

In a nutshell;Server-side resources identified by a URI

Access is over HTTP, verb tied to action– GET to read the value of a resource

– POST to create a new resource*

– PUT to update an existing resource*

– DELETE to delete a resource

Returned data is “plain” – XML or JSON

Page 6: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

RESTful?

Page 7: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

WCF V3.5

Page 8: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

WCF V3.5 and REST

New capabilities around RESTful services

webHttpBinding

– HTTP(S) protocol (not new in itself)

– URI based dispatch and parameter passing

– “Plain” XML/JSON serialisation

New RSS/Atom publication capabilities

Page 9: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

WCF V3.5 REST and Syndication

Page 10: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

ADO.NET Data Services

Page 11: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

Data Services

Built on top of WCF V3.5

CRUD access to data over a RESTful interface

Returns XML (ATOM format) or JSON

Built-in URI-based query syntax

selection, filtering, paging, sorting

Client-side libraries for .NET and AJAX clients

Desktop .NET and Silverlight .NET

Page 12: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

data? what kind of data?

Provide a type with public properties which are;

IQueryable<T>, IEnumerable<T>

Also get write access if your type implements;IUpdatable

Works well with generated code from;ADO.NET Entity Framework (ObjectContext)

LINQ to SQL (DataContext*)

Page 13: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

entity framework? who he?

Extension to the provider model

Conceptual modelInheritance

Relationships

Composite Entities

AbstractionsSchema of the store

SQL dialact of the store

Store

.NET Provider

V2.0

Conceptual Model

.NET Provider(EntitySQL)

ORM & LINQ

“V3.0”

Map

pin

g

Page 14: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

ADO.NET Data Services

Page 15: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

More Data Services Capabilities

Service Operations

Expose more advanced functionality

Query Interceptors

Hook into requests for resources and run custom logic

Update Interceptors

Hook into modifications for resources and run custom logic

Page 16: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

ADO.NET Data Services II

Page 17: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

Resources

http://www.asp.net

(looking for “3.5 Extensions preview”)

http://msdn.co.uk(looking for WCF V3.5 screencasts)

Page 18: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

MSDN in the UK

Visit http://msdn.co.ukNewsletter

Events

Screencasts

Blogs

Page 19: NET Framework V3.5+ & RESTfuldownload.microsoft.com/documents/uk/msdn/events/RESTFul_Services.pdfXML JSON DELETE Payload XML JSON. RESTful? REpresentational State Transfer In a nutshell;

© 2007 Microsoft Ltd. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.

The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market

conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation.

MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.