liveBook · Manning

Data-oriented question

As explained in Data-Oriented Programming in Java

A data-oriented question is an inquiry that investigates what a piece of data means in its domain before choosing its representation.

Before choosing a Java type, ask whether a field has the meaning its representation suggests. A JSON number mapped mechanically to int or double may preserve shape while losing domain semantics. section 3.1

Questioning daysElapsed

A field called daysElapsed might suggest one measurement per day. Investigating the drying process reveals sparse measurements instead: values can progress from day 1 to day 3, day 4, and day 7. That meaning should shape the model and its assumptions. section 3.1

Use the question to make domain understanding explicit:

  • Ask what a unit means: “days” may not mean 24-hour intervals or daily observations. section 3.1
  • Record discovered constraints, such as nonnegative sparse integers and contact angles from -180° inclusive to 180° exclusive. section 3.1
Listing 3.4 Writing down our understanding of daysElapsed
                     Domain Notes.md
=========================================================
SampleID: Unknown
 
Days Elapsed: 
    A positive integer (0 inclusive). 
    Not strictly daily. Will be Sparse. 

Contact Angle: Unknown

Use the domain-notes listing to see how investigation turns ambiguous fields into explicit modeling knowledge. section 3.1

How Data-Oriented Programming in Java covers it

How deep it goes
Works through field interpretation and written constraints, stopping short of a complete domain implementation.
Examples
Examines drying-oil measurements, sparse elapsed days, and contact-angle bounds.
What it assumes
Assumes a JSON-to-Java mapping context and teaches readers to investigate field meaning before coding mechanically.
What you can do after
Evaluate data fields before selecting Java types and document their discovered domain constraints.
How it connects
Connects JSON modeling with Java records, domain semantics, and encoding meaning in the type system.

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.