Chapter 11. APIs

Unless you have a really bizarre business model, your success probably revolves around having people use your application. Much to the confusion of engineers everywhere, not everybody spends all day hunched in front of a monitor surfing the Web and checking their email. If we want our application to get the maximum reach, we need to offer as many convenient ways as possible for users to get access to the data and functionality tied up inside it.

Beyond simple web pages, we already share our data out using other output vectors. Any email we send from inside our application is data that we share with the world, extending the reach of our application and extending interaction to pull users back. So the question is, how do we extend this interaction further? This interaction doesn’t need to be limited to a read-only push of information at our users. If there are ways to extend the writing as well as the reading of data outside the web sandbox, then we want to leverage those. We want to reach users beyond the browser and the inbox, allowing read and write access to our data from anywhere our users can use it.

Data Feeds

On the read-only push side of things, there are interesting ways in which we can keep users updated with the latest pertinent data, funneling them back to the Web for interactivity. Other than email, a method of data push that is becoming increasing fashionable is to offer data in the form of XML-based feeds.

A feed in its simplest form offers a chronological ...

Get Building Scalable Web Sites now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.