liveBook · Manning

Partition

As explained in Data-Oriented Programming in Java

A partition divides a set into subsets that are collectively exhaustive and pairwise disjoint.

A partition divides inputs and outputs into disjoint, non-overlapping sets. For business rules, each account should map to at most one Sales Org ID, while each rule responds to a distinct set of accounts. section 8.1.1

A partition makes several rule invariants explicit:

  • No two rules produce the same Sales Org ID. section 8.1.1
  • No two rules respond to the same account inputs. section 8.1.1
  • Overlapping rules are incorrect because conflicting outputs leave the correct result ambiguous. section 8.1.1

How Data-Oriented Programming in Java covers it

How deep it goes
Defines partition through rule domains and images, then checks pairwise intersections in an executable test.
Examples
Uses account-to-Sales-Org mappings, rule-function helpers, and pairwise collision tests.
What it assumes
Assumes Java functions and sets while teaching domain and image as practical tools for expressing rule invariants.
What you can do after
Diagnose rule collisions by comparing the domains and images of every known rule.
How it connects
Connects business rules with functions, domains, images, invariants, and executable tests.

Also explained in

Compare how 4 books explain partition →

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.