Mobile app/server architecture

Community Forums/General Help/Mobile app/server architecture

JoshK(Posted 2012) [#1]
I have a friend starting out a new project unrelated to games, and thought you guys might have some good advice. He wants to make a mobile app that runs on iOS and Android. The app will send and receive information to a MySQL database on his server.

So basically, the architecture is something like Instagram or Facebook's mobile apps.

This isn't my area of expertise, but the way I would set it up is like this:
-Java and Objective-C handle the user interface on Android and iOS.
-The bulk of the mobile app is written in C++.
-C++ uses networking commands to interface with a PHP script on the server.
-The PHP script gets and sets data to and from the MySQL database.

Java/Obj-C <-> C++ <-> PHP <-> MySQL

The other way I could see doing this would be a server-side C++ application that is constantly running, and connects to the mobile app via networking commands:

Java/Obj-C <-> C++ (client) <-> C++ (server) <-> MySQL

What is the "right" way to do this?

Last edited 2012