One year ago, we published a set of slides about the main concepts implemented by our framework. Mainly about ORM (and ODM), NoSQL, JSON, SOA, MVC (and MVVM), SOLID, DDD, CQRS and some patterns like Stubs, Mocks, Factory, Repository, Unit-Of-Work. Worth a look, if you want to find out the benefits […]
Tag - mORMot
2015-05-18
CQRS Persistence Service of any DDD object with mORMot
2015-05-18. Open Source › mORMot Framework
We introduced DDD concepts some time ago, in a series of articles in this blog. At that time, we proposed a simple way of using mORMot types to implement DDD in your applications. But all Domain Entitities being tied to the framework TSQLRecord class did appear as a limitation, breaking the […]
2015-05-14
Using TSynLog with a lot of threads? PYou should better upgrade your source
2015-05-14. Open Source › mORMot Framework
We identified and fixed today several issues which may affect applications creating a lot of threads (i.e. not using a thread pool). The symptom was an unexpected access violation, when you reach a multiple of 256 threads count. You should better upgrade to at least revision 1.18.1351 if your […]
2015-04-12
Why Transmitting Exceptions in SOA services is not a good idea
2015-04-12. Open Source › mORMot Framework
Usually, in Delphi application (like in most high-level languages), errors
are handled via exceptions. By default, any Exception
raised on the server side, within an interface
-based service
method, will be intercepted, and transmitted as an error to the client side,
then a safe but somewhat obfuscated EInterfaceFactoryException
will be raised on the client side, containing additional information serialized
as JSON.
You may wonder why exceptions are not transmitted and raised directly on the client side, with our mORMot framework interface-based services, as if they were executed locally.
We will now detail some arguments, and patterns to be followed.
2015-03-31
ORM Master/Slave Replication
2015-03-31. Open Source › mORMot Framework
As stated during
TSQLRecord fields definition, the ORM is able to maintain a revision
number for any TSQLRecord
table, so that it the table may be
easily synchronized remotely by another TSQLRestServer
instance.
If you define a TRecordVersion
published property, the ORM core
will fill this field just before any write with a monotonically increasing
revision number, and will take care of any deletion, so that those
modifications may be replayed later on any other database.
This synchronization will work as a strict master/slave replication
scheme, as a one-way on demand refresh of a replicated table.
Each write operation on the master database on a given table may be easily
reflected on one or several slave databases, with almost no speed nor storage
size penalty.
2015-03-17
Framework Documentation Enhanced By Links
2015-03-17. Open Source › mORMot Framework
The mORMot framework documentation, in its HTML online form, has been enhanced to include links to almost of the code symbols. In fact, the latest version of our SynProject tool will search for code symbols (types, methods, constants, functions): Everywhere in the API Reference pages; In the text […]
2015-03-01
ShowCase: mORMot with FPC on Android
2015-03-01. Open Source › mORMot Framework
I just received a mail from Alfred (aka Alf in the source code), which did a lot of work to let our little mORMot compiles and run with FPC, especially under Linux, and also with an ARM processor. Hello Arnaud, A nice surprise ... Sample 2 native on Android !!!! See picture. Works 100% !!! […]
2015-01-15
AES-NI enabled for SynCrypto
2015-01-15. Open Source
Today, we committed a new patch to enable AES-NI hardware acceleration to our SynCrypto.pas unit. Intel® AES-NI is a new encryption instruction set that improves on the Advanced Encryption Standard (AES) algorithm and accelerates the encryption of data on newer processors. Of course, all this is […]
2015-01-10
mORMot under Linux thanks to FPC
2015-01-10. Open Source › mORMot Framework
You can use the FreePascal Compiler (FPC) to compile the mORMot framework source code, targetting Windows and Linux.
Linux is a premium target for cheap and efficient server Hosting. Since mORMot has no dependency, installing a new mORMot server is as easy as copying its executable on a blank Linux host, then run it. No need to install any framework nor runtime. You could even use diverse operating systems (several Linux or Windows Server versions) in your mORMot servers farm, with minimal system requirements, and updates.
We will now see how to write your software with Linux-compiling in mind, and also give some notes about how to install a Linux Virtual Machine with Lazarus on your Windows computer, compiling both FPC and Lazarus from their SVN latest sources!
2014-12-31
2015: the future of mORMot is BigData
2014-12-31. Open Source › mORMot Framework
How would be 2015 like for our little rodents?
Due to popular request of several users of mORMot, we identified and
designed some feature requests dedicated to BigData process.
In fact, your data is the new value, especially if you propose
SaaS (Software As A Service)
hosting to your customers, with a farm of mORMot
servers.
Recent Linux support for mORMot servers, together with the
high performance and installation ease of our executable, open the gate to
cheap cloud-based hosting.
As a consequence, a lot of information would certainly be gathered by
your mORMot servers, and a single monolithic database
is not an option any more.
For mORMot solutions hosted in cloud, a lot of data may be generated. The default SQLite3 storage engine may be less convenient, once it reaches some GB of file content. Backup becomes to be slow and inefficient, and hosting this oldest data in the main DB, probably stored on an expensive SSD, may be a lost of resource. Vertical scaling is limited by hardware and price factors.
This is were data sharding comes into scene.
Note that sharding is not replication/backup, nor clustering, nor just
spreading. We are speaking about application-level data splitting, to ease
maintenance and horizontal scalability of mORMot servers.
Data sharding could already be implemented with mORMot servers,
thanks to TSQLRestStorage
:
- Using
TSQLRestStorageExternal
: any table may have its own external SQL database engine, may be in its separated DB server; - Using
TSQLRestStorageMongoDB
: any table may be stored on a MongoDB cluster, with its own sharding abilities; - Using
TSQLRestStorageRemote
: each table may have its own remote ORM/REST server.
But when data stored in a single table tends to grow without limit, this
feature is not enough.
Let's see how the close future of mORMot looks like.
2014-11-28
ODM magic: complex queries over NoSQL / MongoDB
2014-11-28. Open Source › mORMot Framework
You know that our mORMot is able to access directly any MongoDB database engine, allowing its ORM to become an ODM, and using NoSQL instead of SQL for the query languages.
But at mORMot level, you could share the same code between your
RDBMS and NoSQL databases.
The ORM/ODM is able to do all the conversions by itself!
Since we have just
improved this feature, it is time to enlighten its current status.
2014-11-23
Breaking change: New SynLog and SynTests unit extracted from SynCommons.pas
2014-11-23. Open Source › Open Source libraries
In order to enhance code modularity, we extracted logging and testing features from SynCommons.pas. Discover the new SynLog.pas and SynTests.pas units! Documentation has been updated to reflect the changes. This is a breaking change... Ensure you add SynLog and/or SynTests to your uses clauses, just […]
2014-11-20
BeDelphi 2014 Slides
2014-11-20. Open Source › mORMot Framework
We just finished our Be-Delphi 2014 sessions and drank our last beers, so here we are.
I published some slides for this great event.
2014-11-18
HTTP remote access for SynDB SQL execution
2014-11-18. Open Source › Open Source libraries
For mORMot, we developed a fully feature direct access layer to any RDBMS, implemented in the SynDB.pas unit.
You can use those SynDB
classes to execute any SQL statement,
without any link to the framework ORM.
At reading, the resulting performance is much higher than using the standard
TDataSet
component, which is in fact a true performance
bottleneck.
It has genuine features, like
column access via late-binding,
an innovative ISQLDBRows
interface, and ability to directly access
the low-level binary buffers of the database clients.
We just added a nice feature to those classes: the ability to access
remotely, via plain HTTP, to any SynDB
supported database!
2014-11-14
BREAKING CHANGE - TSQLRecord.ID primary key changed to TID: Int64
2014-11-14. Open Source › mORMot Framework
Up to now, the TSQLRecord.ID
property was defined in
mORMot.pas
as a plain
PtrInt
/NativeInt
(i.e. Integer
under
Win32), since it was type-cast as pointer for TSQLRecord
published
properties.
We introduced a new TID
type, so that the ORM primary key would
now be defined as Int64
.
All the framework ORM process relies on the TSQLRecord
class.
This abstract TSQLRecord
class features a lot of built-in methods,
convenient to do most of the ORM process in a generic way, at record level.
It first defines a primary key field, defined as ID:
TID
, i.e. as Int64
in mORMot.pas
:
type TID = type Int64; ... TSQLRecord = class(TObject) ... property ID: TID read GetID write fID; ...
In fact, our ORM relies now on a Int64
primary key, matching
the SQLite3 ID
/RowID
primary key.
This primary key will be used as RESTful resource
identifier, for all CRUD operations.
Automatic TSQLRecord memory handling
2014-11-14. Open Source › mORMot Framework
Working with objects is pretty powerful, but requires to handle manually the
created instances life time, via try
.. finally
blocks. Most of the time, the TSQLRecord
life time would be very
short: we allocate one instance on a local variable, then release it when it
goes out of scope.
If we take again the TSQLBaby
sample, we may write:
function NewMaleBaby(Client: TSQLRest; const Name,Address: RawUTF8): TID; var Baby: TSQLBaby; // store a record begin Baby := TSQLBaby.Create; try Baby.Name := Name; Baby.Address := Address; Baby.BirthDate := Date; Baby.Sex := sMale; result := Client.Add(Baby); finally Baby.Free; end; end;
To ease this pretty usual pattern, the framework offers some kind of
automatic memory management at TSQLRecord
level:
function NewMaleBaby(Client: TSQLRest; const Name,Address: RawUTF8): TID; var Baby: TSQLBaby; // store a record begin TSQLBaby.AutoFree(Baby); // no try..finally needed! Baby.Name := Name; Baby.Address := Address; Baby.BirthDate := Date; Baby.Sex := sMale; result := Client.Add(Baby); end; // local Baby instance will be released here
2014-11-05
mORMot documentation as web
2014-11-05. Open Source › mORMot Framework
We have enhanced our SynProject Open Source tool, so that it is now able to generate its documentation as HTML, in addition to doc/pdf documents. You can take a look at this web page. It contains the whole SAD 1.18 content. The pdf is more than 16 MB, whereas this html page is only 6MB. Note that […]
2014-10-24
MVC/MVVM Web Applications
2014-10-24. Open Source › mORMot Framework
We almost finished implementing a long-standing feature request,
introducing MVC / MVVM for Web Applications (like RubyOnRails) in mORMot.
This is a huge step forward, opening new perspectives not only to our
framework, but for the Delphi community.
In respect to the existing
MVC frameworks for Delphi, our solution is closer to Delphi On Rails (by the
convention-over-configuration
pattern) than the Delphi MVC
Framework or XMM.
The mORMot point of view is unique, and quite powerful,
since it is integrated with other parts of our framework, as its ORM/ODM or interface-based services.
Of course, this is a work in progress, so you are welcome to put your feedback,
patches or new features!
We will now explain how to build a MVC/MVVM web application using
mORMot, starting from the "30
- MVC Server" sample.
First of all,
check the source in our GitHub repository: two .pas
files, and
a set of minimalist Mustache
views.
This little web application publishes a simple BLOG, not fully finished yet
(this is a Sample, remember!).
But you can still execute it in your desktop browser, or any mobile device
(thanks to a simple Bootstrap-based responsive design), and see the
articles list, view one article and its comments, view the author information,
log in and out.
This sample is implemented as such:
MVVM | Source | mORMot |
Model | MVCModel.pas |
TSQLRestServerDB ORM over a SQlite3 database |
View | *.html |
Mustache template engine in the Views sub-folder |
ViewModel | MVCViewModel.pas |
Defined as one IBlogApplication interface |
For the sake of the simplicity, the sample will create some fake data in its own local SQlite3 database, the first time it is executed.
2014-10-08
Meet in Belgium!
2014-10-08. Synopse Company
Just a small message to let you know that I was invited, as a speaker to the BE Delphi 2014 event. This year, the sessions will focus on n-Tier development, so our little mORMot does make sense in the landscape! If you are in Belgium or in Europe, we would be very pleased to meet you there! Thanks […]
2014-08-20
List your app on mORMot ShowCase
2014-08-20. Open Source › mORMot Framework
If you use our little mORMot framework in any of your project,
commercial or not, please report it to a new
forum thread dedicated for this!
Sounds like if more and more projects are using our little rodent...
The cross-platform clients did increase its popularity, as far as I found out,
in the last days.
Furthermore, if you accept that your application is quoted in our framework documentation and web site, and/or your logo displayed, please notify it in the application post or by email to us.
The first listed application - EasyMail7 Client-Server Email Marketing Solution - is indeed impressive, and shows well the Client-Server and storage abilities of the framework.
« previous entries - page 4 of 11 - next entries »