Mobile-friendly Server Interfaces


Watched this video on InfoQ about designing APIs for the mobile applications. Few good tips and insights I gathered after watching it are as follows.

  1. Things to consider while designing the mobile APIs
    • Battery life
    • Latency
    • Chunky vs. Chatty
  2. gZip data, especially JSON.
  3. Instead of loading everything in one go, think about loading data on events.
  4. Should the application (hence the APIs) be optimized for reading or writing or both?
  5. Have caching strategy in place. Cache, not only on the client side, but also on the server side.
  6. Granular, true REST interfaces are great but you might end up making several calls to get the data your screen needs. You might have to create screen specific APIs ( the APIs that provide data and services for one screen ) in order to reduce the # of calls made to the server.
  7. Pre-generate or pre-process and cache the data that you think the application might need.
  8. Offload work to the client.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s