This folder hosts the source code of the mORMot Open Source framework, version 2.
The framework source code is licensed under a disjunctive three-license giving the user the choice of one of the three following sets of free software/open source licensing terms:
- Mozilla Public License, version 1.1 or later (MPL);
- GNU General Public License, version 2.0 or later (GPL);
- GNU Lesser General Public License, version 2.1 or later (LGPL), with linking exception of the FPC modified LGPL. This allows the use of our code in as wide a variety of software projects as possible, while still maintaining copy-left on code we wrote.
See the full licensing terms in the root folder of this repository for more information.
The source code tree is split into the following sub-folders:
corefor low-level shared components like text, RTTI, JSON, compression;libfor external third-party libraries like zlib or openssl;cryptfor efficient symmetric/asymmetric cryptography;netfor the client/server communication layer;dbfor our SQLite3 kernel, and SQL/NoSQL direct access;restfor the RESTful client/server processing;ormfor high-level ORM features;soafor high-level SOA features;appfor hosting (micro)services/daemons and applications;uifor VCL/LCL User Interface oriented components;scriptfor the supported (java)script engines;dddfor Domain-Driven-Design related code;miscfor miscellaneous reusable units;toolsfor some useful tools tied to our framework.
By convention:
- Unit names are lowercased, to allow simple access on POSIX or Windows file systems;
- Unit names are dot-separated, and start with the
mormot.prefix; - Unit names follow their location in the
srcsub folder, e.g.mormot.core.json.pasis located in thesrc/corefolder.
In respect to mORMot 1.18, some confusing/deprecated naming like TSQLRecord or TSQLRest prefix have been renamed as TOrm and TRest, since our ORM is not SQL-only, but works e.g. with NoSQL engines like MongoDB.
Generally speaking, we followed the Kotlin good naming rules:
When using an acronym as part of a declaration name, capitalize it if it consists of two letters (IOStream); capitalize only the first letter if it is longer (XmlFormatter, HttpInputStream).
Some types have been changed or enhanced:
TSQLRawBlobrenamed asRawBlob;RawUtf8is an alias toSystem.UTF8Stringtype so you can use either of them in your code.
Note that the PUREMORMOT2 conditional can be defined for your project, to disable the type names backward compatible redirection enabled by default. It may be a good idea, because we may relax the backward compatibility in a few years.
To clean the design and enhance source maintainability, some units have associated *.inc source files:
- To regroup Operating-System specific code - e.g.
mormot.core.os.posix.incto include non-Windows OS calls inmormot.core.os.pas; - To regroup Compiler-specific code - e.g.
mormot.core.rtti.fpc.incto include FPC RTTI inmormot.core.rtti.pas; - To regroup CPU-specific (asm) code - e.g.
mormot.crypt.core.asmx64.incto includex86_64assembly inmormot.crypt.core.pas.