#1 2014-09-01 07:25:57

ozgunlu
Member
Registered: 2014-09-01
Posts: 4

mySQL - mORMot - Mobile App

Hi,
I want to make a mobile application which is communicate with remote DB (mySQL) using Delphi XE6.

The structure of my project:

Remote DB(mySQL) -> mORMot(Rest Server) -> Mobile App (firemonkey)

Can i use mORMot for this project? If its possible, are there any samples with connection mySQL db? 

Excuse my bad English

Offline

#2 2014-09-01 07:45:54

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

Re: mySQL - mORMot - Mobile App

Yes, of course, this is possible, and a very good solution:
- Search for MySQL keyword in the SAD 1.18 pdf - we recommend using the latest unstable 7.2 ZDBC connector (via SynDBZeos), or ODBC (via SynDBODBC);
- See sample "SQLite3\Samples\28 - Simple RESTful ORM Server" and switch the PostgreSQL initialization line into MySQL;
- See sample "SQLite3\Samples\27 - CrossPlatform Clients" and http://blog.synopse.info/post/2014/08/1 … FreePascal for FireMonkey clients;
- Consider putting your logic as interface-based services on the server, not using the framework as a SQL proxy - your FireMonkey app should benefit of being only a "view" of your logic, and you would be able to switch to AJAX or HTML5/PhoneGap mobile app later on, if needed.

The SAD 1.18 pdf is worth taking a look, even if your English is not fluent.
I'm no native English either. wink
You do not have to read all 1600 pages - just start from the first chapter, to understand the design concepts behind mORMot.
See also this set of slides: http://blog.synopse.info/post/2014/04/1 … principles

Offline

#3 2014-09-01 07:56:01

ozgunlu
Member
Registered: 2014-09-01
Posts: 4

Re: mySQL - mORMot - Mobile App

Thanks for quick reply and helping smile

Offline

#4 2014-09-02 07:36:17

ozgunlu
Member
Registered: 2014-09-01
Posts: 4

Re: mySQL - mORMot - Mobile App

ab, i searched but i couldnt find. May i ask a simple question? How can i select table from db, can you write a simple example? hmm

Offline

#5 2014-09-02 07:55:54

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

Re: mySQL - mORMot - Mobile App

See "5.3. Queries" in the SAD 1.18 pdf.

The whole RTFM chapter 5 is worth reading!
smile

Offline

#6 2014-09-03 11:28:41

ozgunlu
Member
Registered: 2014-09-01
Posts: 4

Re: mySQL - mORMot - Mobile App

thanks, i can use RESTful ORM Server with mySQL. And now i'm trying to understand crossplatform samples, but i got an error: undeclared identifier 'TSQLRestClientHTTP'. I just want to monitoring remote db's datas  from mobile app clients.

Offline

#7 2014-09-03 13:42:12

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

Re: mySQL - mORMot - Mobile App

TSQLRestClientHTTP is defined in SynCrossPlatformRest.pas.
Add SynCrossPlatform to your use clause.

Offline

Board footer

Powered by FluxBB