Glossary

Deep module architecture, TypeScript · every term with its plain-language meaning · print it, pin it, use the exact words

The vocabulary of this course. Every term is explained in plain language the first time it appears in a lesson, so you don't have to memorise this — but when you want the precise definition, or you're reviewing later, this is where to look. Terms sourced from Ousterhout [book] are defined authoritatively there — see RESOURCES.md.

Deep module [Ousterhout]
A module that does a lot of useful work behind a small, simple interface. The complexity is hidden inside; what you see from the outside is clean and easy to use. The opposite of a shallow module.
Lesson 1
Shallow module [Ousterhout]
A module that doesn't actually do much useful work, but makes you deal with lots of details to use it. A shallow module pushes complexity onto whoever calls it, instead of absorbing it itself. The opposite of a deep module.
Lesson 1
Depth (of a module) [Ousterhout]
A rough measure of how much a module does compared to how hard it is to use. Depth = functionality provided ÷ complexity of the interface. A deep module has high depth: lots of functionality, tiny interface. A shallow module has low depth: little functionality, large interface.
Lesson 1
Module interface
The things a module makes available to the outside world — the functions, types, and values it exports. This is the only part of a module that other code can see and use. In TypeScript, the interface is controlled by export statements and index.ts barrel files.
Lessons 1, 3
Information hiding [Parnas; Ousterhout]
The idea that a module's internal details should not leak out. Callers should only need to know what the module does, not how it does it. Deep modules practice information hiding aggressively — the messy internals never reach the interface.
Lesson 1
Barrel file (index.ts)
In a TypeScript project, a file (usually named index.ts) placed at the root of a folder that re-exports selected items from the files inside that folder. It acts as a single front door for the whole module — callers import from the folder, not from individual files inside it. This lets you control exactly what's public.
Lesson 3
Public surface (or public API)
Everything a module deliberately exposes to the outside world. In TypeScript, this is what gets re-exported by the barrel file. A deep module keeps this as small as possible — only what callers truly need.
Lessons 2, 3
Encapsulation
The practice of bundling data and behaviour together and keeping the internal parts private. A deeply encapsulated module reveals as little as possible about how it works. In TypeScript, this means not re-exporting internal helper functions or types from your barrel file.
Lesson 3
Leaky abstraction [Fowler]
When a module's interface doesn't fully hide its complexity — callers occasionally need to know internal details to use the module correctly. A shallow module is often a leaky one: it makes you think about things the module should handle for you. The term was coined by Joel Spolsky; the antidote (deep modules) is Ousterhout's focus.
Lesson 1
Obvious in context [Ousterhout]
One of Ousterhout's two measures of good design (the other being deep modules). A piece of code is "obvious in context" when, given the surrounding code and the names on the page, its purpose is clear without extra comments or mental gymnastics. Deep modules are obvious in context because their interface is simple.
Lesson 2
Single Responsibility Principle (SRP) [Martin]
A class or module should have one reason to change. While Ousterhout's deep-module idea is about interface simplicity (a deep module can do a lot — just present it simply), SRP is about cohesion (the module's pieces belong together). They pull in the same direction, but deep modules can serve a broad job if they hide the breadth well.
Lesson 2
← Lesson 1