Quadrille API

APIs and programmer roles in object-oriented programming #

Application Programming Interfaces (APIs) play a crucial role in object-oriented programming by providing a standardized interface for interacting with software components. They promote code reusability, modularity, scalability, collaboration, and interoperability, making it easier for developers to build complex applications that can evolve over time. As such, understanding APIs and how to use them effectively is essential for any modern software developer.

Programmers can play different roles in relation to an API, depending on their area of interest / expertise and specific needs. Two of the main roles are:

  • Designers & developers: These are programmers who are responsible for designing and implementing the API itself. They need to understand the system requirements and the needs of the developers who will be using the API, and design an interface that is easy to use and meets those needs.
  • Users: These are programmers who use the API to build their own software applications. They need to understand the API documentation and be able to use the API to achieve specific goals.

This section introduces the p5.quadrille.js library whose API (which will be covered here) can be used to develop some puzzle video games which are left out as an exercise, allowing the reader to practice the second role introduced above. It can also serve as a model to then explore more APIs like those from other p5 libraries.