Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIT 383: Administrative ScriptingSlide #1 CIT 383: Administrative Scripting RSS.

Similar presentations


Presentation on theme: "CIT 383: Administrative ScriptingSlide #1 CIT 383: Administrative Scripting RSS."— Presentation transcript:

1 CIT 383: Administrative ScriptingSlide #1 CIT 383: Administrative Scripting RSS

2 CIT 383: Administrative Scripting Topics 1.Web Feeds 2.Aggregators 3.RSS 4.Atom 5.Feeds in Ruby

3 CIT 383: Administrative Scripting Web Feeds A web feed is a data format used for providing users with frequently updated information, like weather, news, comments.  Content providers syndicate a web feed by providing it via a URL on their web site.  Readers subscribe to a web feed to get updates.  Software like RSS Bandit or Google Reader aggregate multiple web feeds in a single interface so user does not have to visit sites to check for updates manually.

4 CIT 383: Administrative Scripting What data is available via feeds?  Blogs  Blog comments  Tagged blog entries  Music  News  Pictures (from Flickr)  Social networking sites  Transport schedules (Google Transit)  Videos  Weather

5 CIT 383: Administrative Scripting Feeds vs E-mail Web Feeds  User pulls content from provider.  Provider doesn’t know user e-mail.  Unsubscribe by configuring client. E-mail  Provider pushes content to user.  Provider has user e- mail address.  Unsubscribe by contacting provider.

6 CIT 383: Administrative Scripting Aggregators

7 CIT 383: Administrative Scripting Aggregators Browser  Firefox (live bookmarks)  Firefox Sage add-on  IE 7  Opera Standalone  Akregator  BottomFeeder  Liferea  RSS Bandit Online  AmphetaDesk  Bloglines  Fastladder  Google Reader Indirect  iGoogle  MyYahoo  sidebars

8 CIT 383: Administrative Scripting Web Feed Formats Web feeds include both content and metadata Content: Title, link, full or summarized text Metadata: Author, publication date XML-data formats Atom RSS

9 CIT 383: Administrative Scripting RSS Variants RSS-DEV Working Group RDF Site Summary 0.90 from Netscape RDF Site Summary 1.0 Harvard’s Berkman Center Rich Site Summary 0.91 from Netscape Really Simple Syndication 2.0

10 CIT 383: Administrative Scripting RSS 1.0 Example

11 CIT 383: Administrative Scripting Atom Alternative to RSS, published as RFC 4287. Features:  Requires title, unique ID, and last updated time.  Payload container specifies content type  Plain text  Escaped or well-formed HTML  Base64-encoded binary data  Separate summary and content elements.  Standardizes feed autodiscovery.

12 CIT 383: Administrative Scripting Atom Example

13 CIT 383: Administrative Scripting Ruby Feeds RSS  Part of Ruby core library.  Parses and writes RSS. FeedTools  Available as a gem.  Parses Atom and RSS.  Can convert between Atom and RSS versions. Rails  Can write Atom and RSS feeds.

14 CIT 383: Administrative Scripting FeedTools require ‘feed_tools’ url = ‘http://www.pragprog.com/podcasts/feed.rss’ feed = FeedTools::Feed.open(url) feed.entries.each_with_index do |entry,i| puts “#{i} #{entry.title}” end

15 CIT 383: Administrative ScriptingSlide #15 References 1.Michael Fitzgerald, Learning Ruby, O’Reilly, 2008. 2.David Flanagan and Yukihiro Matsumoto, The Ruby Programming Language, O’Reilly, 2008. 3.Hal Fulton, The Ruby Way, 2 nd edition, Addison- Wesley, 2007. 4.Robert C. Martin, Clean Code, Prentice Hall, 2008. 5.Dave Thomas with Chad Fowler and Andy Hunt, Programming Ruby, 2 nd edition, Pragmatic Programmers, 2005.


Download ppt "CIT 383: Administrative ScriptingSlide #1 CIT 383: Administrative Scripting RSS."

Similar presentations


Ads by Google