# mORMot 2 Software Architecture Design
This index provides a complete reference to all chapters of the mORMot 2 Software Architecture Design documentation.
| Item | Value |
|---|---|
| Framework | Synopse mORMot 2 |
| Document | Software Architecture Design (SAD) |
| Version | 2.0 |
| Last Updated | December 2025 |
| Chapters | 26 (+ Foreword) |
| Based On | mORMot 1.18 SAD by Arnaud Bouchez |
| # | Chapter | File | Topics |
|---|---|---|---|
| 1 | mORMot 2 Overview | mORMot2-SAD-Chapter-01.md |
Framework introduction, Client-Server ORM/SOA, highlights, benefits, FAQ |
| 2 | Architecture Principles | mORMot2-SAD-Chapter-02.md |
MVC, Multi-tier, SOA, ORM, NoSQL/ODM, DDD patterns |
| 3 | Meet mORMot 2 - Unit Structure | mORMot2-SAD-Chapter-03.md |
Source organization, layers, unit naming, dependencies |
| 4 | Core Units | mORMot2-SAD-Chapter-04.md |
mormot.core., Unicode, JSON, TDocVariant, threading |
| # | Chapter | File | Topics |
|---|---|---|---|
| 5 | Object-Relational Mapping | mORMot2-SAD-Chapter-05.md |
TOrm, TOrmModel, field types, relationships, validation |
| 6 | Daily ORM | mORMot2-SAD-Chapter-06.md |
Practical patterns, multi-tier thinking, ORM selection |
| # | Chapter | File | Topics |
|---|---|---|---|
| 7 | Database Layer | mORMot2-SAD-Chapter-07.md |
SQLite3, virtual tables, FTS, ACID, backup |
| 8 | External SQL Database Access | mORMot2-SAD-Chapter-08.md |
mormot.db.sql., ODBC, OleDB, Oracle, PostgreSQL, ZEOS |
| 9 | External NoSQL Database Access | mORMot2-SAD-Chapter-09.md |
MongoDB client, ODM integration, BSON |
| # | Chapter | File | Topics |
|---|---|---|---|
| 10 | JSON and RESTful Fundamentals | mORMot2-SAD-Chapter-10.md |
JSON serialization, REST principles, encoding |
| 11 | Client-Server Architecture | mORMot2-SAD-Chapter-11.md |
Protocols, TRest classes, HTTP servers, threading |
| 12 | Client-Server ORM Operations | mORMot2-SAD-Chapter-12.md |
BATCH mode, caching, synchronization |
| 13 | Server-Side ORM Processing | mORMot2-SAD-Chapter-13.md |
Performance optimization, stored procedures, services |
| # | Chapter | File | Topics |
|---|---|---|---|
| 14 | Client-Server Services via Methods | mORMot2-SAD-Chapter-14.md |
Published methods, parameters, file serving, JWT |
| 15 | Interfaces and SOLID Design | mORMot2-SAD-Chapter-15.md |
SOLID principles, dependency injection, mocking |
| 16 | Client-Server Services via Interfaces | mORMot2-SAD-Chapter-16.md |
Interface-based SOA, WebSockets, callbacks |
| 17 | Cross-Platform Clients | mORMot2-SAD-Chapter-17.md |
FPC, FMX, mobile, code generators |
| # | Chapter | File | Topics |
|---|---|---|---|
| 18 | The MVC Pattern | mORMot2-SAD-Chapter-18.md |
Model-View-Controller, Mustache templates |
| 19 | MVC/MVVM Web Applications | mORMot2-SAD-Chapter-19.md |
Web framework, sessions, controllers, views |
| 20 | Hosting and Deployment | mORMot2-SAD-Chapter-20.md |
Linux, Docker, nginx, scaling, CDN |
| # | Chapter | File | Topics |
|---|---|---|---|
| 21 | Security | mORMot2-SAD-Chapter-21.md |
Authentication, authorization, SSPI, JWT |
| 22 | Scripting Engine | mORMot2-SAD-Chapter-22.md |
QuickJS JavaScript integration |
| 23 | Asymmetric Encryption | mORMot2-SAD-Chapter-23.md |
ECC, certificates, encryption, licensing |
| 24 | Domain-Driven Design | mORMot2-SAD-Chapter-24.md |
DDD patterns, CQRS, repositories, aggregates |
| 25 | Testing and Logging | mORMot2-SAD-Chapter-25.md |
TSynTest, TSynLog, debugging, profiling |
| # | Chapter | File | Topics |
|---|---|---|---|
| 26 | Source Code | mORMot2-SAD-Chapter-26.md |
Licensing, installation, Delphi/FPC setup |
| # | Original Title | Status | Notes |
|---|---|---|---|
| 27 | mORMot Framework Source | Superseded | See Chapters 3, 4, 26 |
| 28 | SynFile Application | Obsolete | Deprecated UI components |
| 29 | Main SynFile Demo Source | Obsolete | SynFile not ported |
| 30 | SWRS Implications | Obsolete | Outdated references |
| mORMot 2 Class | Purpose | Chapter |
|---|---|---|
TOrm |
Base ORM class | 5 |
TOrmModel |
Data model definition | 5 |
TRest |
REST base class | 11 |
TRestServerDB |
SQLite3 REST server | 7, 11 |
TRestHttpServer |
HTTP server wrapper | 11 |
TRestHttpClient |
HTTP client | 11 |
IInvokable |
Service interface base | 16 |
TSynLog |
Logging framework | 25 |
TSynTest |
Testing framework | 25 |
TDocVariant |
JSON/variant documents | 4 |
TMVCApplication |
MVC controller base | 19 |
| Unit Pattern | Purpose | Chapter |
|---|---|---|
mormot.core. |
Core utilities | 4 |
mormot.orm. |
ORM layer | 5, 6 |
mormot.db.sql. |
SQL database access | 8 |
mormot.db.nosql. |
NoSQL database access | 9 |
mormot.rest. |
REST client/server | 11-13 |
mormot.soa. |
Service-oriented architecture | 16 |
mormot.net. |
Network layer | 11 |
mormot.crypt. |
Cryptography | 21, 23 |
mormot.app. |
Application helpers | 20 |
mormot.script. |
Scripting support | 22 |
| mORMot 1 | mORMot 2 | Notes |
|---|---|---|
TSQLRecord |
TOrm |
See Chapter 5 |
TSQLRest |
TRest |
See Chapter 11 |
TSQLModel |
TOrmModel |
See Chapter 5 |
SynCommons.pas |
mormot.core..pas |
See Chapter 3 |
mORMot.pas |
Multiple units | See Chapter 3 |
SynDB.pas |
mormot.db..pas |
See Chapter 8 |
| SpiderMonkey | QuickJS | See Chapter 22 |
mORMotUI |
(deprecated) | Use MVC/web |
ex/ folder in repositoryLast updated: December 2025