#1 2013-02-21 02:10:33

ebz
Member
Registered: 2011-07-20
Posts: 18

Need suggestion using mORMot in my project

Hi Arnaud,
I really want using mORMot or part of this framework for my project.
After read some pages from SAD documentation, search through this forum I still unsure which class/component is suitable for my project.

I want to create client application using Delphi and server using PHP+MySQL, because the server is just shared hosting. The PHP (server) part is just querying (CRUD) the database based on parameter send by Client (delphi) and return the result to client as JSON. Client access server through domain name not IP address and just send POST/GET request. There are just 3-10 clients

I see that mORMot has amazing class when dealing with JSON (maybe the fastest and stable), reporting engine (synPDF), always update and another great classing system. Can you give suggestion about, so I can focus to learn using mORMot for such project?

Last edited by ebz (2013-02-21 02:13:30)

Offline

#2 2013-02-21 06:41:33

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

Re: Need suggestion using mORMot in my project

mORMot is mostly a client-server whole solution, in which the server side is optimized and feature complete, and the client side depends on some shared REST classes (see TSQLRecord, TSQLRest, TSQLModel).

If you want just CRUD process, you can use the mORMot client-side, if your PHP server publishes the REST JSON content expected by the client.
Transmitted JSON and expected URI routing is pretty simple, and documented in the SAD pdf.
See http://blog.synopse.info/post/2010/07/0 … pplication for an old article.
Then define your TSQLRecord and TSQLModel according to the server data layout, and it will work on the Delphi side.

Of course, you will loose the whole automated SQL generation, caching, optimization of mORMot server side.
You will have to write the CRUD SQL statements by hand.
From the DB point of view, you should use an integer ID field (not a string), since it is the model of our TSQLRecord class.

Offline

#3 2013-02-21 13:35:37

ebz
Member
Registered: 2011-07-20
Posts: 18

Re: Need suggestion using mORMot in my project

Thank you ab,
I know that i'll loose many features, just the beginning, thus I hope that after this project I can use the power of full client-server project using mORMot

Offline

Board footer

Powered by FluxBB