mORMot 2 Current State

Take a look at the mORMot 2 Slides we published last weeks.

The main refactoring points tried to better follow SOLID principles:

  • Switch to Semantic Versioning - see
  • Split main big units (SynCommons.pas, mORMot.pas) into smaller scope-refined units;
  • OS- or compiler- specific code separated to ease evolution;
  • Rename confusing types (e.g. TSQLRecord into TOrm, TSQLRest into TRest...);
  • Favor composition over inheritance (e.g. TRest class split into proper REST/ORM/SOA classes - and folders);
  • Rewrite some code to avoid internal errors on Delphi (e.g. untyped const/var changed into pointers);
  • Tools to leverage MicroServices coding and administration; - see this forum post
  • Add MVC support for SOA rich clients on Delphi VCL and Lazarus LCL;
  • Introduce high-level non-visual TComponent version of our classes for a more RAD approach.

Some mORMot 1.18 features won't be available in mORMot 2:

  • Delphi 5-6 and Kylix compatibility was removed;
  • BigTable, LVCL, RTTI-UI are now deprecated.

On purpose, those old and not used features won't be missed. If you really need them, stick to mORMot 1.18, or propose your own refactoring as mORMot 2 pull requests!

The Test Phase

Now, since we have the main code at hand, we are entering the testing/validation phase.

We will populate the /test/ sub-folder of the repository with all existing regression tests from mORMot 1.18:

  • In practice, the huge SynSelfTests.pas unit will be split into smaller units.
  • We will keep all the existing tests, which are already proven;
  • It will also ensure we have the expected backward compatibility from mORMot 1.18;
  • Some new tests will emerge, to enhance the test coverage.

We kept the testing to the last phase of our mORMot 2 conversion. It helped focusing on the refactoring. We will rely on the huge set of regression tests from mORMot 1.18 to validate our work.

Most errors (there will be) are expected to be found in the new part of the code, i.e. JSON and RTTI. Those two have been deeply rewritten, optimized, and redesigned, so we will see how they behave with our new code base!