6 Simplicity vs. cost of maintenance for your API

 

This chapter covers

  • UX and maintenance tradeoffs when integrating with third-party libraries
  • The evolution of settings exposed to clients
  • Pros and cons of abstracting away things you don’t own

When building our systems for end users, our API’s simplicity and friendly user experience (UX) are essential. It is important to note that UX can apply to all interfaces. We can design a graphic user interface (GUI) that is clean and user friendly. We can also create our REST APIs in a UX-friendly way. Going one level deeper, the command-line tools can also be UX friendly or not UX friendly. Basically, every software that needs to interact with the user in any way requires a discussion and planning about its UX.

The configuration mechanism of our system is an entry point that we need to expose to clients. It is also a vital part of the UX friendliness of our component. Often, our systems depend on and use multiple components to provide the result of processing. Each of the dependent components exposes its configuration settings that need to be set in some way.

We can abstract away every downstream component (any element used by the system for which we are creating a UX) and not expose any of those component settings directly with the tool that interacts with the user. This will improve the UX of our system, but it will require substantial maintenance.

6.1 A base library used by other tools

6.1.1 Creating a cloud service client

6.1.2 Exploring authentication strategies

6.1.3 Understanding the configuration mechanism

6.2 Directly exposing settings of a dependent library

6.2.1 Configuring the batch tool

6.3 A tool that is abstracting settings of a dependent library

6.3.1 Configuring the streaming tool

6.4 Adding new setting for the cloud client library

6.4.1 Adding a new setting to the batch tool

6.4.2 Adding a new setting to the streaming tool

6.4.3 Comparing both solutions for UX friendliness and maintainability

6.5 Deprecating/removing a setting in the cloud client library

Summary