Web 2 0 1122020 1 Social Web Web
Web 2. 0 11/2/2020 1
Social Web – Web 2. 0 l l 11/2/2020 The term Web 2. 0 was made popular by Tim O’Reilly: l http: //www. oreillynet. com/pub/a/oreilly/tim/news/2005/09/3 0/what-is-web-20. html http: //en. wikipedia. org/wiki/Web_2. 0 l “Web 2. 0 … has … come to refer to what some people describe as a second phase of architecture and application development for the World Wide Web. ” The Web where “ordinary” users can meet, collaborate, and share using social software applications on the Web (tagged content, social bookmarking, AJAX, etc. ) Popular examples include: l Bebo, del. icio. us, digg, Flickr, Google Maps, Skype, Technorati, orkut, 43 Things, Wikipedia… 2
Web 2. 0 and social software l l l 11/2/2020 Web 2. 0 focuses: l The Web as a platform for social and collaborative exchange l Reusable community contributions l Subscriptions to information, news, data flows, services l Mass-publishing using web-based social software http: //en. wikipedia. org/wiki/Social_Software l “Social Software lets people rendezvous, connect or collaborate by use of a computer network. It results in the creation of shared, interactive spaces…” Social software for communication and collaboration: l IM, IRC, Forums, Blogs, Wikis, Social Network Services, Social Bookmarks, Podcasts, MMOGs… 3
Web 2. 0 elements
RSS l l l 11/2/2020 RSS is a method using XML to distribute web content on one website to many other websites. RSS is a format for syndicating news and the content of news-like sites (such as news, news-oriented community and personal weblogs). It supports fast browsing for news and updates RSS is not just for news, but for anything which can be broken down into discrete items: l Recent change of a wiki, changelog of CVS checkins, changes of a book RSS-aware programs (RSS feeds, aggregators) can check RSS and display new items from them. RSS data is small and fast-loading, it can be used for cell phone or PDA. 5
RSS l RSS stands for: l l l Really Simple Syndication (RSS 2. 0) Rich Site Summary (RSS 0. 91, RSS 1. 0) RDF Site Summary (RSS 0. 9 and 1. 0) RSS is written in XML RSS file is called RSS feed, webfeed, RSS stream, or RSS channel 11/2/2020 6
RSS History l l l Original RSS (0. 90) was designed by Netscape as a format for building portals of headlines to mainstream news sites. RSS (0. 91) is simplized version of RSS (0. 90), but was dropped when Netscape lost interest in portal market. RSS (0. 91) was picked up by User. Land. Software, with furthre release (0. 92, 0. 93, . . . Finally 2. 0). RSS (1. 0) is based on RDF by non-commercial group RSS (2. 0) is released in 2003 by Dave Winer. What a mess! 11/2/2020 7
RSS versions and recommendations Version Owner Pros Status Recommendation 0. 90 Netscape Obsoleted by 1. 0 Don't use 0. 91 User. Land Drop dead simple Officially obsoleted by 2. 0, but still quite popular Use for basic syndication. Easy migration path to 2. 0 if you need more flexibility 0. 92, 0. 93, 0. 94 User. Land Allows richer metadata than 0. 91 Obsoleted by 2. 0 Use 2. 0 instead 1. 0 RSS-DEV Working Group RDF-based, extensibility via modules, not controlled by a single vendor Stable core, active module development Use for RDF-based applications or if you need advanced RDF-specific modules 2. 0 User. Land Extensibility via modules, easy migration path from 0. 9 x branch Stable core, active module development Use for general-purpose, metadata-rich syndication 11/2/2020 8
How does RSS look like? <rss version="0. 91"> <channel> <title>XML. com</title> <link>http: //www. xml. com/</link> <description>XML. com features a rich mix of. . . </description> <language>en-us</language> <item> <title>The. NET Schema Object Model</title> <link>http: //www. xml. com/pub/a/2002/12/04/som. html</link> <description>Priya Lakshminarayanan describes. . . </description> </item> <title>SVG's Past and Promising Future</title> <link>http: //www. xml. com/pub/a/2002/12/04/svg. html</link> <description>In this month's SVG column. . . </description> </item> </channel> </rss> RSS 0. 91 – RSS 2. 0 11/2/2020 9
<rdf: RDF xmlns: rdf="http: //www. w 3. 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: //www. xml. com/cs/xml/query/q/19"> <title>XML. com</title> <link>http: //www. xml. com/</link> <description>XML. com features. . . </description> <language>en-us</language> <items> <rdf: Seq> <rdf: li rdf: resource="http: //www. xml. com/pub/a/2002/12/04/som. html"/>. . </rdf: Seq> </items> </channel> <item rdf: about="http: //www. xml. com/pub/a/2002/12/04/som. html"> <title>The. NET Schema Object Model</title> <link>http: //www. xml. com/pub/a/2002/12/04/som. html</link> <description>Priya Lakshminarayanan. . . </description> <dc: creator>Priya Lakshminarayanan</dc: creator> <dc: date>2002 -12 -04</dc: date> </item> </rdf: RDF> 11/2/2020 RSS 1. 0 10
RSS 2. 0 l l Here we will use RSS 2. 0 in the lecture The syntax rules of RSS 2. 0 are very simple and very strict. 11/2/2020 11
How RSS Works l l l First, create an RSS document and save it with an. xml extension Second, upload the file to your website Third, register your RSS document with an RSS aggregator Done. RSS aggregator searches the registered websites for RSS documents, verifies the link, and displays information about RSS documents so that clients (users) can link to the documents that interests them. 11/2/2020 12
RSS 2. 0 Example <? xml version="1. 0" encoding="ISO-8859 -1" ? > <rss version="2. 0"> <channel> <title>W 3 Schools Home Page</title> <link>http: //www. w 3 schools. com</link> <description>Free web building tutorials</description> <item> <title>RSS Tutorial</title> <link>http: //www. w 3 schools. com/rss</link> <description>New RSS tutorial on W 3 Schools</description> </item> <title>XML Tutorial</title> <link>http: //www. w 3 schools. com/xml</link> <description>New XML tutorial on W 3 Schools</description> </item> </channel> </rss> 11/2/2020 13
RSS 2. 0 Syntax l Prolog l l l <? xml version="1. 0" encoding="ISO-8859 -1" ? > <rss version="2. 0"> Channel Item Comments Note: RSS is written in XML, please keep in mind of XML syntax requirements: l Closing tag l Case sensitive l Properly nested l Attribute value must be quoted 11/2/2020 14
RSS channel element l The <channel> element has three required child elements: l l 11/2/2020 <title> - Defines the title of the channel (e. g. W 3 Schools Home Page) <link> - Defines the hyperlink to the channel (e. g. http: //www. w 3 schools. com) <description> - Describes the channel (e. g. Free web building tutorials) And many other child elements 15
RSS category child element l l l The <category> child element is used to specify a category for your feed. The <category> element makes it possible for RSS aggregators to group sites based on category. <category>Web development</category> 11/2/2020 16
RSS copyright child element l l The <copyright> child element notifies about copyrighted material. <copyright>2006 Refsnes Data as. All rights reserved. </copyright> 11/2/2020 17
RSS image child element l l The <image> child element allows an image to be displayed when aggregators present a feed. The <image> element has three required child elements: l <url> - Defines the URL to the image l <title> - Defines the text to display if the image could not be shown l <link> - Defines the hyperlink to the website that offers the channel <image> <url>http: //www. w 3 schools. com/images/logo. gif</url> <title>W 3 Schools. com</title> <link>http: //www. w 3 schools. com</link> </image> 11/2/2020 18
RSS language child element l l l The <language> child element is used to specify the language used to write your document. The <language> element makes it possible for RSS aggregators to group sites based on language. <language>en-us</language> 11/2/2020 19
RSS Channel child elements Element Description <category> Optional. Defines one or more categories for the feed <cloud> Optional. Register processes to be notified immediately of updates of the feed <copyright> Optional. Notifies about copyrighted material <description> Required. Describes the channel <docs> Optional. Specifies an URL to the documentation of the format used in the feed <generator> Optional. Specifies the program used to generate the feed <image> Optional. Allows an image to be displayed when aggregators present a feed <language> Optional. Specifies the language the feed is written in <last. Build. Date> Optional. Defines the last-modified date of the content of the feed 11/2/2020 20
RSS Channel child elements (cont. ) Element Description <link> Required. Defines the hyperlink to the channel <managing. Editor > Optional. Defines the e-mail address to the editor of the content of the feed <pub. Date> Optional. Defines the last publication date for the content of the feed <rating> Optional. The PICS rating of the feed <skip. Days> Optional. Specifies the days where aggregators should skip updating the feed <skip. Hours> Optional. Specifies the hours where aggregators should skip updating the feed <text. Input> Optional. Specifies a text input field that should be displayed with the feed <title> Required. Defines the title of the channel <ttl> Optional. Specifies the number of minutes the feed can stay cached before refreshing it from the source <web. Master> Optional. Defines the e-mail address to the webmaster of the feed 11/2/2020 21
RSS item element l l Each <channel> element can have one ore more <item> elements. Each <item> element defines an article or "story" in the RSS feed. The <item> element has three required child elements: l <title> - Defines the title of the item (e. g. RSS Tutorial) l <link> - Defines the hyperlink to the item (e. g. http: //www. w 3 schools. com/rss) l <description> - Describes the item (e. g. New RSS tutorial on W 3 Schools) Finally, the two last lines close the <channel> and <rss> elements. 11/2/2020 22
RSS item child elements-optional l Author element l l l Comments element l l l To specify the email address of the author of an item <author>ying. ding@deri. org</author> Allow an item to link to comments about this item <comments>http: //www. w 3 schools. com/comments</comments> Enclosure element l l To include a media file to an item URL-the URL of the media file, length-the length (in bytes) of the media file, type-type of the media file <enclosure url="http: //www. w 3 schools. com/rss. mp 3 length="5000" type="audio/mpeg" /> 11/2/2020 23
RSS item child elements Element Description <author> Optional. Specifies the e-mail address to the author of the item <category> Optional. Defines one or more categories the item belongs to <comments> Optional. Allows an item to link to comments about that item <description> Required. Describes the item <enclosure> Optional. Allows a media file to be included with the item <guid> Optional. Defines a unique identifier for the item <link> Required. Defines the hyperlink to the item <pub. Date> Optional. Defines the last-publication date for the item <source> Optional. Specifies a third-party source for the item <title> Required. Defines the title of the item 11/2/2020 24
RSS Comments l <!-- This is an RSS comment --> 11/2/2020 25
Publishing RSS feed l l l 11/2/2020 1. Name your RSS file. Notice that the file must have an. xml extension. 2. Validate your RSS file (a good validator can be found at http: //www. feedvalidator. org). 3. Upload the RSS file to your web directory on your web server. 4. Copy the little orange "RSS" or "XML" button to your web directory. 5. Put the little orange "RSS" or "XML" button on the page where you will offer RSS to the world (e. g. on your home page). Then add a link to the button that links to the RSS file. The code will look something like this: <a href="www. w 3 schools. com/rss/myfirstrss. xml"> < img src="www. w 3 schools. com/rss. gif" width="36" height="14"></a>. 26
Publishing RSS feed (cont. ) l 6. Submit your RSS feed to the RSS Feed Directories (you can Google or Yahoo for "RSS Feed Directories"). Note! The URL to your feed is not your home page, it is the URL to your feed, like "http: //www. w 3 schools. com/rss/myfirstrss. xml". Here are some free RSS aggregation services: l l l 7. Register your feed with the major search engines: l l 11/2/2020 Syndic 8 (www. syndic 8. com): Over 300, 000 feeds listed. Newsisfree (www. newsisfree. com): Over 18, 000 feeds. . Yahoo – http: //publisher. yahoo. com/rss_guide/submit. php Google – http: //www. google. com/ig (this is the Google personalized homepage, but Google will index any RSS feed added here) MSN - http: //w. moreover. com/site/products/ind/pingserver. html (MSN search uses the Moreover news database) 8. Update your feed - Now you have gotten RSS feed buttons from Google, Yahoo, and MSN. Now you must make sure that you update your content frequently and that your RSS feed is constantly available. 27
RSS Reader l RSS-aware program is called feed reader or aggregator which can check a list of feeds on behalf of a user and display any updated articles that they find: l l News. Gator Online (http: //www. newsgator. com/Individuals/News. Gator. Online/Default. aspx) - A free online RSS reader. Includes synchronization with Outlook, viewing TV content with Media Center Edition, and publication of blogs and headlines. Rss. Reader (http: //www. rssreader. com/) A free Windows-based RSS reader. Supports RSS versions 0. 9 x, 1. 0 and 2. 0 and Atom 0. 1, 0. 2 and 0. 3. Feed. Demon (http: //www. newsgator. com/Individuals/Feed. Demon/Default. aspx) A Windows-based RSS reader. Very easy to use and has a very orderly interface. However, this is not freeware! Blogbot (http: //www. blogbot. com/) An RSS reader plug-in for Outlook or Internet Explorer. The light-version for Internet Explorer is free. 11/2/2020 28
Build your RSS Reader l Let’s take News. Gator Online l l l 11/2/2020 Register yourself Select some feeds Build your own RSS reader 29
Who provides RSS feeds? l Very successful and widely used! l l Newswire (BBC, CNN, Yahoo!, USATODAY…) There are online communities for that: l Bloglines (http: //www. bloglines. com/) l l l 11/2/2020 Syndic 8 (http: //www. syndic 8. com/) Newsisfree (www. newsisfree. com) Newsgator (http: //www. newsgator. com/) 30
ATOM 11/2/2020 31
ATOM l l Another feed format l Not satisfied with RSS Main differences: l RSS 2. 0 does not provide labeled container and ATOM provides that so that content can be typed. l RSS 2. 0 has a ‚description‘ element for full entry or just a description. ATOM has separate ‚summary‘ and ‚content‘ elements. l ATOM has standardized autodiscovery while RSS 2. 0 has many non-standard variants. l ATOM is defined within an XML namespaces where RSS 2. 0 is not l ATOM uses xml: base for relative URIs, while RSS 2. 0 cannot differentiate between relative or non-relative URIs. 11/2/2020 32
ATOM l Main differences (cont. ): l l l 11/2/2020 ATOM uses xml: lang while RSS 2. 0 uses its own language element ATOM entry must have a globally unique ID ATOM date follows RFC 3339, while RSS 2. 0 is unspecified and has many different formats ATOM is open standards, while RSS not, copyright issue problem ATOM provides XML digital signature, while RSS not Google supports ATOM 33
How does ATOM look like? <? xml version="1. 0" encoding="utf-8"? > <feed xmlns="http: //www. w 3. org/2005/Atom"> <title>Example Feed</title> <subtitle>A subtitle. </subtitle> <link href="http: //example. org/"/> <updated>2003 -12 -13 T 18: 30: 02 Z</updated> <author> <name>John Doe</name> <email>johndoe@example. com</email> </author> <id>urn: uuid: 60 a 76 c 80 -d 399 -11 d 9 -b 91 C-0003939 e 0 af 6</id> <entry> <title>Atom-Powered Robots Run Amok</title> <link href="http: //example. org/2003/12/13/atom 03"/> <id>urn: uuid: 1225 c 695 -cfb 8 -4 ebb-aaaa-80 da 344 efa 6 a</id> <updated>2003 -12 -13 T 18: 30: 02 Z</updated> <summary>Some text. </summary> </entry> </feed> 11/2/2020 34
ATOM Documents l Namespace namespace atom = "http: //www. w 3. org/2005/Atom" start = atom. Feed | atom. Entry l Common attributes atom. Common. Attributes = attribute xml: base { atom. Uri }? , attribute xml: lang { atom. Language. Tag }? , undefined. Attribute* l Text constructs atom. Plain. Text. Construct = atom. Common. Attributes, attribute type { "text" | "html" }? , text atom. XHTMLText. Construct = atom. Common. Attributes, attribute type { "xhtml" }, xhtml. Div 11/2/2020 atom. Text. Construct = atom. Plain. Text. Construct | atom. XHTMLText. Construct 35
ATOM main constructs l l l Text Person date 11/2/2020 36
ATOM Text constructs l Text constructs example l Text (on child element is allowed) <title type="text"> Less: < </title> l HTML (on child element is allowed) <title type="html"> Less: < em> & lt; < /em> </title> l XHTML (only <div> subelement can be included) <title type="xhtml" xmlns: xhtml="http: //www. w 3. org/1999/xhtml"> <xhtml: div> Less: <xhtml: em> < </xhtml: em> </xhtml: div> </title> 11/2/2020 37
ATOM Person constructs l No order of appearance of the child elements atom. Person. Construct = atom. Common. Attributes, (element atom: name { text } & element atom: uri { atom. Uri }? & element atom: email { atom. Email. Address }? & extension. Element*) 11/2/2020 38
ATOM Person constructs l atom: name l l atom: uri l l Person constructs must contain exactly one name element. Person constructs may contain this element but must not contain more than one. atom: email l 11/2/2020 Person constructs may contain this element but must not contain more than one. 39
ATOM Date constructs l l T – to seperate date and time Z – to show the time zone <updated>2003 -12 -13 T 18: 30: 02 Z</updated> <updated>2003 -12 -13 T 18: 30: 02. 25 Z</updated> <updated>2003 -12 -13 T 18: 30: 02+01: 00</updated> <updated>2003 -12 -13 T 18: 30: 02. 25+01: 00</updated> 11/2/2020 40
ATOM Element Definition l Container elements l l Feed Entry Content Metadata elements l 11/2/2020 Author, category, contributor, generator, icon, id, link, logo, published, rights, source, subtitle, summary, title, updated 41
atom: feed element l Top-level element atom. Feed = element atom: feed { atom. Common. Attributes, (atom. Author* & atom. Category* & atom. Contributor* & atom. Generator? & atom. Icon? & atom. Id & atom. Link* & atom. Logo? & atom. Rights? & atom. Subtitle? & atom. Title & atom. Updated & extension. Element*), atom. Entry* } 11/2/2020 42
atom: entry element l l Child element of feed element Or top-level element of a stand-alone Atom Entry document atom. Entry = element atom: entry { atom. Common. Attributes, (atom. Author* & atom. Category* & atom. Content? & atom. Contributor* & atom. Id & atom. Link* & atom. Published? & atom. Rights? & atom. Source? & atom. Summary? & atom. Title & atom. Updated & extension. Element*) } 11/2/2020 43
atom: content element l l 11/2/2020 The "atom: content" element either contains or links to the content of the entry. The content of atom: content is Language-Sensitive. 44
atom: content element atom. Inline. Text. Content = element atom: content { atom. Common. Attributes, attribute type { "text" | "html" }? , (text)*} atom. Out. Of. Line. Content = atom. Inline. XHTMLContent = element atom: content { atom. Common. Attributes, attribute type { atom. Media. Type }? , attribute type { "xhtml" }, attribute src { atom. Uri }, empty} xhtml. Div} atom. Content = atom. Inline. Text. Content | atom. Inline. XHTMLContent | atom. Inline. Other. Content | atom. Out. Of. Line. Content atom. Inline. Other. Content = element atom: content { atom. Common. Attributes, attribute type { atom. Media. Type }? , (text|any. Element)*} 11/2/2020 45
atom: content element example XHTML inline: . . . <content type="xhtml"> <div xmlns="http: //www. w 3. org/1999/xhtml"> This is <b>XHTML</b> content. </div> </content>. . . <content type="xhtml"> <xhtml: div xmlns: xhtml="http: //www. w 3. org/1999/xhtml"> This is <xhtml: b>XHTML</xhtml: b> content. </xhtml: div> </content>. . . The following example assumes that the XHTML namespace has been bound to the "xh" prefix earlier in the document: . . . <content type="xhtml"> <xh: div> This is <xh: b>XHTML</xh: b> content. </xh: div> </content>. . . 11/2/2020 46
ATOM example <? xml version="1. 0" encoding="utf-8"? > <feed xmlns="http: //www. w 3. org/2005/Atom"> <title type="text">dive into mark</title> <subtitle type="html"> A < em> lot< /em> of effort went into making this effortless </subtitle> <updated>2005 -07 -31 T 12: 29 Z</updated> <id>tag: example. org, 2003: 3</id> <link rel="alternate" type="text/html" hreflang="en" href="http: //example. org/"/> <link rel="self" type="application/atom+xml" href="http: //example. org/feed. atom"/> <rights>Copyright (c) 2003, Mark Pilgrim</rights> <generator uri="http: //www. example. com/" version="1. 0"> Example Toolkit </generator> <entry> <title>Atom draft-07 snapshot</title> <link rel="alternate" type="text/html" href="http: //example. org/2005/04/02/atom"/> 11/2/2020 47
ATOM example (cont. ) 11/2/2020 <link rel="enclosure" type="audio/mpeg" length="1337" href="http: //example. org/audio/ph 34 r_my_podcast. mp 3"/> <id>tag: example. org, 2003: 3. 2397</id> <updated>2005 -07 -31 T 12: 29 Z</updated> <published>2003 -12 -13 T 08: 29 -04: 00</published> <author> <name>Mark Pilgrim</name> <uri>http: //example. org/</uri> <email>f 8 dy@example. com</email> </author> <contributor> <name>Sam Ruby</name> </contributor> <name>Joe Gregorio</name> </contributor> <content type="xhtml" xml: lang="en" xml: base="http: //diveintomark. org/"> <div xmlns="http: //www. w 3. org/1999/xhtml"> <p><i>[Update: The Atom draft is finished. ]</i></p> </div> </content> </entry> </feed> 48
ATOM secure l Digital signature l l ATOM document can have an enveloped signature by XML-signature and Processing. Encryption l 11/2/2020 The root of an Atom document (atom: feed, atom: entry) may be encrypted by XML Encryption Syntax and Processing. 49
ATOM extension l l ATOM is designed for easy extension. Foreign markup can be used in ATOM document l 11/2/2020 Through ATOM namespace 50
Readings l l Comparison of RSS 2. 0 and ATOM 1. 0: http: //www. intertwingly. net/wiki/pie/Rss 20 And. A tom 10 Compared ATOM: http: //tools. ietf. org/html/rfc 4287
Overview W 2. 0 Technologies l l RSS ATOM Ajax Web 2. 0 Applications l l l l 11/2/2020 Wiki Blog Google Maps Google Adsense Social Networks Google API l Others l l l Podcast Aggregator Mashup Social ontologies (FOAF, SIOC, SKOS) Social media (wikipedia, myspace, youtube, secondlife, digg, flickr, miniclip) 52
- Slides: 52