Can your website be your API and real life
-
Upload
glenn-jones -
Category
Technology
-
view
1.220 -
download
0
description
Transcript of Can your website be your API and real life
Can your website be your API and real life
Glenn Jones SemanticCamp London17 February 2008
Drew Mc
• xx• xx• xx
Drew McLellan presentationCan Your Website be Your API?
at Web Standards Group LondonOctober 2006
Real life example
Portable social networks by parse MicroformatsWhat we are learning
Portable social networks
• Finding interlinked personal data / social graph
• Pagination of data
• Design patterns
• Reciprocal relationship validation
• Defining the representative profile
• Authorisation
• Data granulation
The current topics which are being explored as part of defining the portable social networks solutions
rel=“me” and rel=“friend”
Many of the web 2 social networking sites are now using these simple attributes. Twitter, Flickr, Last FM etc
More importantly we are now seeing the first services that provide social graph data
• Googles social graph API• Plaxo social graph demo• UfXtract portable social network API
<a rel="me" href="/user/adactio/friends/">Friends</a>
<a rel="me" href="/t/friends">View All…</a>
Reciprocal relationship validation
Only having the right people in my friends list.
1. You start your parser from a controlled source2. You trust pages/sites with reciprocal rel=“me” links
3. Where possible restrict parser using Url fragments so that user generated content does not inject unwanted relationship links. (Not in spec)
In the end let the user decide
Representative profile
Choosing the best profile from a collection.
• rel="me" on class="url"• url=source
• Do steps 1 and 2 based on domain• The first one
In the end let the user decide
Pagination of data and rel=“next”
The use of rel=“next” is starting to be used mainly to move parsers through friends list pages.
rel=“me”Link or page profile/friends list data
rel=“next” Used to page non profile/friends list
rel=“next me”This combination can cause issues in mixed content pages
<a rel="prev" class="section_links" href="/t?page=2">Older »</a>
Using Url fragment identification
The microformats parser should all support Urlfragment identification. So you can mark-up groups of information and provide pagination in context of a page fragment.
http://twitter.com/glennjones/#proflieshttp://twitter.com/glennjones/#posts
The spec says that Rel=“me” should NOT support Urlfragments !!!
We have not got patterns forUrl design
There are no standards/conventions for designing common querystring patterns, REST or not
http://twitter.com/t/friends/2http://twitter.com/t/friends?page=2http://twitter.com/t/friends/page=2&pagesize=10
Without embedded linkage within the web pages our libraries have to be domain specific
.
Design patterns – hcard-xfn
The growing convention of the use of rel=“me” and rel=“next” is starting to form architectural design patterns. We also have mircoformat hcard-xfnpattern for additional data fidelity around relationships.
<li class="vcard"> <a class="fn n url" rel="friend met" href="../adactio"> <span class="given-name">Jeremy</span> <span class="family-name">Keith</span></a> </li>
People vs machines
• The lister/detail model means a lot of loads• The level of data needs differ• Web pages can contain multiple groups of data
People MachinesHtml
Data portability
Parsing POSH patternsand extending mircoformats
POSHFor the acronym, see POSH. For the British singer
nicknamed "Posh Spice", see Victoria Beckham
Plain Old Semantic HTMLPatterns Of Semantic HTML
Drew Mc
• xx• xx• xx
We are getting there !
oAuth and privacy
We are currently only parsing public data from open web pages.
We need some sort of access control which allows us to parse pages behind logons.
Why bother
This idea is very democratic in terms of different software access
Machine
Html with embedded data
Clients Spiders
Libraries
Creative Commons Attribution-Non-Commercial 2.0 UK: England & Wales Licence.
Copyright Glenn Jones 2008www.glennjones.net