android - Is it necessary to use HTTP based client/server communication for an app development? -


i want make app on android using mysql.

i'm new here, first see many other's app design. find 1 thing if have use database, use restful design, defining api http protocol client/server side communication. , then, there're lots of things do, like: mapping resources url, sending/recieving doget, dopost,.. requests.

but don't understand. app develop, not web develop. why have make app web? if don't want use phonegap, html5, .. kind of html-based develop, want write native app. , still want seperate client , server end in code, server side communicate mysql, , client side display user, , they're written in java. since they're java, got native idea:

"why don't call server side code directly client end?"

since it's run on app, there's no necessarity map url user access. observed, of people don't this. want know why donnot make app way think? security concerning? or reduce debug difficulty? or later expansion other platform ios?

i want know why choose http based client/server communication.

it's not security, because in either way you'd setting external socket destination, because there's no native way communicate between app , mysql. common approach in way using web-service, you'd implement http server code in favourite language (php, python...) process requests made clients , process them accordingly. third-party script communicate database.

if choose approach , you're concerned security, i'd choose asymmetric encryption algorithm tls, encrypt messages public key , decrypt them in server side private key.

you can share public key no concerns, can embed in code, put in web-server , make clients download each time connect. way, if day change (because of heartbleed situation, instance), they'll have current public key; otherwise, you'd need update app if hardcode public key in code.

some useful links:


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -