2026-05-06 · By David Buch
Why I wrote this book
For most of my career I have learned Delphi the same way most working developers do — one codebase at a time, mostly by reading other people’s code, occasionally by reading documentation, and almost never by reading a book end to end. The reason is straightforward. The available Delphi books split cleanly into two camps. On one side sit the introductory texts that teach you syntax and stop. On the other sit the dense reference works aimed at experts who already know what they need. Almost nothing covers the long middle — the years where you are writing real software, making real choices, and the choices you make today determine how painful the next four years will feel.
That is the territory The Delphi Way tries to fill.
What changed
I have spent the past decade writing production Object Pascal across the desktop, mobile, web (via pas2js), and PostgreSQL stack. Most of what I learned that mattered was not in the language — it was in the conventions. How to lay out a unit so the reader can scan it. Which patterns scale and which collapse. When to wrap a thing in a try block, when to fail loud, when to swallow a destructor exception. The little compounding decisions that determine whether the codebase reads cleanly six months later.
Most of those decisions are unwritten. They live in the heads of the senior people on the team. New developers absorb them by osmosis if they are lucky and by hard-won mistake if they are not. There is no book.
So I wrote one.
Eighty-one chapters
The book is sequenced. Part I assumes you have never written a program before. Part II teaches the language. Part III teaches object-oriented programming the way modern Delphi expects you to write it. Part IV puts that to work in real applications. Part V covers writing components and IDE wizards. Part VI takes you cross-platform — macOS, iOS, Android, Linux. Part VII builds a small web framework from scratch in pas2js to teach the language by building a thing in it. Part VIII is architecture — dependency injection, plugin hosts, design patterns. Parts IX and X cover the database stack — first the connectivity layer, then a deep dive into PostgreSQL itself. Part XI is for developers coming from C# or JavaScript and for projects that need to interop with Python or C. Part XII is the productionising work — testing, CI, deployment, monitoring, the catalogue of failures that will eventually find you.
Opinions
The book is opinionated. Every listing follows the same set of rules — UPPERCASE control flow, lowercase declarators, no Exit, no Inc or Dec on properties, no anonymous methods outside their two narrow carve-outs, no bare F-fields outside the constructor and destructor. The rules are consistent because consistency is what lets a reader pick up an arbitrary listing and read it without re-learning the dialect. You do not have to memorise the rules. The listings teach them by example.
Companion code
Every code-bearing chapter ships with a runnable Delphi 13 project. The chapter explains; the project compiles. They are kept in sync; they are the same code. Get the archive here.
What is next
Errata will appear on this site as readers find them — this is a first edition and there will be mistakes. Future posts on this blog will cover specific habits, specific patterns, and the inevitable second-edition revisions. If you have read the book and want to write back, my address is thedelphiway@davidbuch.com.
Thank you for reading.