6. Library and API Design

Every programmer is an API designer at one time or another. Maybe you don’t have any immediate plans to write the next popular JavaScript library. But when you program in a platform for a long enough period of time, you build up a repertoire of solutions to common problems, and sooner or later you start to develop reusable utilities and components. Even if you don’t release these as independent libraries, developing your skills as a library writer can help you write better components.

Designing libraries is a tricky business and is as much art as science. It’s also incredibly important. APIs are a programmer’s basic vocabulary. A well-designed API enables your users (which probably includes yourself!) to express their ...

Get Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.