Simply Broken

← Functional, Object-Oriented and Domain-Driven Design, Combined

Version 2, 15 November 2026

The principles, one approach at a time

Three guides to the principles of object-oriented programming, functional programming and domain-driven design. Open a line to read it.

Open each guide to

Object-oriented programming

By the question that each principle answers

52 points

Object-oriented programming builds a program from objects. Each object holds its own data, protects it behind a small set of operations, and can replace a different object that offers the same operations.

The two trees hold the same 17 principles and the same 52 points. The first tree is the guide. The second tree puts the principles in the order of need.

Limits: the first tree divides the approach by the question that the principles answer. Its last group, the trade, holds judgements and not principles. The second tree uses one attribute, the grade of need. The grade is the author's judgement, and a principle moves when the grade changes. Its first group holds 9 principles, in the order of the guide. One point, the L of SOLID, refers to a point below Inheritance.

Functional programming

By the question that each principle answers

36 points

Functional programming builds a program from calculations that have no hidden effects, on data that does not change. It moves all contact with the outside world to the edge of the program.

The two trees hold the same 12 principles and the same 36 points. The first tree is the guide. The second tree puts the principles in the order of need.

Limits: the first tree divides the approach by the question that the principles answer. Its last group, the trade, holds judgements and not principles. The second tree uses one attribute, the grade of need. The grade is the author's judgement, and a principle moves when the grade changes. Its first group holds 7 principles, in the order of the guide.

Domain-driven design

By the question that each principle answers

53 points

Domain-driven design says that the hard part of software is the business problem. So the code uses the words of the business, inside borders where each word has one meaning.

The two trees hold the same 16 principles and the same 53 points. The first tree is the guide. The second tree puts the principles in the order of need.

Limits: the first tree divides the approach by the question that the principles answer. Its last group, the trade, holds judgements and not principles. The second tree uses one attribute, the grade of need. The grade is the author's judgement, and a principle moves when the grade changes. Its first group holds 9 principles, in the order of the guide.

About this page

The three approaches answer three different questions. Object-oriented programming says how to pack the parts and hide the details. Functional programming says how to calculate a decision. Domain-driven design says what to model and where the borders are. Version 1 of this topic shows how the three fit in one small system. This version explains each approach alone, in 45 principles and 141 points.

How to read it

Each guide is one outline with three levels: groups, principles, and the points of each principle. The box with the plus opens a line. The small circle with the letter i shows what a line means. The four buttons at the top open one level in the first tree of each guide. The last button shows all the text of the lines that are open, so that the guide reads as a document.

Each guide has two trees with the same content. The first tree is the guide. The second tree puts the principles in three grades of need, for a person who directs coding agents and does not write code. Start with the first group of the second tree if you have little time.

The guides have no program code. A small number of points have pseudocode: plain words in the shape of code. The examples come from one small business, a platform for matched donations, which version 1 also uses.

The order of the guides

Object-oriented programming is first, because most people who wrote software in the past learned it first. Functional programming is second, because its main ideas are easier to see as a contrast with objects. Domain-driven design is last, because it is a design method and not a programming style, and it uses terms from the other two.

Sources

The guides sum up standard material. These are the primary sources for the principles that have a named author.

Object-oriented programming

Functional programming

Domain-driven design

Books with no free copy: Eric Evans, Domain-Driven Design (2003). Gamma, Helm, Johnson and Vlissides, Design Patterns (1994). Vaughn Vernon, Implementing Domain-Driven Design (2013).