We have just released a set of slides introducing ORM, SOA, REST, JSON, MVC, MVVM, SOLID, Mocks/Stubs, Domain-Driven Design concepts with Delphi, and showing some sample code using our Open Source mORMot framework. You can follow the public link on Google Drive! This is a great opportunity to […]
I'm happy to announce that mORMot units are now compiling and working great in 64
bit mode, under Windows.
Need a Delphi XE2/XE3 compiler, of course!
ORM and services are now available in Win64, on both client and
Low-level x64 assembler stubs have been created, tested and optimized.
UI part is also available... that is grid display, reporting (with pdf export and display anti-aliasing), ribbon auto-generation,
SynTaskDialog, i18n... the main SynFile demo just works
Overall impression is very positive, and speed is comparable to 32 bit version (only 10-15% slower).
Speed decrease seems to be mostly due to doubled pointer size, and some less
optimized part of the official Delphi RTL.
But since mORMot core uses its own set of functions (e.g. for JSON serialization, RTTI support or interface calls or stubbing), we were able to release the whole 64 bit power of your hardware.
Delphi 64 bit compiler sounds stable and efficient. Even when working at low
level, with assembler stubs.
Generated code sounds more optimized than the one emitted by FreePascalCompiler - and RTL is very close to 32 bit mode.
Overall, VCL conversion worked as easily than a simple re-build.
Embarcadero's people did a great job for VCL Win64 support, here!
Our downloadable documentation has been enhanced, and contains now a description about the main feature of 1.15 version, i.e. "database agnosticism".
The core database of our mORMot framework uses the SQLite3 library, which is a Free, Secure, Zero-Configuration, Server-less, Single Stable Cross-Platform Database File database engine.
As stated below, you can use any other database access layer, if you
A fast in-memory engine (
TObjectList-based) is included, and can
be used instead or together with the SQLite3 engine.
Or you may be able to access any remote database, and use one or more OleDB, ODBC, ZDBC,
direct Oracle) connections to store your precious ORM
The SQlite3 will be used as the main SQL engine, able to JOIN all those tables, thanks to its Virtual Table unique feature.
(article updated after removal of the
TSQLRecordExternal class type for revision 1.17 - note also that
BATCH process is now directly supported by the framework and converted to
array parameters if available)
The framework documentation was just updated.
The general organization of the SAD document (which is the one to be read in all cases) has been refreshed, and is now separated in smaller chapters.
The new official name has been changed into "Synopse SQLite3/mORMot framework"...
There is a well known syndrome around, against ORM.
Do you remember The Vietnam of Computer Science article?
It is worth reading... and commenting.
Sounds a bit outdated by now. Tempus fugit!
This is a major step for the framework.
Among a lot of new features and bug fixes:
arrays and Record handling, including low-level access and high-level
handling for the ORM part of the framework (using
- Business rules now handled via filtering and validating classes for both our ORM and the Synopse Big Table;
- New full-featured logging classes, with exception handling, stack trace and JSON serialization;
- Custom SQL functions
TSQLRecordRTreeto implement R-Tree virtual tables;
- Batch sequences for adding/updating/deleting multiple records;
- Secure RESTful authentication via per-user light sessions, and per-query signature;
- Define custom Virtual Tables (i.e. access any kind of data from SQL) in Delphi code;
- New HTTP server using fast http.sys kernel-mode server and zip / SynLZ compression;
- SynTaskDialog unit native under Vista,Seven with emulation code under XP/2000 ;
- User Interface automated Generation using standard VCL or proprietary TMS components;
- Documentation completed - more than 600 pages by now, including general User Guide and exhaustive Technical Reference;
- Updated SQLite3 database engine to version 22.214.171.124;
- Numerous bug fixes, speed and feature enhancements (including in the PDF and other UI-related units).
Open Source project, for Delphi 6 up to XE, licensed under a MPL/LGPL/GPL tri-license.
An R-Tree is a special index that is designed for doing range queries.
R-Trees are most commonly used in geospatial systems where each entry is a rectangle with minimum and maximum X and Y coordinates. Given a query rectangle, an R-Tree is able to quickly find all entries that are contained within the query rectangle or which overlap the query rectangle.
This idea is easily extended to three dimensions for use in CAD systems. R-Trees also find use in time-domain range look-ups. For example, suppose a database records the starting and ending times for a large number of events. A R-Tree is able to quickly find all events, for example, that were active at any time during a given time interval, or all events that started during a particular time interval, or all events that both started and ended within a given time interval. And so forth. See http://www.sqlite.org/rtree.html
Since the 2010-06-25 source code repository update, the RTREE extension is
compiled by default within all supplied
.obj files of the
A dedicated ORM class, named
TSQLRecordRTree, is available to
create such tables. It inherits from
TSQLRecordVirtual, like the
other virtual tables types (e.g.
our custom virtual
The SQlite3 engine has ability to create Virtual Tables from code. From the perspective of an SQL statement, the virtual table object looks like any other table or view. But behind the scenes, queries from and updates to a virtual table invoke callback methods on the virtual table object instead of reading and writing to the database file.
The virtual table mechanism allows an application to publish interfaces that
are accessible from SQL statements as if they were tables. SQL statements can
in general do anything to a virtual table that they can do to a real table,
with the following exceptions:
- One cannot create a trigger on a virtual table.
- One cannot create additional indices on a virtual table. (Virtual tables can have indices but that must be built into the virtual table implementation. Indices cannot be added separately using
- One cannot run
ALTER TABLE ... ADD COLUMN commands against a
- Particular virtual table implementations might impose additional constraints. For example, some virtual implementations might provide read-only tables. Or some virtual table implementations might allow
DELETE but not
UPDATE. Or some virtual table
implementations might limit the kinds of
UPDATEs that can be
Example of virtual tables, already included in the SQLite3 engine,
are FTS or
RTREE tables. A
custom virtual table might represent in-memory data structures (like
TSQLVirtualTableJSON, TSQLVirtualTableBinary). Or it might
represent a view of data on disk that is not in the SQLite3 format
TSQLVirtualTableLog). Or the application might compute the
content of the virtual table on demand.
Thanks to the generic implementation of Virtual Table in SQLite3,
you can use such tables in your SQL statement, and even safely execute a
SELECT statement with
JOIN or custom functions,
mixing normal SQLite3 tables and any other Virtual Table.
A dedicated mechanism has been added to the framework, beginning with revision 1.13, in order to easily add such virtual tables with pure Delphi code, just by inheriting some classes.