On peanut butter and chocolate and APIs…

On peanut butter and chocolate and APIs…

A friend recently posted a link to this blog. It’s an interesting read about where you should focus when building your app; should you have one app for each platform, or an API that goes as high up as possible into each platform?

In particular, he quotes the expression, “the API is the asset, the UI is simply throwaway”.

I get the point he’s trying to say. Platforms come and go – but an API should be designed to be durable. I kind of agree, and I kind of don’t. Let me explain.

When a developer builds an API, it generally exposes rough verbs that relate to user tasks. When a designer or developer builds an application, it should be entirely defined by the tasks that a user needs to complete, and ideally, take advantage of distinct benefits of each platform where the investment to comply with those hooks increases the ease of use of the application.

In a nutshell, you are designing an API to expose a service, and an application to deliver an experience. The goal of a good development team should be to take the API as high up the stack as the application will allow – without exposing the user to the flow of the API directly. Think of an old recliner with the padding crushed down over time. You feel every nuance of the springs or metal bars holding it together. A good application design provides the padding to shield the end user from that pain, without overstuffing it. You want to invest enough in the UI to deliver an experience representative of (your application + that platform). Perhaps the expression quoted isn’t intended to be so harsh towards the UI as to make it seem like a wood veneer appliqué, but that’s how I read it. It’s true – you want to make as much of your code as portable as possible (the API), but invest where you need to in order to provide the best experience (the UI).

The goal of the API is to provide structure, the goal of the user interface is to provide the abstraction between your API and the user experience your application seeks to deliver for that platform. Peanut butter and chocolate.

Comments are closed.