#1 2019-11-05 01:23:10

Javierus
Member
Registered: 2019-09-18
Posts: 43

Two question from a future mORMot'er

Hello,
I've been reading and learning mORMot stuff for a few months, although I still have not used it.

I apologize for the nonsense that I'm sure will be in (part) of my questions.

Mine is a micro business, with a long experience, but technologically stuck in year 2000 till this January.

And I'm still using Paradox under BDE; already started the transition to ElevateDB (chosen cause it is a SQL engine, but also engineered for good performance with navigational db handling)

My application is a legacy one (currently migrating from D5 to D2007), and although it does a good service to my customers, it's a clear BBM. I will follow your advice on driving Legacy to SOLID

And I have two, quite different questions:

1) I need to start with REST. AFAIK, the BDE is not reentrant nor threadsafe, so I was wondering if I could use interface or method based REST with just a single thread, one request at a time

2) Right now, all the business logic is in a few datamodules, wich are in fact Singletons, cause they are created just once, and any change on any table is channeled through those datasets. They have the business logic on the dataset events, and elsewhere on the app all datasets are just read only
The question is, Could mORMot work above them, using the Tdatasets as source?

Thank you for your patience reading this smile

Offline

#2 2019-11-05 08:40:12

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

Re: Two question from a future mORMot'er

Using the ORM is not mandatory.

You can use the interface-based SOA feature of the framework without the ORM.
Or the MVC/Web feature, without the ORM.

If your results are TDataSet, check the DataSetToJSON() method from our SynVirtualDataSet.pas unit.
It could help you exporting your TDataSet results as a RawJSON output parameter for the SOA.

About BDE and multi-threads, you have threading options to the interface-based services. See the documentation about it.
Or you can just use a lock.

From my experiments, using ElevateDB will be slower than SQLite3.

Offline

#3 2019-11-05 10:30:54

Javierus
Member
Registered: 2019-09-18
Posts: 43

Re: Two question from a future mORMot'er

ab wrote:

Using the ORM is not mandatory.
You can use the interface-based SOA feature of the framework without the ORM.
Or the MVC/Web feature, without the ORM.

Yes, that I already know; I plan on go full mORMot over time, and I believe the ORM will be that last step, one table (or table group) at a time

ab wrote:

If your results are TDataSet, check the DataSetToJSON() method from our SynVirtualDataSet.pas unit.
It could help you exporting your TDataSet results as a RawJSON output parameter for the SOA.

Already read about it; will use.

ab wrote:

About BDE and multi-threads, you have threading options to the interface-based services. See the documentation about it.
Or you can just use a lock.

Ok, thank you very much, I believe is what I need; I'll learn it

ab wrote:

From my experiments, using ElevateDB will be slower than SQLite3.

I'm sure, but for old code compatibility, I need Locate, SetRange, FindNearest and all that. Once refactoring will free me from such code, leaving just SQL or ORM, I'll chose other database engine

Again, thank you very much

Offline

Board footer

Powered by FluxBB