Jump to content
Josh

Random Programming Question

Recommended Posts

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

 

Is there a better way to do this?

Share this post


Link to post

I've never used PHP so not sure if a PHP script is/can be the same as a webservice, but I'd probably go the webservice route, which you could make with whatever language on the server side that supports it.

 

 

I was talking to a coworker the other day about stuff like this though. Why do we have all these mobile apps when the majority of them could just be webpages formatted specifically for the mobile screen instead of apps on the phone. Would save development time and effort to make the one webpage instead of 3 different OS supported apps (because you SOB's better start supporting WP :) ). Maybe these apps should just be web browsers that point to one specific site and can somehow only display the site if accessed from mobile phones because the majority of these apps could simply be websites without the users even knowing.

Share this post


Link to post

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?

Share this post


Link to post

As far as I know, for iOS you can only use C#.

 

But I second what Rick said. Create webpages that are installed with the app, so your app just loads the local webpages. Much faster and easier to implement.

 

 

Share this post


Link to post

As far as I know, for iOS you can only use C#.

I think you mean Objective-C. Sounds a bit wierd why Apple would rely on Microsoft technology, while they are trying to avoid and get rid of eachothers technology and patents all the time. Some hackers have however made C# work to some extend on iOS using Mono, but Mono is still quite buggy and lacks features of .NET.

Share this post


Link to post

Defiantly approach this as a web based app php, jquery, ajax, you can target all devices including desktops with one project. add, edit, update instantly without waiting on someone such as apple to approve things.

Share this post


Link to post

Have you guys ever used the interface on iOS? A web page doesn't come close.

Share this post


Link to post

I have an iPod Touch. And you can do MOST of your work with webpages, and the stuff you need to use GUI elements to do, you can just code that in objective-c.

Share this post


Link to post

The problem with most web pages are that they are unncessary wide and have too small text. If you make a simple web page with huge courier font, it works just like a native mobile app, or even better. And it works better on a PC too, because it's easier to read and more clean. I think I will make all web pages with courier font in future and dynamically scalable to any size, and only vector graphics, because bitmap graphics prevent you from making a window smaller as they cause scrollbars.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...