I'm new to mobile native app development.
But I'm familiar with web app development.
I was going to develop iPhone Native App first and then develop Android Native App after that.
To minimize work, my plan was to develop REST APIs for my apps.
API server is going to handle database CRUD and session so that Native App would call
data from database in abstract manner.
so that my iOS, Android and etc native apps just use those REST APIs
to read and write photos, text, LatLng etc.
I'm not sure this is a recommended way to develop native apps.
Perhaps direct communication with native app and database would have better performance but I'm worried on developing logics in every other native app version.
your approach is the correct one, dont make your native application comunicate with the remote database, instead as you said you should add a REST layer, and make your apps communicate with it.
The approach is perfect, we are doing this in our apps as well. Normally we do this way only so that the clients app can be any and it can consume your database VIA rest API calls.
E.g you can create PHP website, Iphone app, Android App, BB App using Same API Rest calls.
You are on track InspiredJW ;)
Thanks, Jigar
Yes, it is good and recommended approach in Android. There is no official support for SOAP in android, though KSAOP2 works in some android apps. To implement client to consume restful web svc, you need to do it in a separate thread. Android 4.x does not support network connections in main thread.
iOS: it may be good based if the webapplciation provides RESTful webservice or you can use SOAP. Connecting to network url in SOAP consumes more memory.
RESTful approach is universal accepted webservice besides SOAP.