Top Banner
Can your website be your API and real life Glenn Jones SemanticCamp London 17 February 2008
25

Can your website be your API and real life

May 17, 2015

Download

Technology

Glenn Jones

This talk to tries and answer the question Drew McLellan posed a year ago in his presentation Can Your Website be Your API? I used some of my experience building ufXtract and parsing social networks information to see if it is possible in the real world.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Can your website be your API and real life

Can your website be your API and real life

Glenn Jones SemanticCamp London17 February 2008

Page 2: Can your website be your API and real life

Drew Mc

• xx• xx• xx

Drew McLellan presentationCan Your Website be Your API?

at Web Standards Group LondonOctober 2006

Page 3: Can your website be your API and real life

Real life example

Portable social networks by parse MicroformatsWhat we are learning

Page 4: Can your website be your API and real life

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

Page 5: Can your website be your API and real life

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

Page 6: Can your website be your API and real life
Page 7: Can your website be your API and real life
Page 8: Can your website be your API and real life

<a rel="me" href="/user/adactio/friends/">Friends</a>

Page 9: Can your website be your API and real life

<a rel="me" href="/t/friends">View All…</a>

Page 10: Can your website be your API and real life

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

Page 11: Can your website be your API and real life

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

Page 12: Can your website be your API and real life

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

Page 13: Can your website be your API and real life

<a rel="prev" class="section_links" href="/t?page=2">Older »</a>

Page 14: Can your website be your API and real life

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 !!!

Page 15: Can your website be your API and real life

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

.

Page 16: Can your website be your API and real life

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>

Page 17: Can your website be your API and real life

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

Page 18: Can your website be your API and real life
Page 19: Can your website be your API and real life

Data portability

Parsing POSH patternsand extending mircoformats

Page 20: Can your website be your API and real life

POSHFor the acronym, see POSH. For the British singer

nicknamed "Posh Spice", see Victoria Beckham

Plain Old Semantic HTMLPatterns Of Semantic HTML

Page 21: Can your website be your API and real life
Page 22: Can your website be your API and real life

Drew Mc

• xx• xx• xx

We are getting there !

Page 23: Can your website be your API and real life

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.

Page 24: Can your website be your API and real life

Why bother

This idea is very democratic in terms of different software access

Machine

Html with embedded data

Clients Spiders

Libraries

Page 25: Can your website be your API and real life

Creative Commons Attribution-Non-Commercial 2.0 UK: England & Wales Licence.

Copyright Glenn Jones 2008www.glennjones.net