liveBook · Manning

Chapter 1: Data Oriented Programming

What you will learn in chapter 1 of Data-Oriented Programming in Java

The introduction defines the book’s data-oriented programming approach: represent domain meaning as well-typed, immutable data rather than relying on code alone to convey it.

After this chapter you will be able to

Section by section

Introduction

The introduction defines the book’s data-oriented programming approach: represent domain meaning as well-typed, immutable data rather than relying on code alone to convey it.

Key terms: data, code, Data Oriented programming (DOP), type system, domain, immutable, well-typed data, data orientation, Maps

1.1 Objects in a Data Oriented World

The section presents data-oriented programming as a way to use objects where they fit while putting more design emphasis on data and its representation.

Key terms: data orientation, objects, boundaries, encapsulate state, modeling data as data, describe itself, meaning, representation

1.2 The soul of data-oriented programming in a single line

A one-line identifier example shows how choosing a data type that matches domain meaning makes code clearer and rules out invalid states.

Key terms: String, id, UUID, semantics, representation, illegal states, defensive programming

1.3 Show me your data, and the rest will be obvious

This section explains how object fields can obscure the meaning of the data they represent.

Key terms: state, objects, implicit meaning

1.3.1 Analyzing ambiguous OOP code

The section uses an ambiguous rescheduling method to show how code can be easy to read yet hard to understand when the meaning of its states is left implicit.

Key terms: reschedule method, fields, model, attempts, lifecycle, usages, inductively, semantic integrity, semantic drift, data-oriented view

1.3.2 Representing data “as data”

The section shows how representing a failed task’s possible next decisions as named data makes domain meaning explicit, and how that approach can complement object-oriented interfaces.

Key terms: ScheduledTask, data types, semantic integrity, domain-level interface, encapsulation boundary, data orientation, object orientation

1.4 Orienting around data

Focusing on data clarifies a task’s distinct states and encourages code whose inputs and outputs make its purpose visible.

Key terms: Failed Task, scheduled task, plain data, semantics, reschedule method, data, inputs, outputs, expression-oriented, imperative statements

1.5 Which version of Java do I need?

This section explains that the book uses Java 25, but its data-oriented ideas remain usable on JDK 8 and other older versions.

Key terms: Java 25, JDK 8, data-oriented programming

1.6 How does this book teach?

The section explains why the book uses small, self-contained examples and deliberately explores flawed designs.

Key terms: self-contained examples, modeling decisions, bad properties

1.7 Summary

Where this is used later

Concepts explained in this chapter

Chapter 2: Data, Identity, and Values →

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.