The document provides an overview of Arnaud Bouchez and his work on mORMot and SynPDF. It discusses mORMot version 1.18 and its features like being an ORM, supporting SOA, MVC, and REST. It then summarizes the results of a survey conducted on refactoring mORMot, including separating it into smaller units, using semantic versioning, dropping old compiler support, and moving to GitHub. It previews the structure and goals of the new mORMot 2 library.
27. mORMot 2 Survey
After 10 years, we wanted to
• Switch to Semantic Versioning
• Split code into SOLID units
• Favor composition
• Get rid of Delphi 5/Kylix
• Focus on maintainability
29. mORMot 2 Survey
March-June 2020: Google Survey
• Which refactoring do you agree with?
• About source code management
• Which Delphi revision to support?
30. mORMot 2 Survey
March-June 2020: Google Survey
• Which refactoring do you agree with?
• About source code management
• Which Delphi revision to support?
• … is a full rewrite worth it?
31. mORMot 2 Survey
March-June 2020: Google Survey
• Which refactoring do you agree with?
• About source code management
• Which Delphi revision to support?
• … is a full rewrite worth it?
157 Responses
32. mORMot 2 Survey
Which refactoring ?
Switch to semantic versioning
Separate big units
Composition over inheritance
Avoid Delphi Internal Errors
Focus on FPC as main target
Drop Delphi 5 and Kylix support
Drop Delphi support but latest
Reformat HTML doc into small pages
34. mORMot 2 Survey
Which refactoring ?
Switch to semantic versioning 69%
Separate big units 78%
Composition over inheritance 59%
Avoid Delphi Internal Errors 56%
Focus on FPC as main target 41%
Drop Delphi 5 and Kylix support 84%
Drop Delphi support but latest 25%
Reformat HTML doc into small pages 42%
35. mORMot 2 Survey
Which refactoring ?
Switch to semantic versioning 69%
Separate big units 78%
Composition over inheritance 59%
Avoid Delphi Internal Errors 56%
Focus on FPC as main target 41%
Drop Delphi 5 and Kylix support 84%
Drop Delphi support but latest 25%
Reformat HTML doc into small pages 42%
36. mORMot 2 Survey
Source Code Management
Keep as-is: Fossil + GitHub mirror
Switch to GitHub and our blog/forum
Switch to GitHub only
43. mORMot 2 Survey
Which Delphi revision?
Focus on
Delphi 10.3 / latest 70%
Keep compatible with
Delphi 7 18%
Delphi 2007 13%
Maintain compatibility with others
44. mORMot 2 Survey
Other Wishes
• Delphi Linux Support
• Focus on FPC
• More real world examples (DDD)
• Separate OS specific
• Make SynLog easier to use
45. mORMot 2 Survey
What we agreed on
• Semantic Versioning and releases
• Separate big units
• Composition over inheritance
• GitHub + https://synopse.info
• Main Delphi targets: latest 10.x + 7/2007
• FPC 3.2 / trunk premium support
• Eventual Delphi Linux
46. mORMot 2 Survey
What we agreed on
• Naming should be more consistent
TSQLRecord TSQLTableJson TSQLRest
• First iteration should be
backward compatible
(with some PUREMORMOT2 conditional)
• Later on, we may move forward
54. Semantic Versioning 2.0.0
From https://semver.org
MAJOR.MINOR.PATCH
increment
• MAJOR version
when you make incompatible API changes,
• MINOR version
when you add functionality
in a backwards compatible manner, and
• PATCH version
when you make backwards compatible bug fixes
55. Semantic Versioning 2.0.0
From https://semver.org
MAJOR.MINOR.PATCH
Real releases for production code
mORMot stuck to 1.18 since years
61. Separate Big Units
• mormot.core.*.pas
• mormot.db.*.pas
• mormot.ddd.*.pas
• mormot.lib.*.pas
• mormot.net.*.pas
• mormot.orm.*.pas
• mormot.rest.*.pas
• mormot.soa.*.pas
62. Separate Big Units
• mormot.core.*.pas /src/core
• mormot.db.*.pas /src/db
• mormot.ddd.*.pas /src/ddd
• mormot.lib.*.pas /src/lib
• mormot.net.*.pas /src/net
• mormot.orm.*.pas /src/orm
• mormot.rest.*.pas /src/rest
• mormot.soa.*.pas /src/soa
63. Separate Big Units
SynCommons.pas SynTable.pas
• mormot.core.base.pas
• mormot.core.os.pas
• mormot.core.unicode.pas
• mormot.core.text.pas
64. Separate Big Units
SynCommons.pas SynTable.pas
• mormot.core.rtti.pas
• mormot.core.data.pas
• mormot.core.perf.pas
• mormot.core.json.pas
• mormot.core.buffers.pas
65. Separate Big Units
SynCommons.pas SynTable.pas
• mormot.core.datetime.pas
• mormot.core.variants.pas
• mormot.core.search.pas
• mormot.core.threads.pas
• mormot.db.core.pas
66. Separate Big Units
SynCrypto.pas SynEcc.pas
• mormot.core.crypto.pas
• mormot.core.jwt.pas
• mormot.core.ecc256r1.pas
• mormot.core.ecc.pas
67. Separate Big Units
Very Specific / Low-Level Code
• mormot.core.base.asmx64.inc
• mormot.core.base.asmx86.inc
• mormot.core.crypto.asmx64.inc
• mormot.core.crypto.asmx86.inc
68. Separate Big Units
Very Specific / Low-Level Code
• mormot.core.os.windows.inc
• mormot.core.os.posix.inc
• mormot.core.rtti.delphi.inc
• mormot.core.rtti.fpc.inc
69. Separate Big Units
SynCrtSock.pas SynBiDirSock.pas
• mormot.net.sock.pas
• mormot.net.http.pas
• mormot.net.client
• mormot.net.server
• mormot.net.asynch.pas
• mormot.net.websock.pas
70. Separate Big Units
Very Specific / Low-Level Code
• mormot.net.sock.windows.inc
• mormot.net.sock.posix.inc
74. Separate Big Units
mORMot.pas
• mormot.rest.core.pas
• mormot.rest.client.pas
• mormot.rest.server.pas
• mormot.rest.memserver.pas
75. Separate Big Units
SynDB*.pas SynMongoDB units
• mormot.db.sql.*.pas
• mormot.db.raw.*.pas
• mormot.db.rad.*.pas
• mormot.db.nosql.*.pas
• mormot.db.proxy.pas
76. Separate Big Units
SynDB*.pas units
• mormot.db.sql.odbc.pas
• mormot.db.sql.oledb.pas
• mormot.db.sql.oracle.pas
• mormot.db.sql.postgres.pas
• mormot.db.sql.sqlite3.pas
• mormot.db.sql.zeos.pas
High Level Direct SQL Access
77. Separate Big Units
SynDB*.pas units
• mormot.db.raw.odbc.pas
• mormot.db.raw.oledb.pas
• mormot.db.raw.oracle.pas
• mormot.db.raw.postgres.pas
• mormot.db.raw.sqlite3.pas
Low Level Raw SQL Access
78. Separate Big Units
SynDB*.pas units
• mormot.db.rad.pas
• mormot.db.rad.bde.pas
• mormot.db.rad.firedac.pas
• mormot.db.rad.unidac.pas
• mormot.db.rad.nexusdb.pas
Delphi DB.pas SQL Access
79. Separate Big Units
mORMotDB mORMotSQLite3
• mormot.orm.sqlite3.pas
• mormot.orm.sql.pas
• mormot.rest.sqlite3.pas
ORM for SQL
with a SQLite3 kernel
85. Separate Big Units
Work In Progress
• Refactoring into smaller units
takes a lot of time and efforts
• Some units are just about reformatting
• Full Rewrite of JSON, RTTI
• Eventually Secured by our Test Phase
86. Separate Big Units
Work In Progress
• /src/app MicroServices and Daemons
• /src/ddd Domain/Kingdom Driven Design
• /src/mvc MVC Web
• Full Unit and Regression Tests
Expected to be at mORMot 1.18 Feature Set
end of December 2020
87. Separate Big Units
Work In Progress
• /src/app MicroServices and Daemons
• /src/ddd Domain/Kingdom Driven Design
• /src/mvc MVC Web
• Full Unit and Regression Tests
Expected to be at mORMot 1.18 Feature Set
end of December 2020
88. mORMot 2 Units
• Separate Big Units
• Consistent Naming
• Composition over Inheritance
95. Composition Over Inheritance
To follow SOLID Principles
• Single Responsibility
• Open Close
• Liskov Substitution
• Interface Segregation
• Dependency Inversion
103. FPC Premium Support
Spent 95% of time in Lazarus
writing mORMot 2 units
Running 5% Delphi
• for integration tests on Delphi
mainly Delphi 7 / 2007 / XE4 / 10.3 CE
• for debugging
Delphi debugger is vastly superior than gdb
107. FPC Premium Support
100% Open Source Chain
• mORMot MPL / LGPL / GPL
• Lazarus or VSCode as IDE
• FPC as compiler
• Linux as Server and Dev OS
… continue to use Delphi on Windows
but you have alternatives
110. Roadmap
• Feature-equal to mORMot 1.18
But deprecating Delphi 5, Kylix, LVCL,
SynBigTable, RTTI-Gen UI, oldest SyNode
111. Roadmap
• Feature-equal to mORMot 1.18
eventual, with no priority order:
• WebSockets Event-Driven Server
• ORM Enhancements (attributes, PODO)
• mormot.core.os.pas for Delphi Linux
• TMS WebCore Client Support
112. Roadmap
• Feature-equal to mORMot 1.18
eventual, with no priority order:
• DDD Project Wizards
• Administration Remote UI
• Documentation Refactoring
113. Roadmap
• Feature-equal to mORMot 1.18
may be :
• Better VCL/FMX/LCL integration
• GraphQL Reporting/Query API
• mormot.core.os.pas for Delphi mobile
(not only as client, but with more features)
• Any external contribution