First Principles of the Web
Graphs are not the thing, they are the thing that gets us to the thing
DRAFT 0.1 · atomgraph.com · GitHub · X · LinkedIn
Preface
There is exactly one way to build applications that are of the web rather than merely on it, and it is data-centric, declarative, and graph-based. “Exactly one” is relative to rules imposed by the web itself. This book derives those rules and examines the consequences of rejecting them. It scores today’s JSON APIs, JavaScript frameworks, and compile-to-browser toolchains against the same rules; each turns out to be a partial rediscovery of this way or a detour from it.
The book is structured as a derivation: every statement in it is a definition quoted from the web’s own specifications, a proposition that follows from previous statements, or an observation you can verify against the deployed web. If you find a statement that is none of the three, the book has a bug; please report it. There is one deliberate exception: Chapter 5 makes a bridge from the web to the formalism that is argued but not proved. If you want to reject the book’s conclusion, that is the step to reject. The book is written for people who build for the web; it assumes no mathematics beyond sets and functions. Chapter 2 explains the method; Appendix A covers notation and reading tracks.
Underneath the method is a choice of genre. The web is mostly treated as software engineering, a craft of frameworks and taste; this book treats it as a science, an object whose structure can be derived, proved, and tested by prediction rather than surveyed and preferred. Chapter 21 returns to it once the scores are in.
One more thing. This book is built to practice what it derives. Its canonical edition is designed as an application of that very kind, in which every proposition is a resource with its own address. That makes the edition an instance of the book’s own thesis. As of this writing, that edition is still under construction.
The Argument in One Page
A web application is two functions. read turns a request and the state of the world into a document; write turns a request and a state into a new state. That is HTTP restated, and every framework ever shipped is an implementation detail of it.
Strip any page (a newspaper, a dashboard) and the same skeleton emerges: first style, then arrangement, then selection, leaving state. Every read can therefore be factored as present ∘ arrange ∘ select (one factor per stripped layer). The factorization matters only if the factors are separate, declarative, substitutable, and addressable.
Ask what State must be, and the requirements come from the web itself. State must host any domain. It must compose across parties who have never met — which forces merging by union over facts that carry their own meaning. Its names must work globally. The smallest fact meeting all three requirements is a triple: two global names and a value that may itself be such a name. Any minimal model meeting the requirements is isomorphic to this one: sets of triples, merged by union. That is a uniqueness theorem; to reject its conclusion you must fault a step of the proof or reject a requirement.
The resulting structure maps to RDF, SPARQL, XSLT, and CSS, standardized between 1996 and 2014 and later abandoned — abandoned, the book will argue, not refuted. The book then audits current technologies against the derived requirements, examines the compensating industry that grows where a requirement is not met, and ends with one table scoring every stack, the derived one included. The components can then be combined into a complete architecture without introducing a new standard: a generic engine whose behavior is specialized by data rather than application-specific code. This matters again now: software agents need machine-consumable state, and the industry is building new integration layers to provide it.
If the derivation holds, the next web needs no inventing; it needs only to be put to use. The rest of this book is the proof, the scores, and the evidence.