JoeZuntz
JoeZuntz

Reputation: 1179

Terminology for an API where users implement methods

There is an approach in library API design where the user must implement a subclass (or, sometimes, a set of functions) in order to use the API. For example, libraries may provide an (abstract) base class which the user must extend, instantiate, and then pass back to the library.

Is there a specific name for this kind of approach?

(The phrase "Service Provider Interface" seems to appear in Java but not elsewhere. It is also widely used in "Plug-in" architectures but does not seem to be the same thing.)

Upvotes: 2

Views: 32

Answers (1)

Mario Galic
Mario Galic

Reputation: 48420

The term abstract has a precise well known definition within the programming community, so I think we could say

We provide an abstract API consisting of a set of abstract classes and interfaces designed for you to extend and customise with concrete implementations.

and most developers would be familiar with the intended meaning.

Upvotes: 1

Related Questions