SlideShare a Scribd company logo
How to RSS like a ninja
   Jason Austin - @jason_austin
On the agenda...

• What is RSS?
• Why should I use it?
• Creating RSS feeds
• Consuming RSS
• Tracking RSS performance
What is RSS?


• Way to share changing web content
• XML based
Why use RSS?

• Keep users up-to-date with fresh content
• Write once, use many
• Replace older subscription models
Use RSS for...

• ...blog posts!
• ...news articles
• ...forum and article comments
DO NOT use RSS for...

• ...a calendar feed
• ...a replacement for XML-based API’s
• ...static content
Types of RSS Feeds

• RSS 2.0
• RSS 1.0
• Atom
• ...lots more
RSS 2.0

• RSS 2.0 = Really Simple Syndication
• Most Popular
• Simplest
<?xml version="1.0"?>
<rss version="2.0">
<channel>
    <title>Ninja Academy</title>
    <link>http://ninjaacademy.com/</link>
    <description>The source for Ninjas</description>
    <item>
        <title>Throwing Stars</title>
        <link>http://ninjaacademy.com/stars</link>
        <description>How to throw stars</description>
    </item>
   <item>
        <title>Tips for Sneakery</title>
        <link>http://ninjaacademy.com/sneakery</link>
        <description>Be Sneaky My Friend</description>
    </item>
</channel>
RSS 1.0

• RSS 1.0 = RDF Site Summary
• RDF = Resource Description Framework
 • way of structuring metadata
• Consumption instructions are built in
<?xml version="1.0"?>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns="http://purl.org/rss/1.0/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
>
   <channel rdf:about="http://ninjaacademy.com/news.rss">
     <title>Ninja Academy</title>
     <link>http://ninjaacademy.com/</link>
     <description>The Source For Ninjas</description>
     <items>
       <rdf:Seq>
         <rdf:li resource="http://ninjaacademy.com/stars/"/>
         <rdf:li resource="http://ninjaacademy.com/sneakery/"/>
       </rdf:Seq>
     </items>
   </channel>
   <item rdf:about="http://ninjaacademy.com/stars/">
      <title>Throwing Stars</title>
      <link>http://ninjaacademy.com/stars/</link>
      <description>How to Throw Stars</description>
      <dc:date>2002-09-01</dc:date>
   </item>
   <item rdf:about="http://ninjaacademy.com/sneakery/">
      <title>Tips for Sneakery</title>
      <link>http://ninjaacademy.com/sneakery/</link>
      <dc:date>2002-09-02</dc:date>
   </item>
</rdf:RDF>
Atom Feeds

• 2 types of Atom Specs
 • Atom Syndication Format
 • Atom Publishing Protocol
Atom Syndication Format


• XML based
• Used for web feeds
• Similar to RSS
Atom Publishing Protocol


• HTTP-based
• Standard for API-like services
• Used by Google’s GData APIs
Atom as a feed

• Intended to replace RSS
• Meant to clarify feed specs
• Not as widely adopted
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Ninja Academy</title>
  <link href="http://ninjaacademy.com/"/>
  <updated>2003-12-13T18:30:02Z</updated>
  <author>
    <name></name>
  </author>
  <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
  <entry>
    <title>Throwing Stars</title>
    <link href="http://ninjaacademy.com/stars/"/>
    <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
    <updated>2003-12-13T18:30:02Z</updated>
    <summary>How to throw stars.</summary>
  </entry>
  <entry>
    <title>Tips for Sneakery</title>
    <link href="http://ninjaacademy.com/sneakery/"/>
    <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
    <updated>2003-12-13T18:30:02Z</updated>
    <summary>Be Sneaky My Friend</summary>
  </entry>
</feed>
Choosing a Format

• Personal Choice
• Most syndicators can read all formats
• Don’t invent your own
Creating a feed

• Drupal, Wordpress, Joomla, etc.
• Create your own
 • Lots of OSS libraries in every language
 • Pretty easy to implement
<?php

$ncsu = new Tweets_Ncsu();

$timeline = $ncsu->getTimeline();

$feed = array();

$feed['title']     =   ‘NC State Tweets’;
$feed['link']      =   ‘http://twitter.ncsu.edu/feed.php';
$feed['charset']   =   'UTF-8';
$feed['author']    =   ‘NC State University’;
$feed[‘entries’]   =   array();

foreach ($timeline as $t) {
    $feed[‘entries’][] = array(
        'title'        => 'Tweet by @' . $t['user-screen_name'],
        'link'         => 'http://www.twitter.com/' . $t['user-screen_name'],
        'description' => $t['text'],
        'lastUpdate'   => strtotime($t['created_at']),
    );
}

