Tutorial :Naming: What would you call a rich API that wraps around a thin API



Question:

I have a "thin" (SOAP) API that only knows how to set and get entities in the underlying system.

I am about to to create a "rich" API that encapsulates the "thin" API and implements the logic that is required for complex operations that entail getting and setting several entities in specific order.

Example: The rich API will be responsible for creating a new user account by creating a "Lead" entity that's linked to an "Account" entity via the thin API.

I'm stuck in a naming block so I turn to SO ;) What name would you give my rich API? "xxxRichAPI"? "xxxHelper"? "xxxService"?


Solution:1

At first glance, this sounds like the GoF Facade pattern to me. You might considering using the name "xxxFacade".


Solution:2

Isn't the point of an API that it hides it's implementation? As such, the fact that your API calls a thinner API is irrelevant. Name your API appropriately for what it does, regardless of how it does it.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »