Deciding how to expose functionality.
WHAT TO ASK FIRST
Who calls it, and from where.
WHAT PUBLIC CONSUMPTION ARGUES FOR
Resource-based design over the standard protocol.
WHY
It is understood everywhere, needs no special tooling, and works through every proxy.
WHAT INTERNAL SERVICE COMMUNICATION ARGUES FOR
A binary remote-call approach, where speed matters.
WHAT BROWSER AND MOBILE CLIENTS WITH VARIED NEEDS ARGUE FOR
A query-based approach, letting each request what it needs.
WHAT REAL-TIME UPDATES ARGUE FOR
A persistent connection, or one-way streaming.
WHAT ASYNCHRONOUS WORK ARGUES FOR
Messaging, not request and response.
WHAT TO AVOID
Choosing on fashion Mixing several styles without reason Building a query interface for two simple endpoints
WHAT MOST PROJECTS SHOULD DO
Resource-based, with events for notifications.
WHY THAT COMBINATION
It covers almost every requirement with the least machinery.
WHAT TO DECIDE ALONGSIDE
Authentication Versioning policy Error format Pagination approach
WHY ALL FOUR BEFORE WRITING CODE
Each is difficult to change once callers exist.
WHAT TO WRITE DOWN
Those decisions, as a short document everyone follows.
WHAT TO REVIEW LATER
Whether the choice still fits.