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 […]
Tag - VirtualTable
2014-04-18
Introducing mORMot's architecture and design principles
2014-04-18. Open Source › mORMot Framework
2013-03-07
64 bit compatibility of mORMot units
2013-03-07. Open Source › mORMot Framework
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
server sides.
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
great!
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!
2012-07-24
SQLite3-powered, not SQLite3-limited
2012-07-24. Open Source › mORMot Framework

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
wish.
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, TDataSet
, (or
direct Oracle) connections to store your precious ORM
objects.
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
bound
array parameters if available)
2011-08-10
Framework documentation updated for revision 1.15
2011-08-10. Open Source › mORMot Framework

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"...
2011-07-02
Is Object-Relational Mapping the Paradise of Computer Science?
2011-07-02. Open Source › 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!
2011-06-05
Synopse SQLite3 Framework 1.13
2011-06-05. Open Source › mORMot Framework
This is a major step for the framework.
Among a lot of new features and bug fixes:
- Dynamic
arrays and Record handling, including low-level access and high-level
handling for the ORM part of the framework (using
TDynArray
wrapper); - 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
and
TSQLRecordRTree
to 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 3.7.6.3;
- 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.
2011-06-02
TSQLRecordRTree to implement R-Tree virtual tables
2011-06-02. Open Source › mORMot Framework
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
framework.
A dedicated ORM class, named TSQLRecordRTree
, is available to
create such tables. It inherits from TSQLRecordVirtual
, like the
other virtual tables types (e.g. TSQLRecordFTS3
or
our custom virtual
tables).
2011-05-14
Virtual Tables in the SQLite3 framework
2011-05-14. Open Source › mORMot Framework

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 CREATE INDEX
statements.)
- One cannot run ALTER TABLE ... ADD COLUMN
commands against a
virtual table.
- 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 INSERT
or
DELETE
but not UPDATE
. Or some virtual table
implementations might limit the kinds of UPDATE
s that can be
made.
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
(e.g. 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.