#1 2013-07-09 05:35:29

sal
Member
Registered: 2013-05-17
Posts: 10

integrating ORM component with Java or C#

Hi,

I am intersted mORMot ORM component to my project ,  with regard to this i have following queries

1. can i have java and C#.Net client interacting with delphi ORM server. if yes is there any reference implementation of this ?
2. is there any basic grid based example for delphi client to interact with mORMot server ?

regards
Sal

Offline

#2 2013-07-09 06:17:44

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

Re: integrating ORM component with Java or C#

1. mORMot uses a RESTful scheme with JSON, so mORMot services can be used by Java or C# clients.
But there is no official reference implementation for those technologies yet.
We only provide some JavaScript client code yet. See samples "18 - AJAX ExtJS Grid" and "19 - AJAX ExtJS FishFacts" for instance.
But C# and Java automated clients are on the roadmap. If you are willing to help, you are welcome!

2. See the samples sub-folder of the latest versions.
You have a grid based "MainDemo" sample.
See also the "16 - Execute SQL via services" sample.

Offline

#3 2013-07-09 07:40:24

sal
Member
Registered: 2013-05-17
Posts: 10

Re: integrating ORM component with Java or C#

Hi,

Thanks for response


We tried moORMot framework from C# and Java client consuming delphi services through JSON , this is typical webservice implementation. which works fine for us

But now we are struck with ORM component of mORMot , where our database is oracle running in server machine. mORMot framework is also running on same server machine.

we need to develop client (Data Grid) in C# or Java which should reflect key tables of Oracle. all operations(update, delete, insert)  on the client table (datagrid) should be reflected in oracle tables.

Can you please suggest how difficult is to implement this requirement and if any references

regards
Sal

Offline

#4 2013-07-09 08:40:26

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

Re: integrating ORM component with Java or C#

You can access Oracle tables via ORM.
But only if tables are generated by the ORM, by now.
See the "15 - External DB performance" sample for instance: it accesses to Oracle via several mean (direct SynDBOracle access, FireDAC, UniDAC, ZEOS, BDE). The fastest is clearly SynDBOracle.

Then, standard REST commands are available, e.g. GET to retrieve an instance.
Take a look at the SAD 1.18 pdf, paragraph "10.2. REST".
Check also the user right process.

The AJAX JavaScript code samples are easy to follow, and will help you to define remote access.

IMHO a pure webservice implementation could make sense, especially for writing to the DB.
On the Delphi side, it will be easier to work with, directly with the ORM methods.
And it will be safer, if you have several statements to nest within a transaction.

Offline

#5 2013-07-09 10:36:25

sal
Member
Registered: 2013-05-17
Posts: 10

Re: integrating ORM component with Java or C#

Hi,

I was interpritting the http messages betwwen delphi ORM client server example.

i found that its exchanging json messages where in client json requests contains SQL query and server json response contains SQL response.

1. can you please explain me the significance of session id in POST header and how it is generated
2. if we simulate the same json request from any client (C#, Java) , and send to delphi mORMot server , are we guranteed to get same reponse.

I am avoiding AJAX because we are thick client module.

regards
Sal

Offline

#6 2013-07-09 11:09:52

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

Re: integrating ORM component with Java or C#

1. AFAIK there is no SessionID in ORM RESTful access, only in interface based services.
About this session ID in interface based services, see the SAD 1.18 pdf.

2. Yes, you can assume that.
The AJAX code can be used as reference.
ORM RESTful access is pretty easy - please take a look at the doc.

Offline

#7 2013-07-20 06:13:03

sal
Member
Registered: 2013-05-17
Posts: 10

Re: integrating ORM component with Java or C#

Hi,

Thanks for information,

Can you please provide reference or example of restful DB access

regards
Sal

Offline

#8 2013-07-20 07:06:26

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

Re: integrating ORM component with Java or C#

Did you try what I wrote to you above, i.e. "take a look at the SAD 1.18 pdf, paragraph "10.2. REST"."
You have plenty of reference in the RESTful chapter.

Offline

Board footer

Powered by FluxBB