A universal API
The web is currently living a silent revolution, with platforms such as MySpace or FaceBook. I don't really want to talk about those, but let me just say a few word about their future.
Recently, Jeff Hubber (Google) has said the the web is the platform. Whereas this might seem prententious, there is some truth to it : closed platforms will attain their limits one day or another. Those platforms actually believe that transposing to the internet the model of environment based applications will work on the long term. This is nonsense, we are currently evolving in the so called Web 2.0, which aims to be interoperable and based on content flow.
So, I thought about this idea of web as a platform, and I believe that some kind of universal, open source, API should exist. Here is the context in which we are :
There are a great number of services, each providing their own API.
On the other hand, a universal API would look like this :
This would free the developers from the service, as they would have access to a few primitives in charge of getting the information from the right place, and they could concentrate on the features of their application.
Basically, most current web services provide APIs, so it would really be nothing more that some glue
A modular architecture :
- A core containing generic functions (
get_user,get_bla) - A lot of interfaces between the core and foreign APIs
For example, if someone want to write a photo widget, he could the use the following (without bothering about which service is actually used) :
$my_widget->import("flickr", "fotki", "zoomr");
$my_widget->flickr->connect("login", "pass");
$my_widget->fotki->connect("login2", "pass2");
$my_widget->zoomr->connect("login3", "pass3");
$pics = $my_widget->get_pics();
foreach ($pics as $pic)
{
echo $pic->url;
foreach ($pic->tags as $tag)
{
echo $tag;
}
}
Of course, this can be extended to any service, not only image hosting.
I think that the day this kind of abstraction will exist, then the web will become the platform de facto
5 Responses to "A universal API"
Il suffit de supprimer tout ce qui n'est pas google et on s'approchera peut-être de ton idée:
Il faudrait surtout que chaque site s'engage à mettre à disposition publique une api documentée. Après on peut rêver d'un standard pour les fonctions de cette api, mais ça peut parait bien peu réaliste.
Si une telle api universelle existe un jour, elle reposera à mon avis surtout sur des gens qui auront eu le courage d'écrire des bindings pour chaque site, en faisant en sorte de respecter une convention à eux.
L'étape la plus urgente est surtout de se rendre compte que le web en tant que tel n'est pas une bonne idée : tout devrait être api, y compris la partie qu'on voit au travers du navigateur. Avec une telle abstraction, on pourrait construire facilement des navigateurs pour les handicapés, les bidules mobiles communiquants qu'il faut manipuler avec un cure-dents ou encore les clavierophobes.
La plupart des sites mettent à disposition une api documentée (enfin ceux dont je parle). Et effectivement, un standard relève du rève.
C'est pourquoi je dis qu'il faudrait en créer une de toute pièce, en faisant les bindings à la main. Ce n'est pas une mince affaire, j'en conviens
Je partage l'analyse, mais FaceBook est justement ouvert dans une certaine mesure.
La plupart des "applications", s'intègrent à FaceBook et ne sont pas développés par FaceBook.
http://developers.facebook.com/
En fait, c'est un des trucs qui va faire que FaceBook va manger MySpace.
Hum… presque prophétique ton post ! Voilà OpenSocial ! http://code.google.com/apis/opensocial/
Au fait, la glue, c'est mal.
Au fait, il est pas à l'heure le site. Et puis les pages d'erreurs wordpress par défaut, c'est pas marrant !
Et tu peux supprimer ce post si tu veux.
Leave a Reply