Future of Web Apps – Day 2 Keynote – Telling stories with APIs – Camille Baldock
This was live blogged and it was early!
Antione de Saint-Exupery was an aviator and he write the most translfated book ever in French – The Little Prince – this story works on multiple levels
When we talk about telling stories with apis, we are effectively providing a book for people to read and interact with.
When we have a book API, we have books, chapters and pages and the Kindle API works like this – but if we have an API like this, are we actually solving the user problem?
The government has stickers that say ” What is the user need?” – Its not asbout doing whats fun its all about the users.
With our book api, maybe we dont just want to get chapters and poage, but what about events and characters
These are not linear – a character and event can happen anywhere in the book and in order to organise this – its actually linked data.
There are 2 standard for linked data – JSON API and HAL.
HAL embeds child documents recursively – when we want to get things like events and chapters, they will all be linked in there.
JSON API flattens the entire graph of objects at the top level.
In the book we mentioned earlier, we read that book differently when we are 7 to if we read it now.
When we are 7, we want to know about the fun points of the book, but later on in life, we might want to know about context or what drove the author to write the book. As a reader, when we open the book and go to chapter 2, perhaps we can work out what the background of the story was – information about his life and experiences.
We can use online databases like (DBPedia) to get additional linked information.
Schema.org suggests schema structures for a particular entity – Wikipedia are using this and Google use this too to show related information in the search results
JSON-LD is a format of JSON for Linked data that is supported across loads of different sites.
Gmail also use this to show related detail in an email for things like calendars.
So if for example I have an API, with books and chapters, with related linked data about the events and history but….WHAT IS THE USER NEED?
So if i want to read more deeply into the book and understand the metaphor in the book – perhaps we need to see what other users think about this? So perhaps we need to add a way for people to add their opinion of the book to the API.
So really – what are we trying to do with APIs?
We should try to fix problems for your users and make it easy to get data from us simply and ensuring that we handle all the cases that they might want data.