background preloader

API Design

API Design
One of the development tasks I do most often is designing the API for a reusable component. The components are usually for iOS (though sometimes they’re for OS X), and are invariably GUI controls or views of some kind. I’ve designed literally dozens of component APIs over the years, including for clients like Apple, and I’ve learned quite a bit about the process. I periodically release open source components too, and the feedback I’ve had has helped me put together a set of guidelines for API design that I’d like to share with you. This is an important topic, whether you’re an open source contributor, or working as part of a team on a large app, or just creating your own software. APIs are UX for developers. As we go through some guidelines, I’m going to use my most recently released open source GUI component, MGTileMenu, as an example where necessary. Desirable qualities API design is very much like user interface and user experience design. IntuitiveForgivingFrictionless Class interface

Flot: Attractive JavaScript plotting for jQuery Cubism Mike Bostock Square, Inc. * for monitoring of production systems How do we use visualization? Anomaly detection - observe abnormal activity Capacity planning - extrapolate non-linear trends Crisis diagnosis - see interactions between services System design - don’t guess; decide empirically What are the benefits of visualization? Faster diagnosis - reduce impact Discovery of unexpected behavior - prevent downtime Increased situational awareness - make better decisions Or: The strengths & weaknesses of human perception. Why is visualization hard? Data is not information - transform data to make it meaningful Some visual channels are less effective - favor position Integrality is hard to avoid - three dimensions max. Aspect ratios matter. Stacking makes middle layers hard to read. Garish colors can be hard to see. Load and render data incrementally. Make better use of modern browsers. Combine position and color to reduce vertical space. A small library, not a system. Why a context? CPU (10s) Network (10s)

Related: