2025-10-22
Most of our views consist of nodes (boxes) and edges (lines), specialized for various different kinds of view.
One thing we have left out is how exactly these lines connect the boxes (and our boxes to outside boxes).
At some point, in other words, a developer will have to wire this stuff together.
My favorite interface video.
My favorite interface story.
All elements (in our views) have interfaces. All software elements interact with their environment. The architect decides which aspects to document.
An element’s interface is separate from its implementation. We often have multiple elements that provide the same interface.
An element can have multiple interfaces.
An interface can be documented for a single element, a collection of elements (such as a layer), or an entire system.
Elements not only provide interfaces but also require interfaces. An element makes use of other elements’ resources or assumes that its environment behaves in a certain way.
Multiple actors may interact through an interface at the same time. Some interfaces don’t allow this because of synchronization and multi-threading issues. Make that clear in the interface documentation.
Interface identity—some obvious name. This is not easy; it is as hard as naming a method or an object. It should be memorable and perspicuous.
Resources provided:
We can ‘reify’ our interface as a separate class altogether. In Java, for example, this is accomplished with the Interface language feature.
We can use lollipops and sockets as well (again, in the primary presentation).
Use the template following to capture the interface documentation for the following scenarios. The scenarios share the common theme that the current docs are terrible; your job is to improve it. Make whatever assumptions you need to make the problem simpler. The idea is to document the interface that this module provides, rather than spending time improving or ironing out details of the design.
Groups 1-9 - Scenario 1 - Groups 10-16 - Scenario 2
Your team needs to specify the interface for a module that does credit card transaction processing:
authorize(in cc_number, in amount, in cvc_number, out status, out authNumber)
Your team is maintaining the star tracker for a military satellite. You send current position to the rest of the satellite systems, enabling communications, course correction, etc.
SEND_CUR_POS(in x, in y, in z, in time, out status)
An API (Application Programming Interface) is now essential to most modern web-facing software. An API is the external collection of interfaces, i.e., interfaces for external tools and users.
This might be another team in the org (e.g Amazon), or anyone who signs up (Github).
MCP servers are a new arrival in the interface world. They also expose your internal services to the world, and come with security and maintenance questions.
Key qualities to consider:
The vast majority of APIs we see are REST(ish).
REST = Representational State Transfer, and underpins the modern web system. REST is a design pattern/architectural style. See Fielding’s thesis.
HTTP Verbs: GET/POST/DELETE/ etc. + data representation (the resource in URL), nearly always Javascript Object Notation (JSON).1
All the client MUST know is how to get the first resource.
REST specifies the subsequent operations should be part of the resource being retrieved (loosely coupled).
Operations are be idempotent: the state of the world is the same after one invocation or many (web-scale).
Standard verbs = simplified architectural choices. You modify resources through the verbs, making this a data-centric style.

Neil Ernst ©️ 2024-5