// importing a rss feed from an array
$rssFeed = Zend_Feed::importArray($fa, 'rss');

// send http headers and dump the feed
$rssFeed->send();
Validate your feed
• w3c’s Feed Validator
  http://validator.w3.org/feed/
• Validates RSS 2.0 and Atom formats
Identifying RSS feeds
Finding feeds in code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US">

<head>

<title>Jason Austin&#039;s Blog</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="wp-content/themes/lightword/original.css"
type="text/css" />
<link rel="shortcut icon" href="http://www.jasonawesome.com/favicon.ico" />


<link rel="alternate" type="application/rss+xml" title="RSS 2.0"
href="http://www.jasonawesome.com/feed/" />

<link rel="alternate" type="text/xml" title="RSS .92" href="http://
www.jasonawesome.com/feed/rss/" />

<link rel="alternate" type="application/atom+xml" title="Atom 1.0"
href="http://www.jasonawesome.com/feed/atom/" />


</head>
Consuming RSS

• Browsers
• RSS Readers like Google Reader
• Programmatically
RSS Like A Ninja
<?php

$feed = new Zend_Feed_Rss(‘http://twitter.ncsu.edu/feed.php’);

foreach ($feed as $f) {
    echo ‘<a href="’ . $f->link . ‘">’ . $f->title . ‘</a><br />’;
    echo ‘<p>’ . $f->description . ‘</p>’;
}
Tracking RSS...

• Feedburner
 • Subscriber stats
 • Frequency stats
 • AdWords integration
RSS Like A Ninja
The End

Slides on http://www.jasonawesome.com


     Jason Austin - @jason_austin

More Related Content

PPTX
Combining Django REST framework & Elasticsearch
PPTX
What You Missed in Computer Science
PDF
Django Rest Framework - tips & trick
PDF
Wordpress Workflow
PDF
Introduction to WordPress Theme Development
PPTX
Presentation to SAIT Students - Dec 2013
PPTX
REST Easy with Django-Rest-Framework
PPTX
Ch7(publishing my sql data on the web)
Combining Django REST framework & Elasticsearch
What You Missed in Computer Science
Django Rest Framework - tips & trick
Wordpress Workflow
Introduction to WordPress Theme Development
Presentation to SAIT Students - Dec 2013
REST Easy with Django-Rest-Framework
Ch7(publishing my sql data on the web)

What's hot (20)

ZIP
Web Scraping In Ruby Utosc 2009.Key
PPTX
WordPress Theme Development
PDF
Django REST Framework
PPTX
WordPress Customization and Security
PPTX
NEPA BlogCon 2013 - WordPress Customization & Security
KEY
Make your website 2 times faster
PDF
Chandra Prakash Thapa: Make a WordPress Multisite in 20 mins
PDF
Intro to WordPress theme development
PDF
Installing And Configuration for your Wordpress blog
PDF
Secure your site
KEY
Drupal Security Intro
PPTX
Get Django, Get Hired - An opinionated guide to getting the best job, for the...
PDF
Cms & wordpress theme development 2011
PPT
How to Contribute Code to MySQL?
PDF
Djangocon 2014 angular + django
PPTX
The JSON REST API for WordPress
PPT
Webcrawler
PPTX
Worcamp2012 make a wordpress multisite in 20mins
PDF
Small wins in a small time with Apache Solr
PDF
My sql indo_comm
Web Scraping In Ruby Utosc 2009.Key
WordPress Theme Development
Django REST Framework
WordPress Customization and Security
NEPA BlogCon 2013 - WordPress Customization & Security
Make your website 2 times faster
Chandra Prakash Thapa: Make a WordPress Multisite in 20 mins
Intro to WordPress theme development
Installing And Configuration for your Wordpress blog
Secure your site
Drupal Security Intro
Get Django, Get Hired - An opinionated guide to getting the best job, for the...
Cms & wordpress theme development 2011
How to Contribute Code to MySQL?
Djangocon 2014 angular + django
The JSON REST API for WordPress
Webcrawler
Worcamp2012 make a wordpress multisite in 20mins
Small wins in a small time with Apache Solr
My sql indo_comm
Ad

Similar to RSS Like A Ninja (20)

PPTX
Documentation 2.0: DIY Content Delivery and Feedback in Real-time
PPTX
What is atom rss feed
PDF
Getting Started with RSS
PPTX
PDF
ActivityStrea.ms: Is It Getting Streamy In Here?
PPTX
Atom and rss
PPTX
RSS Overview
PDF
Web Feeds and Repositories
PPT
RSS and Atom in the Social Web
PPTX
How to create rss feed for your website
PPTX
How to create rss feed
PPTX
A beginner’s basic to rss
PPT
RSS feeds
PPTX
How to RSS Feed in Search Engine Optimization and their Benefits.
PPT
rss-podcasts-feb2007
PDF
SXSW Hacking RSS: Filtering & Processing Obscene Amounts of Information
PDF
PDF
Rss feed complete guide
PDF
Rss feed complete guide
PPT
Integrating RSS Into Your Web Site
Documentation 2.0: DIY Content Delivery and Feedback in Real-time
What is atom rss feed
Getting Started with RSS
ActivityStrea.ms: Is It Getting Streamy In Here?
Atom and rss
RSS Overview
Web Feeds and Repositories
RSS and Atom in the Social Web
How to create rss feed for your website
How to create rss feed
A beginner’s basic to rss
RSS feeds
How to RSS Feed in Search Engine Optimization and their Benefits.
rss-podcasts-feb2007
SXSW Hacking RSS: Filtering & Processing Obscene Amounts of Information
Rss feed complete guide
Rss feed complete guide
Integrating RSS Into Your Web Site
Ad

More from Jason Austin (12)

PDF
Introduction to Elasticsearch
PDF
Service Oriented Architecture
PDF
Design patterns
PPT
How Beer Made Me A Better Developer
PDF
Securing Your API
ZIP
Preparing Traditional Media for a Mobile World
ZIP
Object Oriented PHP5
PDF
UNC CAUSE - Going Mobile On Campus
PDF
Lean mean php machine
PDF
Web Hosting Pilot - NC State University
PDF
Tweeting For NC State University
PDF
Pathways Project on NCSU Web Dev
Introduction to Elasticsearch
Service Oriented Architecture
Design patterns
How Beer Made Me A Better Developer
Securing Your API
Preparing Traditional Media for a Mobile World
Object Oriented PHP5
UNC CAUSE - Going Mobile On Campus
Lean mean php machine
Web Hosting Pilot - NC State University
Tweeting For NC State University
Pathways Project on NCSU Web Dev

Recently uploaded (20)

PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Big Data Technologies - Introduction.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Encapsulation theory and applications.pdf
PDF
Machine learning based COVID-19 study performance prediction
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
Cloud computing and distributed systems.
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Spectroscopy.pptx food analysis technology
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Electronic commerce courselecture one. Pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Big Data Technologies - Introduction.pptx
Empathic Computing: Creating Shared Understanding
Encapsulation theory and applications.pdf
Machine learning based COVID-19 study performance prediction
The AUB Centre for AI in Media Proposal.docx
Cloud computing and distributed systems.
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Review of recent advances in non-invasive hemoglobin estimation
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Network Security Unit 5.pdf for BCA BBA.
MYSQL Presentation for SQL database connectivity
Spectroscopy.pptx food analysis technology
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
“AI and Expert System Decision Support & Business Intelligence Systems”
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Programs and apps: productivity, graphics, security and other tools
Electronic commerce courselecture one. Pdf

RSS Like A Ninja

  • 1. How to RSS like a ninja Jason Austin - @jason_austin
  • 2. On the agenda... • What is RSS? • Why should I use it? • Creating RSS feeds • Consuming RSS • Tracking RSS performance
  • 3. What is RSS? • Way to share changing web content • XML based
  • 4. Why use RSS? • Keep users up-to-date with fresh content • Write once, use many • Replace older subscription models
  • 5. Use RSS for... • ...blog posts! • ...news articles • ...forum and article comments
  • 6. DO NOT use RSS for... • ...a calendar feed • ...a replacement for XML-based API’s • ...static content
  • 7. Types of RSS Feeds • RSS 2.0 • RSS 1.0 • Atom • ...lots more
  • 8. RSS 2.0 • RSS 2.0 = Really Simple Syndication • Most Popular • Simplest
  • 9. <?xml version="1.0"?> <rss version="2.0"> <channel> <title>Ninja Academy</title> <link>http://ninjaacademy.com/</link> <description>The source for Ninjas</description> <item> <title>Throwing Stars</title> <link>http://ninjaacademy.com/stars</link> <description>How to throw stars</description> </item> <item> <title>Tips for Sneakery</title> <link>http://ninjaacademy.com/sneakery</link> <description>Be Sneaky My Friend</description> </item> </channel>
  • 10. RSS 1.0 • RSS 1.0 = RDF Site Summary • RDF = Resource Description Framework • way of structuring metadata • Consumption instructions are built in
  • 11. <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" > <channel rdf:about="http://ninjaacademy.com/news.rss"> <title>Ninja Academy</title> <link>http://ninjaacademy.com/</link> <description>The Source For Ninjas</description> <items> <rdf:Seq> <rdf:li resource="http://ninjaacademy.com/stars/"/> <rdf:li resource="http://ninjaacademy.com/sneakery/"/> </rdf:Seq> </items> </channel> <item rdf:about="http://ninjaacademy.com/stars/"> <title>Throwing Stars</title> <link>http://ninjaacademy.com/stars/</link> <description>How to Throw Stars</description> <dc:date>2002-09-01</dc:date> </item> <item rdf:about="http://ninjaacademy.com/sneakery/"> <title>Tips for Sneakery</title> <link>http://ninjaacademy.com/sneakery/</link> <dc:date>2002-09-02</dc:date> </item> </rdf:RDF>
  • 12. Atom Feeds • 2 types of Atom Specs • Atom Syndication Format • Atom Publishing Protocol
  • 13. Atom Syndication Format • XML based • Used for web feeds • Similar to RSS
  • 14. Atom Publishing Protocol • HTTP-based • Standard for API-like services • Used by Google’s GData APIs
  • 15. Atom as a feed • Intended to replace RSS • Meant to clarify feed specs • Not as widely adopted
  • 16. <?xml version="1.0" encoding="utf-8"?> <feed xmlns="http://www.w3.org/2005/Atom"> <title>Ninja Academy</title> <link href="http://ninjaacademy.com/"/> <updated>2003-12-13T18:30:02Z</updated> <author> <name></name> </author> <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id> <entry> <title>Throwing Stars</title> <link href="http://ninjaacademy.com/stars/"/> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> <updated>2003-12-13T18:30:02Z</updated> <summary>How to throw stars.</summary> </entry> <entry> <title>Tips for Sneakery</title> <link href="http://ninjaacademy.com/sneakery/"/> <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id> <updated>2003-12-13T18:30:02Z</updated> <summary>Be Sneaky My Friend</summary> </entry> </feed>
  • 17. Choosing a Format • Personal Choice • Most syndicators can read all formats • Don’t invent your own
  • 18. Creating a feed • Drupal, Wordpress, Joomla, etc. • Create your own • Lots of OSS libraries in every language • Pretty easy to implement
  • 19. <?php $ncsu = new Tweets_Ncsu(); $timeline = $ncsu->getTimeline(); $feed = array(); $feed['title'] = ‘NC State Tweets’; $feed['link'] = ‘http://twitter.ncsu.edu/feed.php'; $feed['charset'] = 'UTF-8'; $feed['author'] = ‘NC State University’; $feed[‘entries’] = array(); foreach ($timeline as $t) { $feed[‘entries’][] = array( 'title' => 'Tweet by @' . $t['user-screen_name'], 'link' => 'http://www.twitter.com/' . $t['user-screen_name'], 'description' => $t['text'], 'lastUpdate' => strtotime($t['created_at']), ); } // importing a rss feed from an array $rssFeed = Zend_Feed::importArray($fa, 'rss'); // send http headers and dump the feed $rssFeed->send();
  • 20. Validate your feed • w3c’s Feed Validator http://validator.w3.org/feed/ • Validates RSS 2.0 and Atom formats
  • 22. Finding feeds in code <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"> <head> <title>Jason Austin&#039;s Blog</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet" href="wp-content/themes/lightword/original.css" type="text/css" /> <link rel="shortcut icon" href="http://www.jasonawesome.com/favicon.ico" /> <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://www.jasonawesome.com/feed/" /> <link rel="alternate" type="text/xml" title="RSS .92" href="http:// www.jasonawesome.com/feed/rss/" /> <link rel="alternate" type="application/atom+xml" title="Atom 1.0" href="http://www.jasonawesome.com/feed/atom/" /> </head>
  • 23. Consuming RSS • Browsers • RSS Readers like Google Reader • Programmatically
  • 25. <?php $feed = new Zend_Feed_Rss(‘http://twitter.ncsu.edu/feed.php’); foreach ($feed as $f) { echo ‘<a href="’ . $f->link . ‘">’ . $f->title . ‘</a><br />’; echo ‘<p>’ . $f->description . ‘</p>’; }
  • 26. Tracking RSS... • Feedburner • Subscriber stats • Frequency stats • AdWords integration
  • 28. The End Slides on http://www.jasonawesome.com Jason Austin - @jason_austin