• Save
Atom Publishing Protocol
Upcoming SlideShare
Loading in...5
×
 

Atom Publishing Protocol

on

  • 2,393 views

Mein Vortrag über AtomPub.

Mein Vortrag über AtomPub.


http://twitter.com/rmetzler

Statistics

Views

Total Views
2,393
Views on SlideShare
2,387
Embed Views
6

Actions

Likes
0
Downloads
0
Comments
0

1 Embed 6

http://www.slideshare.net 6

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Atom Publishing Protocol Atom Publishing Protocol Presentation Transcript

  • Atom Publishing Protocol RFC 5023
  • Atom Publishing Protocol
    • Application-Level Protokoll zum Veröffentlichen und Editieren von Web-Resourcen
    • baut auf HTTP & XML (Atom Format) auf
    • Ziel: Vereinheitlichung der Verwaltung von Content in Verteilten Systemen
      • Ermöglicht Erzeugen, Lesen, Editieren, Löschen von Resourcen
  • Bedeutung
    • Blogging
      • WordPress
    • Google Data APIs (GData)
      • Youtube, Blogger, Picasa Gallery, Google Docs
    • weitere Seiten
      • z.B. http://www.feedbooks.com/
    • Joe Gregorio: „APP is a failure“
      • http://bitworking.org/news/425/atompub-is-a-failure
      • fat client vs. browser
  • Definitionen
    • Definitionen aus HTTP:
      • URI / IRI: Uniform / International Resource Identifier (RFC 3986)
      • Resource: netzwerk-zugängliches Datenobjekt
      • Representation: Darstellung des Datenobjekts
  • Definitionen
    • Collection: Eine Menge an Resourcen. Dargestellt als Atom Feed.
    • Member Resource: Resource, die in einer Collection mit der Relation „edit“ oder „edit-media“ gelistet ist
      • Entry Resource: Repräsentation als Atom Entry
      • Media Resource: andere Repräsentation
      • Media Link Entry: eine Entry Resource, die Metadaten über eine Media Resource enthält
    • Relation: „rel“ Attribut eines atom:link Elements
  • Definitionen
    • Service Document: Beschreibung von einer oder mehr Workspaces
    • Workspace: Gruppe von Collections
    • Category Document: Beschreibung der erlaubten Kategorien in einer Collection
  • Service Documents
    • Wie Service Documente gefunden werden ist nicht spezifiziert
    • Mime Type „application/atomsvc+xml“
  • Service Documents <? xml version = &quot;1.0&quot; encoding = 'utf-8' ?> < service xmlns = &quot; http://www.w3.org/2007/app &quot; xmlns:atom = &quot;http://www.w3.org/2005/Atom&quot; > < workspace > < atom:title > Main Site </ atom:title > < collection href = &quot;http://example.org/blog/main&quot; > < atom:title > My Blog Entries </ atom:title > < categories href = &quot;http://example.com/cats/forMain.cats&quot; /> </ collection > < collection href = &quot;http://example.org/blog/pic&quot; > < atom:title > Pictures </ atom:title > < accept > image/png </ accept > < accept > image/jpeg </ accept > < accept > image/gif </ accept > </ collection > </ workspace > </ service >
  • Service Documents <? xml version = &quot;1.0&quot; encoding = 'utf-8' ?> < service xmlns = &quot; http://www.w3.org/2007/app &quot; xmlns:atom = &quot;http://www.w3.org/2005/Atom&quot; > < workspace > < atom:title > Sidebar Blog </ atom:title > < collection href = &quot;http://example.org/sidebar/list&quot; > < atom:title > Remaindered Links </ atom:title > < accept > application/atom+xml;type=entry </ accept > < categories fixed = &quot;yes&quot; > < atom:category term = &quot;joke&quot; scheme = &quot; http://example.org/extra-cats/ &quot; /> < atom:category term = &quot;serious&quot; scheme = &quot; http://example.org/extra-cats/ &quot; /> </ categories > </ collection > </ workspace > </ service >
  • Collection lesen
    • Atom Format (RFC 4287)
    • Menge von Resourcen
      • geordnet nach app:edited
    • Mime Type application/atom+xml
  • Collection <? xml version = &quot;1.0&quot; encoding = &quot;utf-8&quot; ?> < feed xmlns = &quot;http://www.w3.org/2005/Atom&quot; > < title > Example Feed </ title > < link href = &quot;http://example.org/&quot; /> < updated > 2003-12-13T18:30:02Z </ updated > < author > < name > John Doe </ na me > </ author > < id > urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6 </ id > < entry > < title > Atom-Powered Robots Run Amok </ title > < link href = &quot;http://example.org/2003/12/13/atom03&quot; /> < id > urn:uuid:1225c695-cfb8-4ebb- aaaa -80da344efa6a </ id > < updated > 2003-12-13T18:30:02Z </ updated > < summary > Some text. </ summary > </ entry > </ feed >
  • Methoden Operation HTTP Methode create POST read GET update PUT delete DELETE
  • Anlegen / POST
    • POST der Representation an die URI der Collection
      • gewünschter Titel im SLUG HTTP-Header
      • Falls Representation kein atom:entry, dann Media Entry & Media Link Entry
    • Location Header im Response enthält neue URI
  • Lesen / GET
    • GET auf die Member URI
    • Representation wird zurückgegeben
      • atom:entry falls Entry Member
      • Sonst andere Representation
    • 404 File not Found, falls Resource nicht vorhanden
  • Update / PUT
    • PUT an die Member URI ändert den bisherigen Eintrag
      • Client sollte gesamte Representation schicken, nicht nur Änderungen
  • Löschen / DELETE
    • DELETE auf die URI eines Member Entry löscht diesen
      • Löschen eines Media Link Eintrags sollte auch die zugehörige Media Resource löschen
  • Methoden HTTP Methode URI Returns CREATE POST Collection URI Member Representation 201 Created Location: Member URI READ GET Member URI 200 Ok Member Representation UPDATE PUT Member URI Member Representation 200 Ok DELETE DELETE Member URI 200 Ok
  • Pagination
    • Zu große Collections kann der Server teilen
    • Navigation via rel-Attribute
      • „next“, „previous“, „first“, „last“
    < feed xmlns = &quot;http://www.w3.org/2005/Atom&quot; > < link rel = &quot;first&quot; href = &quot;http://example.org/entries/&quot; /> < link rel = &quot;previous&quot; href = &quot;http://example.org/entries/2&quot; /> < link rel = &quot;next&quot; href = &quot;http://example.org/entries/4&quot; /> < link rel = &quot;last&quot; href = &quot;http://example.org/entries/10&quot; /> <!-- ... --> </ feed >
  • Category Documents
    • In einer Collection erlaubte Kategorien
      • fixed = Liste der Kategorien unveränderbar
    • Mime Type = „application/atomcat+xml“
    <? xml version = &quot;1.0&quot; ?> < app:categories xmlns:app = &quot;http://www.w3.org/2007/app&quot; xmlns:atom = &quot;http://www.w3.org/2005/Atom&quot; fixed = &quot;yes&quot; scheme = &quot;http://example.com/cats/big3&quot; > < atom:category term = &quot;animal&quot; /> < atom:category term = &quot;vegetable&quot; /> < atom:category term = &quot;mineral&quot; /> </ app:categories >