#1 2017-09-05 05:04:30

wac1104
Member
Registered: 2017-08-25
Posts: 17

Mormot doesn't seem to be a lightweight architecture

Mormot doesn't seem to be a lightweight architecture; I want to use only restful parts of the database, use unidac or something else, but it seems that only the mort architecture can be used to access the database

Offline

#2 2017-09-05 07:05:05

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: Mormot doesn't seem to be a lightweight architecture

It is modular, and most units are unlighted.
You can use only mORMot.pas and you will get the SOA part of it.

I honnestly didn't understand the last part of your sentence...

Offline

#3 2017-09-05 07:17:14

wac1104
Member
Registered: 2017-08-25
Posts: 17

Re: Mormot doesn't seem to be a lightweight architecture

I mean that I only use the restuful part also need to build such an object TSQLMODEL? This coupling is too tight

Offline

#4 2017-09-05 07:42:31

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,182
Website

Re: Mormot doesn't seem to be a lightweight architecture

Just define no TSQLRecord in the model.
But some part of TSQLModel is needed for the REST feature.

For instance, TSQLModel.Root is used for the URI routing on the TSQLRest server and client side.
Or if you want to use REST authentication and URI signature (for instance to handle sessions), you may need to have TSQLAuthUser and TSQLAuthGroup information, even if it is in plain memory.

In short, TSQLModel gives minimal information to let client and server share the same basic settings.
You define your TSQLModel in a shared unit, then you use it in your client or server.

In fact, a TSQLServerFullMemory has no coupling with any DB engine, and works very fast and very well (it is just a TObjectList) for doing all that you need for all your REST process.
In practice, you don't need to handle the TSQLModel. Just call TSQLRestServer.CreateWithOwnModel and there will be a hidden TSQLModel handled by the server class.

Offline

Board footer

Powered by FluxBB