liveBook · Manning

Information leakage

As explained in Data-Oriented Programming in Java

A design problem in which code outside a component must depend on knowledge of that component’s internal representation.

Information leakage occurs when unrelated code must understand a component’s internal representation to use its data. A serialized String can temporarily enforce shape while allowing domain meaning to disappear. section 3.3.3

Grouping by representation

Grouping measurements by curing method becomes dependent on the SampleId encoding: m -> m.sampleId().value().split("-")[0]. Moving split logic into curingMethod() hides the representation but still leaves the meaning modeled as String.

How Data-Oriented Programming in Java covers it

How deep it goes
Traces leakage from String validation through accessors to a typed domain model, stopping short of broader architectural treatment.
Examples
Uses SampleId grouping, String splitting, custom accessors, JSON serialization, and a typed Java record.
What it assumes
Assumes familiarity with Java records, streams, and basic domain modeling while teaching the distinction between meaning and serialization.
What you can do after
Diagnose representation leakage and refactor serialized fields into domain-specific types with compiler-visible guarantees.
How it connects
Connects information leakage with serialization, domain modeling, type systems, invariants, records, and enums.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data-Oriented Programming in Java. The section links point to the parts of the book it draws on.