feeds-20081016
Download
Report
Transcript feeds-20081016
Blogs & feeds
Jim des Rivieres
Oct. 16, 2008
• Grappling with question of how to present
Jazz/OSLC data resources
• “Pure” data resources are presentationfree
• Okay for programmatic clients - robots
• But how do they get presented to
humans???
• Blogs and Atom/RSS feeds
– Has similar issues
• Ask: How do blogs and feeds work?
• Mine for ideas on how to solve for Jazz
• Blogs are hosted at web sites
• Native blog page is text/html
• Page generated by blogging web site
• Page has blog entries embedded in it
• Browsers have hard-wired support for feeds (Atom and
RSS)
• Each blog has an associated feed
• Browser discovers feed links from special
<link> elements in HTML header
• Browser presents feeds using hard-wired
feed view
• Feed is XML document - application/atom+xml
• Generated by blogging web site
• Feed has blog entries embedded in it
•
Browser recognizes feed by inspecting XML
–
–
•
Looks for <feed> as root document element
Looks for Atom XML namespace
Browser ignores Content-Type response header
–
Works if document is text/plain
• Browsers feed view allows navigation to
blog
• Browser discovers this from special <link>
element in feed header
• Subscribe to feed pops up browser dialog
to add to browser favorites
• Feed entries may contain other info that is
not presented by browser feed view…
– Comments on entries is not an Atom concept
• …but do show up in native blog view
– Comments on entries is known to blog site
• Feed entries may also contain info that is
presented by neither native blog page nor
browser feed view
• Feed entries have their own URLs
• Feed entries have links back to native blog
entry
•
Feed document sometimes carry XML stylesheets
– Used to make XML document directly renderable by browsers
– Browser applies XML stylesheet (CSS, XSL) to XML document
•
Ignored by hard-wired browser feed view
• XML feed rendered with XML stylesheet
(simulated)
• Different XSL style sheet
• XML feed rendered with XML stylesheet
(simulated)
Feed aggregation
• Aggregation sites collect entries from various
feeds
• Presents entries through its own native view
• Links in aggregated blog entries refer to original
blog entry
• Allowing navigation back to native blog
page
• Aggregation site also publishes its own
feed
• Which is viewable with browser feed view
(like any other feed)
• Links in feed entries refer to original blog
entry
• Allowing navigation back to native blog
page
Recap – Story so far
• User does not choose presentation of blog
entry
• Choice of presentation is determined by
how user gets to blog entry
Feed readers
• Give users (as opposed to authors) a way
to aggregate entries from diverse feeds
• Two main types
– Web-based
– Desktop tool
Web-based feed readers
• Nothing extra installed on client machine
– Not even browser plug-in/add-in
• All preferences/state maintained on
remote web server
• Web-based feed readers
• Allow you to…
• …to discover feeds
• …and to subscribe to them
• New entries are presented in web feed reader
• Disappear from sight once read
• Some links in blog entries refer to original
blog entry
• Allowing navigation back to native blog
page
• Some links in blog entries are within the
web feed reader
• Allowing in-place browsing of feeds that
you’ve subscribed to
• Adding subscription from feed URL
• Who reads feed document? Browser? Web feed reader
server?
•
•
•
•
Browser talks to web feed reader server exclusively
Browser POSTs subscribe request to reader server API
Reader server retrieves and processes feed
Browser GETs list of unread items via reader server API
Desktop feed readers
• Desktop app installed on client machine
• Preferences/state maintained on client
– Sometimes on remote server (optionally)
• Desktop feed readers
• Let you subscribe to feeds
• New entries are presented in feed reader
• Disappear from sight once read
• Some links in blog entries refer to original blog
entry
• Allowing navigation back to native blog page
• Opened in-place with browser widget
Feedburner
• Some blogs use feedburner
• Navigation from blog entry…
• …redirects to feed view on feedburner.com
• Lets you subscribe with popular web feed
readers
• Hyperlinks go to web feed reader server
– Pass feed URL as parameter
• Also lets you subscribe with popular
desktop feed readers
• As well as navigate to feed document
• Hyperlink to feed XML
• For viewing in browser feed view
Recap
• Blogs and blog entries have URLs
• Presentation level - HTML document
• http://inside-swt.blogspot.com/
• http://planet-oti.muellerware.org/
• Feeds and feed entries have URLs
• Data level - XML document
• http://inside-swt.blogspot.com/feeds/posts/default
• http://planet-oti.muellerware.org/atom.xml
• Rich cross-linking
– Within levels
– Across levels
Recap
• Each feed/entry resource has a native web
presentation
Recap
• Use special <atom:link> elements
embedded in feed resource
• Uses special <html:link> elements
embedded in HTML resource
• Does not use content negotiation
– (except for a few anomalies with feedburner)
Recap
• Story relies in places on browser built-in
feed view
– Allows direct hyperlinking from presentation to
data level
– Allows feed URL to be typed in to browser
Recap
• Many, many presentations for a blog entry
– Native presentation at originating blog
– Each browser feed view
• Slightly different for each browser
– Native presentation at each aggregation site
– Web-based feed readers
– Desktop feed readers
Recap
• User does not choose presentation of blog
entry
• Choice of presentation is determined by
how user gets to blog entry
• User is free to choose which feed reader
to use
– Optional
Thanks
• Fiddler Web Debugging Proxy
– Free Microsoft tool for Windows
– Lets you inspect HTTP traffic that IE sends
– Approved for individual IBM-internal use
– http://www.fiddler2.com/fiddler2/