Home

Intents are one of the most exciting concepts I’ve come across for web and mobile development. Intents is a framework thats free user data.

Normally, apps exchange data using application programming interfaces, or APIs. APIs translate data from an external form into a form an application can understand. For example, a mail app can create a new meeting in a calendar through the calendar’s API. Typically, each calendar application will have a unique API (which explains why GMail Calendar and Outlook Calendar don’t sync well). For one mail application to interact with many calendars, it must communicate in many different calendar APIs, a real headache for developers and users alike.

In contrast, the Intents framework enables simple communication between apps. Intents have two major benefits over traditional APIs: (1) Intents are universal and generic; and (2) Intents enable apps that have no knowledge of each other to communicate.

Let’s make this a bit more concrete. On my Android phone, I have installed Picasa (a photo sharing app), GMail (email) and Twitter, Facebook and Google Buzz (social network). Each of these applications uses Intents. If I take a photo with my phone’s camera and hit the share button, my phone asks me which of these applications I’d like to use to share the photo.

Intents are elegant. The Camera application wasn’t programmed to communicate with any of these five apps. Instead, the Camera app defines a generic “share photo” intent. And Gmail, Facebook, Picasa, Buzz and Twitter define an intent for “receive photo.” Each application receives the photo in the same way but uses the photo data differently. Intents provide a generic way for applications to exchange data which means my data can flow easily to and from whichever applications I like.

Today, I can use Intents on my phone to share photos, route telephone calls, open music files, send calendar invitations, save and search for contacts and so on. I can choose which applications I prefer and everything works seamlessly. Imagine if that were true for all of your data, both on your phone and on the web.

As far as I know, Android pioneered the use of intents and serves as the best example of the benefits. In early August, the Chromium team announced a project to bring Intents to the web, enabling web apps to communicate in the same ways (github link). As with any new technology in the browser, building momentum for cross-browser support is a challenge. But I’m hopeful because the results could be profound.

Technologies like Intents will make applications work better together, the way we expect they should, by freeing user data.

Advertisements