Isolating a Dependency Behind a Narrow Interface

A component can translate an external interface to the operations its own callers require, preserving room to change providers or tests.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace a search provider
  2. Keep errors and timing explicit

Trace a search provider

An application may need query text, filters, and a list of result records. A boundary adapter can translate vendor-specific response fields once. See adapters for another interface.

Keep errors and timing explicit

A provider's timeout should become a known unavailable result if the calling feature needs that outcome. Service calls explain why remote behavior belongs in the contract.[1]

References

  1. David L. Parnas, On the Criteria to Be Used in Decomposing Systems into Modules, CMU-CS-71-101 ↩