2 Designing an API for its users
This chapter covers
- Which perspective to focus on when designing APIs
- Approaching API design like designing a user interface
- How to accurately determine an API’s real goals
If you were eager to jump right into the programming interface design battlefield, I’m deeply sorry, but you will have to wait for the next chapter. In this chapter, we look at the API’s users’ needs.
When you want to build or create something, you need a plan. You need to determine what you want to do before actually doing it. API design is no exception.
An API is not made to blindly expose data and capabilities. An API, like any everyday user interface, is made for its users in order to help them achieve their goals. For a social networking API, some of these goals could be to share a photo, to add a friend, or to list friends. These goals form the functional blueprint required to design an effective API, and that’s why identifying goals is a crucial step in the API design process. These goals—what users can achieve using your API—must make sense for the users, and none should be missed.