17
Accessing Windows Live Services via AtomPub Pablo Castro Software Architect Microsoft Corporation

Service Interfaces Atom & AtomPub Atom-Enabled Data Services Drill Down: Windows Live Spaces Photos Data Services Framework Wrap-up

Embed Size (px)

Citation preview

Accessing Windows Live Services via AtomPubPablo CastroSoftware ArchitectMicrosoft Corporation

Agenda

Service InterfacesAtom & AtomPubAtom-Enabled Data ServicesDrill Down: Windows Live Spaces PhotosData Services FrameworkWrap-up

Service Interfaces

Operation-centric vs data-centric interface style depending on the nature of the service

Data Centric

• Spaces Photos, …• Application-Based Storage• SQL Data Services• …

Operations Centric

• Messenger• Live ID• Alerts• …

Existing interfaces work well

New Atom interfaces

Data Services & AtomPub

AtomPub

Unified Development Story

Visual Studio

.NET and Silverlight

2

ASP.NET Integration

AJAX library

3rd party component

s

Consumer Services

e.g.:• Windows Live Spaces (Photos)

Infrastructure Services

e.g.:• Application- Based Storage• SQL Server Data Services

On-Premises Services

e.g.:• Data Services framework against local SQL Server

The Atom Syndication Format

IETF RFC 4287

XML format

Organized in feeds, entries and links

Extensible data and metadata

<feed xmlns="…/Atom">

<id>…/Folders</id> <title>Folders</title> <updated>…</updated> <author> <name>John Doe</name> </author>

<entry> <id>…/Folders(123)</id> <title>Cool Pics</title> <updated>…</updated> <link rel="self" … /> <link rel="related" … /> <content type="app/xml"> < … content … > </content> </entry>

</feed>

The Atom Publishing Protocol

IETF RFC 5023

Protocol for publishing and editing resources

Atom representations over HTTP

Simple RESTful interaction model

DE

LETE

PU

T

PO

ST

GE

T

Server w/ AtomPub interface

Photos is part of Windows Live Spaces

New experimental AtomPub interfacehttps://cumulus.services.live.com/{id}/

AtomSpacesPhotos

Authorization via LiveIDMore information at http://dev.live.com/liveidCheck out the delegated authentication SDK

Browse and create folders and photosFolders/Photos as Atom feeds and entriesPhotos are Atom “media link entries”

Drill Down: Photos

URL Conventions

AtomPub does not specify URL formatWe follow a predictable, uniform pattern

Description Example URL

Top-level container /Folders

Address single entry by ID /Folders(123)

Traverse a link /Folders(123)/Photos

Addressing can nest as appropriate

/Folders(123)/Photos(456)/ImageStreams

Access primary value /Folders(123)/Photos(456)/$value

Presentation control ** $orderby, $filter, $top, $skip, $expand

Service metadata /$metadata

Accessing AtomPub Services

Any HTTP stack

• Minimal barrier of entry, retain full control• Manually deal with content and interaction

AtomPub libraries

• .NET: WCF Syndication• Many available for other environments

ADO.NET Data Services Framework

• Services that follow the ‘Astoria’ conventions• First-class support in client-stack

ADO.NET Data Services Framework

aka “Project Astoria”

Rich framework for data servicesConsume existing servicesExpose your own data as a serviceModel-driven, uses the Entity Data Model

Follows the same patterns as Live services

Same HTTP AtomPub-based interface

Clients for Data Services

ADO.NET Data Services tools apply across all data services

.NET & Silverlight librariesObject-based API, LINQ query supportASP.NET integration

AJAX libraryTools driven by Entity Data model

3rd party control vendors for even richer toolbox

AD

O.N

ET D

ata

S

erv

ices

Fram

ew

ork

Your Own Data Services

ADO.NET Data Services Framework

Data-centric servicesAtomPub interface‘Astoria’ conventionsVarious data sourcesOnline or on-premises

Data Access LayerEntity

Framework

Custom LINQ

provider

Relational database Other

sources

Service Runtime

Hosting/HTTP listener

HTTP

IQueryable [+ IUpdatable]

Summary

Service alignment We’re aligning our services on AtomPubFirst experimental interfaces available

Windows Live Spaces PhotosApplication-Based Storage (experimental service)SQL Server Data Services (soon)

Your own services can follow the same interface

Rich developer storyUnified conventions for URLs and data modelGrowing tools/components ecosystem

Try this out and give us feedback!

Related Talks at Mix 2008

SessionsRESTful Data Services with the ADO.NET Data Services FrameworkDeveloping with Windows LiveIntroducing SQL Server Data ServicesUsing the Microsoft Sync Framework and FeedSyncBuilding RESTful Real World Applications with the ADO.NET Data Services Framework

Also check out the hands-on labs!

Resources

Windows Live APIshttp://dev.live.com

ADO.NET Data Services Frameworkhttp://astoria.mslivelabs.comhttp://blogs.msdn.com/astoriateam

AtomPubhttp://atomenabled.org

Contact mehttp://blogs.msdn.com/[email protected]

© 2008 Microsoft Corporation. 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.