You are not logged in.
Pages: 1
During the last 4 years we have developed a DataSnap Rest Server application that allows other applications to send documents (invoices, orders, account statements, etc) into our Oracle ERP application, or to query
data from our database.
Due to the well known DataSnap's stability problems, we are thinking about migrating this project to mORMot.
There are a few facts that we have to care about before taking a decision :
- The project is very big and we don't have enough time to rewrite it from zero
- There are tens of other client applications that are using now our DataSnap solution so, we have to keep the same JSon structures for exchanging data
Most of the DataSnap get... methods have JSon parameters that allow the client applications to define different filtering criteria.
The returned Json data is based on queries or/and Oracle stored procedures (some of the interrogations need some complex algorithms)
The update.. methods have Json parameters that describe the documents (invoices for instance).
If the received data is valid, the document is saved into the database together with some accounting registrations.
We studied some of mORmot's sample projects and it seems that mORMot's terminology is completely different from the DataSnap's terminology.
Our question is : can any one share his experience in migrating from DataSnap Rest to mORMot and give us some hints ?
Thank you
Offline
Perhaps mORMot method-based services are the way to migrate such project.
With method-based services you can handle in/out JSON parameters in code.
Then call the Oracle DB from the methods, re-using the existing data access code / SQL.
See also https://tamingthemormot.wordpress.com/2 … databases/
It is using interface-based services, but you may got the idea.
Offline
Thank you for your quick reply.
Best regards.
Offline
To be clear:
Of course, interface-based services are a cleaner way to write services using mORMot.
But perhaps the parameters encoding won't match the client expectations.... so in this case, method-based services are the way to go!
Offline
Hi,
The most of the DataSnap functions in our project look like these :
function DoSomething1(DataIn : TJSonValue) : TJSonObject;
or
function GetSomething(DataIn : TJSonValue) : TJSonArray;
We can't figure how we can return a json array from a mORMot method.
Offline
Pages: 1