A Module Can Hide a Decision That Changes

A useful module boundary lets one implementation decision change while callers continue to use a stable contract.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace a stored format
  2. Name what is actually hidden

Trace a stored format

An article search component can change from scanning records to querying an index. A caller still asks for titles matching a supplied query under a documented rule. See replacing an implementation.

Name what is actually hidden

If callers rely on the old storage layout, changing that layout still crosses the boundary. Public import surfaces give a related code-level pattern.[1]

References

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