MIX08- Accessing Windows Live Services via AtomPub
Atom Syndication Format
- IETF RFC 4287
- XML format
- Organized in feeds, entries and links
- Extensible data and metadata
Atom Publising Protocol
- IETF RFC 5023
- Protocol for publishing and editing resources
- Represents over HTTP
- Simple RESTful interaction model
Demo Photos:
https://cumulus.services.live.com/{id}/AtomSpacesPhotos
-Authorization via LiveID http://dev.live.com/liveid
-Browse and create folders and photos
- Folders/Photos as Atom feeds and entries
- Photos are Atom "media link entries"
<feed>
data
<entries>
data
<content type> like jpg with src url.
Edit link in atom. Links to just an entry.
<link> Uri to location
<LP:Properties> ID Version of content within content.
PUT POST via Http is accessible.
Some of the control mechanisms:
- Service metadata /$metadata
- Presentation control $orderby, $filter, $top, $skip, $expand
- Access primary value url/$value
Post at feed level.
scalar pull in item
set pull in set
Over any HTTP stack within AtomPub libraries Using ADO.NET (Astoria) Data services Framework.
Windows live is trying very hard to be like flickr,Amazon S3,Google Docs and etc...
Note:
foreach(Folder f in svc.Folders)
WebClient c = new WebClient();
c.headers["Authorization"] = "DelegatedToken dt=\"" + DelegationToken
using(Stream s= c.OpenRead(string.Format(Svc, CID) + "/Folders"))
var feed = SyndicationFeed.Load(XMLReader)
foreach (SyndicationItem item in feed.Items);
{
Dropdownlist1.Items.Add(item.Title.Text);
}
Tie anything Windows live into Silverlight using AJAX libraries driven by Entity Data model.
Note: var q = svc.CreateQuery<photo>(/Folder("+ id + ")/Photos");
New in Visual Studio 2008?
- DataServiceDataSource
- DatacontextType
Very cool.
Did I mention Pablo is a GURU of Data Connection(services)