This version 2 replaces mORMot 1.18 which is now in maintainance-only mode. Consider using mORMot 2 for any new or maintainable project.
----------------------------------------------
我是菜鸟,己经搞了十多年了,但是我仍然很菜。
Coming From Version 2 Why Rewrite a Working Solution? The mORMot framework stayed in revision 1.18 for years, and is was time for a full refactoring.
The main refactoring points tried to better follow SOLID principles:
Switch to a more rigorous versioning policy, with regular releases; Split main big units (, ) into smaller scope-refined units;SynCommons.pasmORMot.pas OS- or compiler- specific code separated to ease evolution; Rename confusing types, e.g. into , into ...;TSQLRecordTOrmTSQLRestTRest Favor composition over inheritance, e.g. class split into proper REST/ORM/SOA classes - and folders;TRest Circumvent compiler internal errors on Delphi, e.g. changed untyped const/var changed into pointers, or reduced the units size; Full rewrite of the whole RTTI, JSON and REST cores, for better efficiency and maintainability; Optimization of the framework kernel, using AVX2 if available;asm New features like OpenSSL, libdeflate or QuickJS support; New asynchronous HTTP and WebSockets servers, with optional HTTPS/TLS support via Let's Encrypt; Introduce modern syntax like generics or enumerators - but optional for compatibility. We therefore created a whole new project and repository, since switching to version 2 induced some backward uncompatible changes. New unit names were used, to avoid unexpected collision issues during migration, or if 1.18 is to remain installed for a compatibility project.
Upgrade In Practice Quick Steps when upgrading from a previous 1.18 revision:
Note all units where split and renamed, and some breaking changes introduced for enhanced features, therefore a direct update is not possible - nor wanted
Switch to a new folder, e.g. #\lib2 instead of #\lib
Download latest 2.# revision files as stated just above
Change your references to mORMot units:
All unit names changed, to avoid collision between versions; Look at the samples to see the main useful units. Consult the documentation about breaking changes from 1.18, mainly: Units refactoring (see point 4 above); Types renamed in mode;PUREMORMOT2 Delphi 5-6 and Kylix compatibility removed; BigTable, LVCL, RTTI-UI deprecated.
----------------------------------------------
我是菜鸟,己经搞了十多年了,但是我仍然很菜。