Microformats to Portable Contacts API converters
I have been doing some research work into the new Portable Contacts API. It’s designed to enable users to securely port their friend lists or address books from one site to another.
Currently most social networking and address book sharing sites have their own proprietary contacts API’s. These API’s often provide some sort of distributed authorisation model for a developer to code against. If you integrate a few of these different interfaces into your site the levels of complexity become nightmarish.
From this tangle was born the password anti-pattern, this is where you ask the user for their username and password and then log in to another site as them and scrape the data you need. This is a bad idea on many counts, but looking at the historical alternatives you can understand why most developers took this route.
OAuth was designed to help remove the complexity of multiple distributed authorisation models. Whereas the Portable Contacts API tackles the second element of friend lists sharing, by providing common API and discovery.
Portable Contacts API is built on open specifications which can be used across sites. It uses a number of pre-existing technologies with its data structures based around OpenSocial and vCard, which should create a common access pattern and contact schema for everyone to use.
I have built a number of interfaces to help evaluate any data loss or added ambiguity that may occur when converting microformats into the Portable Contacts API data schema.
- hCard to Portable Contacts API demo
- hCard-XFN pattern to Portable Contacts API demo
- hResume to Portable Contacts API demo
They do not yet provide the querying, sorting and pagination nor the endpoint URL elements of the specification. It’s also worth mentioning that Portable Contacts API is still in development and these interfaces are based on the Draft C specification.