Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Cs 891 2rev B


Published on

Presents the Atom 1.0 and hAtom 0.1 specifications for the ODU CS891 Web Syndication Formats course.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Cs 891 2rev B

  1. 1. Atom: The Atom Syndication Format RFC 4287 - M. Nottingham and R. Sayre (editors) and hAtom 0.1 David Janes, Benjamin Carlyle, and Tantek Celik Presented by: Chuck Cartledge and Carlton Northern
  2. 2. Trying to set the tone. <ul><li>“ In the Developer’s Bars of the world – those dark, sordid places filled with grizzled coders and their clans – a special corner is always reserved for the developers of content-syndication standards. There, weeping in their beer, you’ll find veterans of a long and difficult process. Most likely, they will have the Thousand Yard Stare of those who have seen more than they should. The standards you read about in the this book were not born fresh and innocent, of a streamlined process overseen by the Wise and Good. Rather the following chapters have been dragged into the world and tempered through brawls, knife fights, and the occasional riot.” </li></ul>Ben Hammersley, “Developing Feeds with RSS and Atom,” O’Reilly Media, Inc., 2005, ISBN 0-596-0081-3
  3. 3. What we will cover and how <ul><li>What are RFCs and why should we care </li></ul><ul><li>Where Atom fits in the Grand Scheme of things </li></ul><ul><li>How Atom compares with RSS </li></ul><ul><li>How Atom compares with RSS 2.0 </li></ul><ul><li>Atom, the RFC </li></ul><ul><li>Atom, the Simplest Feed </li></ul><ul><li>Demonstration of Atom Feeds </li></ul><ul><li>Atom compared to hAtom? </li></ul><ul><li>Our conclusions </li></ul><ul><li>Questions for you </li></ul>
  4. 4. What is an RFC and why should we care? <ul><li>Request for Comments (RFCs) are the glue that allows the I’net to work </li></ul><ul><li>Draft RFCs (Internet Drafts) are submitted to the Internet Engineering Task Force (IETF) for review and comments </li></ul><ul><li>IDs are assigned a sequential number and released for comment </li></ul><ul><li>RFCs are the standards that anyone wanting to “play” on the I’net have to adhere to </li></ul><ul><li>RFCs that we have addressed in class – 4287, 5005, 4685, 4946, 5023, </li></ul><ul><li>RFCs that it would be nice to address in class – 1149 and 2549 </li></ul><ul><li>The I’net works because people do things IAW the RFCs. It is the “law.” </li></ul>
  5. 5. How does Atom fit into the Grand Scheme of Things? <ul><li>“… in 2003, it became painfully clear that the RSS world was not going to declare a truce and agree to sort things out … a large group of developers split off to design a new format from the ground up. After much tooing, foring, cogitating, and argument, not the least over the name of the thing, a format has arisen: the Atom Syndication Format.” </li></ul>Ben Hammersley, “Developing Feeds with RSS and Atom,” O’Reilly Media, Inc., 2005, ISBN 0-596-0081-3
  6. 6. How does Atom compare with RSS? <ul><li>“ So, there are now two basic formats for syndicating a web site. RSS is older with many different versions, Atom is newer, more standard, and only beginning to be adopted. Atom was constructed to work across a wide variety of platforms and devices.” </li></ul> <ul><li>Atom is documented in RFCs </li></ul><ul><ul><li>4287 The Atom Syndication Format, Dec. 2005 </li></ul></ul><ul><ul><li>4685 Atom Threading Extensions, Sept 2006 </li></ul></ul><ul><ul><li>5023 The Atom Publishing Protocol , Oct. 2007 </li></ul></ul><ul><li>RSS has various flavors and mutually incompatible implementations </li></ul>
  7. 7. How does Atom compare to RSS 2.0? <ul><li>RSS </li></ul><ul><ul><li>Content model – plain text or escaped HTML, no way to distinguish </li></ul></ul><ul><ul><li>Date formats – based on RFC 822 </li></ul></ul><ul><ul><li>Internationalization – can identify feed, but not items </li></ul></ul><ul><ul><li>Modularity/reuse – not part of the design </li></ul></ul><ul><li>Atom </li></ul><ul><ul><li>Content model – explicitly and unambiguously labels the type of content being provided by the entry </li></ul></ul><ul><ul><li>Date formats – based on RFC 3339 (a subset of ISO 8601) </li></ul></ul><ul><ul><li>Internationalization – uses xml:lang to make it possible to specify a language for every piece of human readable content </li></ul></ul><ul><ul><li>Modularity/reuse – specifically designed to allow elements to be reused </li></ul></ul><ul><li>Atom gives a good deal of info about the resource and the content, but leaves the meaning of the content to RSS </li></ul><ul><li> </li></ul>
  8. 8. Atom: The RFC <ul><li>Two kinds of Atom Documents </li></ul><ul><ul><li>Feeds – represents an Atom Feed </li></ul></ul><ul><ul><ul><li>Metadata about the feed </li></ul></ul></ul><ul><ul><ul><li>Some or all entries associated with the feed </li></ul></ul></ul><ul><ul><li>Entries </li></ul></ul><ul><ul><ul><li>Exactly one entry </li></ul></ul></ul><ul><ul><ul><li>Outside of an Atom feed </li></ul></ul></ul><ul><li>Atom documents MUST be well-formed XML </li></ul><ul><li>Atom is extensible </li></ul>
  9. 9. Atom: The RFC – Verbose or Concise <ul><li>RFC Specification in two different formats </li></ul><ul><ul><li>Verbose (words, words, lots of words) </li></ul></ul><ul><ul><li>Concise Relax NG schema </li></ul></ul><ul><li>Verbose: </li></ul><ul><ul><li>3.1.1. The &quot;type&quot; Attribute Text constructs MAY have a &quot;type&quot; attribute. When present, the value MUST be one of &quot;text&quot;, &quot;html&quot;, or &quot;xhtml&quot;. If the &quot;type&quot; attribute is not provided, Atom Processors MUST behave as though it were present with a value of &quot;text&quot;. Unlike the atom:content element defined in Section 4.1.3, MIME media types [MIMEREG] MUST NOT be used as values for the &quot;type&quot; attribute on Text constructs. </li></ul></ul><ul><li>Concise </li></ul><ul><ul><li>atomPlainTextConstruct = atomCommonAttributes, </li></ul></ul><ul><ul><ul><li>attribute type { &quot;text&quot; | &quot;html&quot; }?, </li></ul></ul></ul><ul><ul><ul><li>text atomXHTMLTextConstruct = atomCommonAttributes, </li></ul></ul></ul><ul><ul><ul><li>attribute type { &quot;xhtml&quot; }, </li></ul></ul></ul><ul><ul><ul><li>xhtmlDiv </li></ul></ul></ul><ul><li>Verbose has implementation guidance as well as semantic information </li></ul>
  10. 10. Atom: The RFC – Relaxed NG Symbols <ul><li>A schema language for XML </li></ul><ul><li>On track to become ISO Standard 19757-2 </li></ul><ul><li>A language agnostic schema that can be processed language specific parsers </li></ul><ul><li>For our purposes limited XML-tag following operators are of interest: </li></ul><ul><ul><li>* => 1 or more occurrences </li></ul></ul><ul><ul><li>? => less than or equal to 1 occurrence </li></ul></ul><ul><ul><li>null => exactly one occurrence </li></ul></ul><ul><li> </li></ul><ul><li> </li></ul>
  11. 11. Atom: The RFC – Example of Relaxed NG Common Attributes <ul><li>atomCommonAttributes = </li></ul><ul><li>attribute xml:base { atomUri }?, </li></ul><ul><li>attribute xml:lang { atomLanguageTag }?, undefinedAttribute* </li></ul>
  12. 12. Atom: The RFC Partial Relaxed NG atom:feed <ul><li>start = atomFeed | atomEntry </li></ul><ul><li>atomPersonConsruct = </li></ul><ul><ul><li>(element atom:name {text} </li></ul></ul><ul><ul><li>& element atom:uri { atomUri }? </li></ul></ul><ul><ul><li>… </li></ul></ul><ul><li>atomFeed = [ … various rules …] </li></ul><ul><ul><li>Element atomFeed { … </li></ul></ul><ul><ul><li>atomAuthor* </li></ul></ul><ul><ul><li>… } </li></ul></ul><ul><li>atomAuthor = element atom:author { atomPersonConstruct } </li></ul>
  13. 13. Atom: The Simplest Feed <ul><li><?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?> </li></ul><ul><li><feed version=&quot;draft-ietf-atompub-format-03: do not deploy&quot; </li></ul><ul><li>xmlns=&quot;;> </li></ul><ul><li><head> </li></ul><ul><li><title>The Simplest Feed</title> </li></ul><ul><li><link rel=&quot;alternate&quot; type=&quot;text/html&quot; </li></ul><ul><li>href=&quot;;/> </li></ul><ul><li><author><name>Ben Hammersley</name></author> </li></ul><ul><li><updated>2004-10-25T15:07:02Z</updated> </li></ul><ul><li></head> </li></ul><ul><li><entry> </li></ul><ul><li><title>The Simplest Entry Document</title> </li></ul><ul><li><link rel=&quot;alternate&quot; type=&quot;text/html&quot; href=&quot;;/> </li></ul><ul><li><author><name>Ben Hammersley</name></author> </li></ul><ul><li><id></id> </li></ul><ul><li><updated>2004-10-25T15:07:02Z</updated> </li></ul><ul><li><content type=&quot;TEXT&quot;>Simple Simple Simple</content> </li></ul><ul><li></entry> </li></ul><ul><li></feed> </li></ul>Ben Hammersley, “Developing Feeds with RSS and Atom,” O’Reilly Media, Inc., 2005, ISBN 0-596-0081-3
  14. 14. An example of an Atom client application <ul><li>Perl code from O’Reily’s book </li></ul>
  15. 15. An example of an Atom consolidator <ul><li>Expand Perl code to pull data periodically and put into a standard file </li></ul>
  16. 16. An example of a web client <ul><li>Basic HTML that does a periodically does a refresh of the file from the previous slide. </li></ul>
  17. 17. Google Reader Demo <ul><li> </li></ul>
  18. 18. What is hAtom? <ul><li>A microformat conceptually based on the Atom Syndication Format. </li></ul><ul><li>Identifies semantic information in weblog posts, news feeds or similarly formatted content. </li></ul><ul><li>hAtom is not intended to replace RSS or Atom. </li></ul>
  19. 19. Why hAtom? <ul><li>Provides a simple way to markup blog posts in the actual (X)HTML, eliminating the need of creating a separate file for RSS or Atom. </li></ul><ul><li>Use cases: </li></ul><ul><ul><li>Make your web page your feed. </li></ul></ul><ul><ul><li>Provide a more semantic meaning to a blog without adding the overhead of implementing everything needed for an Atom or RSS feed. </li></ul></ul><ul><ul><li>For articles that were created before structuring syndication formats such as RSS and Atom, convert them to hAtom to give them structure and semantic meaning. </li></ul></ul>
  20. 20. What is a Microformat? <ul><li>A simple, open data format used to structure and represent very specific types of content on the web. </li></ul><ul><li>Microformats: real world semantics, AKA lowercase semantic web. ¹ </li></ul><ul><li>Example: hCard is a microformat for representing people, companies, organizations, and places, using vCard. </li></ul><ul><li>Demo: http:// </li></ul>¹
  21. 21. List of Microformats <ul><li>hCalendar – for marking up calendar events. </li></ul><ul><li>hCard – for marking up people, companies, organizations, and places. </li></ul><ul><li>hAtom – for marking up primarily blog posts. </li></ul><ul><li>hResume – for marking up resumes. </li></ul><ul><li>hReview – for marking up reviews. </li></ul><ul><li>xFolk – for marking up bookmarks. </li></ul><ul><li>VoteLinks – for marking up polls/votes. </li></ul><ul><li>XFN – for marking up relationships between people. </li></ul><ul><li>XMDP – for marking up metadata profiles. </li></ul><ul><li>adr – for marking up addresses. </li></ul><ul><li>geo – for marking up geographical coordinates. </li></ul><ul><li>There are more that are not listed here, and many more to come! </li></ul>
  22. 22. Microformats Demo <ul><li>Using Firefox and the extension “Operator” we can see some pretty interesting stuff. </li></ul><ul><li> </li></ul>
  23. 23. How to Use hAtom? <ul><li>Use the hAtom2Atom XSLT to convert hAtom to Atom. </li></ul><ul><li>Demo: using this input </li></ul>
  24. 24. Semantic XHTML Design Principles <ul><li>hAtom and other microformats conform to semantic XHTML design principles. </li></ul><ul><li>Semantic XHTML, as opposed to presentational XHTML, deals with the identification of relationships and information. </li></ul><ul><li>Rules: </li></ul><ul><ul><ul><li>Reuse, Reuse, Reuse!!! </li></ul></ul></ul><ul><ul><ul><li>Be precise. </li></ul></ul></ul><ul><ul><ul><li>Use similar or same naming conventions as the original schema. </li></ul></ul></ul>
  25. 25. hAtom Schema Elements <ul><li>hfeed - optional. </li></ul><ul><li>feed category – optional, keywords or phrases, using rel -tag . </li></ul><ul><li>hentry - required </li></ul><ul><ul><li>entry-title – required, text. </li></ul></ul><ul><ul><li>entry-content – optional, text. </li></ul></ul><ul><ul><li>entry-summary - optional, text. </li></ul></ul><ul><ul><li>updated - required using datetime -design-pattern . </li></ul></ul><ul><ul><li>published - optional using datetime -design-pattern . </li></ul></ul><ul><ul><li>author - required using hCard . </li></ul></ul><ul><ul><li>bookmark (permalink) - optional, using rel -bookmark . </li></ul></ul><ul><ul><li>tags - optional, keywords or phrases, using rel -tag . </li></ul></ul>
  26. 26. hAtom Example <ul><li>Canned example: </li></ul><ul><li>Example in the wild: </li></ul>
  27. 27. What is the relationship between Atom and hAtom? <ul><li>hAtom is derived from Atom. </li></ul><ul><li>Atom can be used to syndicate any kind of content that is frequently updated. </li></ul><ul><li>hAtom can technically be used to markup any content that can be syndicated by Atom, but is generally used for blog posts. </li></ul><ul><li>Atom can be constructed from hAtom. This is how documents that use hAtom are usually syndicated. </li></ul><ul><li>hAtom uses very similar, or exactly the same attributes as Atom. </li></ul>
  28. 28. hAtom and Atom Schema Comparison
  29. 29. Conclusion <ul><li>Recap Atom versus RSS </li></ul><ul><ul><li>Multiple non-standard formats </li></ul></ul><ul><ul><li>Syntax and recommended processing in the public domain </li></ul></ul><ul><ul><li>Designed based on lessons learned from RSS </li></ul></ul><ul><li>Atom </li></ul><ul><ul><li>Pure XML </li></ul></ul><ul><ul><li>Moderate, but limited defined tag set </li></ul></ul><ul><ul><li>Describes feeds and entries </li></ul></ul><ul><ul><li>Extensibility built in </li></ul></ul><ul><li>Differences between Atom and hAtom </li></ul>
  30. 30. Our Questions for You <ul><li>What is the purpose of an RFC? And, how do we know that an RFC has done its job? </li></ul><ul><li>When is hAtom a better choice than Atom? </li></ul><ul><li>What kinds of problems are unique to providing feeds to handheld devices? </li></ul>
  31. 31. Sources <ul><li> </li></ul><ul><li> </li></ul>