
It is time for a new mORMot release!
2024-10-16
2024-10-16. Open Source › mORMot Framework
It is time for a new mORMot release!
2024-09-06
2024-09-06. Open Source › mORMot Framework
OpenAPI, which was formerly called Swagger, is a set of specifications to encode the server API endpoints definitions into text, mostly JSON.
From this reference text, you can generate client code to access the service, in a vast number of languages.
Delphi seems to be far behind other languages, in terms of this code generation. I found nothing even working for FPC.
Since we needed it for our internal tools at Tranquil IT, we just published the new mormot.net.openapi.pas Open Source unit, which is quite a game changer. Thanks Andreas for starting this project, and testing it in its early age!
2015-05-18
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-04-12
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.
2014-08-11
2014-08-11. Open Source › mORMot Framework
Current version of the main framework units target only Win32 and Win64 systems.
It allows to make easy self-hosting of mORMot servers for local
business applications in any corporation, or pay cheap hosting in the Cloud,
since mORMot CPU and RAM expectations are much lower than a regular
IIS-WCF-MSSQL-.Net
stack.
But in a Service-Oriented Architecture (SOA), you would probably need
to create clients for platforms outside the Windows world, especially
mobile devices.
A set of cross-platform client units is therefore available in the
CrossPlatform
sub-folder of the source code repository. It allows
writing any client in modern object pascal language, for:
This series of articles will introduce you to mORMot's Cross-Platform abilities:
Any feedback is welcome in our forum, as usual!
2014-08-11. Open Source › mORMot Framework
Current version of the main framework units target only Win32 and Win64 systems.
It allows to make easy self-hosting of mORMot servers for local
business applications in any corporation, or pay cheap hosting in the Cloud,
since mORMot CPU and RAM expectations are much lower than a regular
IIS-WCF-MSSQL-.Net
stack.
But in a Service-Oriented Architecture (SOA), you would probably need
to create clients for platforms outside the Windows world, especially
mobile devices.
A set of cross-platform client units is therefore available in the
CrossPlatform
sub-folder of the source code repository. It allows
writing any client in modern object pascal language, for:
This series of articles will introduce you to mORMot's Cross-Platform abilities:
Any feedback is welcome in our forum, as usual!
2014-08-11. Open Source › mORMot Framework
Current version of the main framework units target only Win32 and Win64 systems.
It allows to make easy self-hosting of mORMot servers for local
business applications in any corporation, or pay cheap hosting in the Cloud,
since mORMot CPU and RAM expectations are much lower than a regular
IIS-WCF-MSSQL-.Net
stack.
But in a Service-Oriented Architecture (SOA), you would probably need
to create clients for platforms outside the Windows world, especially
mobile devices.
A set of cross-platform client units is therefore available in the
CrossPlatform
sub-folder of the source code repository. It allows
writing any client in modern object pascal language, for:
This series of articles will introduce you to mORMot's Cross-Platform abilities:
Any feedback is welcome in our forum, as usual!
2014-08-11. Open Source › mORMot Framework
Current version of the main framework units target only Win32 and Win64 systems.
It allows to make easy self-hosting of mORMot servers for local
business applications in any corporation, or pay cheap hosting in the Cloud,
since mORMot CPU and RAM expectations are much lower than a regular
IIS-WCF-MSSQL-.Net
stack.
But in a Service-Oriented Architecture (SOA), you would probably need
to create clients for platforms outside the Windows world, especially
mobile devices.
A set of cross-platform client units is therefore available in the
CrossPlatform
sub-folder of the source code repository. It allows
writing any client in modern object pascal language, for:
This series of articles will introduce you to mORMot's Cross-Platform abilities:
Any feedback is welcome in our forum, as usual!
2014-05-18
2014-05-18. Open Source › mORMot Framework
We have just added a new "25 - JSON performance" sample to benchmark JSON process, using well most known Delphi libraries...
A new fight
featuring
mORMot vs SuperObject/XSuperObject/dwsJSON/DBXJSON
On mORMot side, it covers TDocVariant
, late binding,
TSQLTable
, ORM, record access, BSON...
We tried to face several scenarios:
On average and in details, mORMot is the fastest in almost all scenarios (with an amazing performance for table/ORM processing), dwsJSON performs very well (better than SuperObject), and DBXJSON is the slowest (by far, but XE6 version is faster than XE4).
2014-04-18
2014-04-18. Open Source › mORMot Framework
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 […]
2014-02-25
2014-02-25. Open Source › mORMot Framework
With revision 1.18 of the framework, we just introduced two new custom types
of variant
s:
TDocVariant
kind of variant
;TBSONVariant
kind of variant
.The second custom type (which handles MongoDB-specific extensions -
like ObjectID
or other specific types like dates or binary) will
be presented later, when dealing with MongoDB support in
mORMot, together with the BSON kind of content. BSON /
MongoDB support is implemented in the SynMongoDB.pas
unit.
We will now focus on TDocVariant
itself, which is a generic
container of JSON-like objects or arrays.
This custom variant type is implemented in SynCommons.pas
unit, so
is ready to be used everywhere in your code, even without any link to the
mORMot ORM kernel, or MongoDB.
TDocVariant
implements a custom variant type which can be used
to store any JSON/BSON document-based content, i.e. either:
TDocVariant
instances.Here are the main features of this custom variant type:
TDocVariantData
record
;variant
type), without the need to use interfaces
or
explicit try..finally
blocks;class
instance
per node, but rely on pre-allocated arrays);record
serialization;TSQLRecord
instance containing such variant
custom types as published
properties will be recognized by the ORM core, and work as expected with any
database back-end (storing the content as JSON in a TEXT column);interface
-based
service is able to consume or publish such kind of content, as
variant
kind of parameters;variant
instance
will be displayed as JSON in the IDE debugger, making it very convenient to
work with.To create instances of such variant
, you can use some
easy-to-remember functions:
_Obj() _ObjFast()
global functions to create a
variant
object document;_Arr() _ArrFast()
global functions to create a
variant
array document;_Json() _JsonFast() _JsonFmt() _JsonFastFmt()
global functions
to create any variant
object or array document
from JSON, supplied either with standard or MongoDB-extended
syntax.2013-12-10
2013-12-10. Open Source › mORMot Framework
In Delphi, the record
has some nice advantages:
record
are value objects, i.e. accessed by value, not by
reference - this can be very convenient, e.g. when defining a Domain-Driven
Design; record
can contain any other record
or
dynamic array, so are very convenient to work with (no need to define
sub-classes or lists); record
variables can be allocated on stack, so won't solicit
the global heap; record
instances automatically freed by the compiler when they
come out of scope, so you won't need to write any try..finally Free;
end
block.Serialization of record
values are therefore a must-have for a
framework like mORMot.
In recent commits, this JSON serialization of record
has been
enhanced.
In particular, we introduced JSON serialization via a new text-based
record
definition.
2013-01-20
2013-01-20. Open Source › mORMot Framework
A long-time mORMot user and contributor just made a proposal on our
forums.
He did use mORMot classes to integrate a SpiderMonkey
JavaScript engine to our very
fast and scaling HTTP server, including our optimized JSON serialization
layer.
Today, he sent to me some of his source code, which sounds ready to be included in the main trunk!
This is a great contribution, and Pavel's goal is nothing less than
offering
Delphi based, FAST multithreaded server with ORM and node.js modules
compatible.
2013-01-05
2013-01-05. Open Source › mORMot Framework
Implementing Domain-Driven-Design (DDD) is one goal of our mORMot framework.
We already presented this particular n-Tier architecture.
It is now time to enter deeper into the material, provide some definition
and reference.
You can also search the web for reference, or look at the official web site.
A general
presentation of the corresponding concepts, in the .NET world, was used as
reference of this blog entry.
Stay tuned, and ride the mORMot!