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-20
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
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
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.
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
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-25
2014-10-25. Open Source › mORMot Framework
I just wanted to share a great article by Martin Fowler, about Micro Services. IMHO such "Micro Services" are the proper way of defining a SOA project, following SOLID principles. If we follow the "Single Responsibility" principle, we will define small uncoupled services, which […]
2014-10-24
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
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 […]
« previous entries - page 17 of 52 - next entries »