[ACCEPTED]-How to connect to the server on mobile application?-appframework

Accepted answer
Score: 17

What kind of server needed for mobile applications ? A cloud or a regular web server is enough ?

Because you are creating a hybrid mobile 42 application you can use any type of server 41 side technology, it doesn't matter is it 40 a classic web server technology (using Java, PHP 39 or .NET) or some kind of cloud technology 38 like Parse.com.

You also don't need to create anything 37 from scratch. Best course of action would 36 be to use some kind of micro RESTFul framework(like 35 PHP Falcon or Java Play Framework). Read more about them here.

But, there's 34 always a but. You can't use server side 33 technology for classic content generation, you 32 only need to use it to send data to your 31 hybrid application. I will explain this 30 later.

There's also an alternative to RESTFul 29 services, you can create a webservice, again 28 using Java, PHP or .NET.

What are the ways to connect the app with the server ? ( on cross platform mobile development )

You would use AJAX 27 as a technology (in case of RESTFul), rest 26 depends on you. You would probably do it 25 in JSON format (or JSONP if you are doing 24 cross-domain calls, but you don't need to 23 think about JSONP when creating a hybrid 22 application).

If you intend to use a web 21 service then you would use a SOAP connection 20 and communicate via XML format.

No matter 19 which server side technology you use you 18 will always use AJAX on a client side.

Now 17 let me tell you why you should not generate 16 your content on server side. Basically nothing 15 can prevent you from doing that, you can 14 generate your complete page on web server 13 and just show it in PhoneGap app, it would 12 still be a hybrid app. But, if you try to 11 put this app in Apple store you will get 10 yourself rejected.

What is the secure way to communication with the server ?

Security of course depends 9 on server side technology. Every framework 8 has its own kind of security handling, but 7 all of them relay on HTTPS so you should 6 not worry too much.

From the client side 5 you can always encrypt JSON/XML data and 4 send them using POST.

Examples:

If you want to use 3 jQuery Mobile then take a look at this tutorial. It 2 will show you basics of client - server 1 side communication.

Score: 3

Since you are new to mobile application, ill 10 try to give short answers

1) What kind of 9 server needed for mobile applications ? A 8 cloud or a regular web server is enough 7 ?

A regular web server is good.

2) What are the ways to connect the app 6 with the server ?

via web-services

3) What is the secure way 5 to communication with the server ?

Use HTTPS webservices (SOAP, REST), HTTPS secures the transmission.

Above 4 is a basic explanation for your quick help, I 3 would recommend you to go through the documentation, and 2 review some sample codes

This will really 1 help you Sample

Score: 0

Please go through this link it will surely 6 help you

http://www.androidhive.info/2012/01/android-login-and-registration-with-php-mysql-and-sqlite/

Webserver,cloud anything is good 5 for restful service

for security purpose 4 you can use POST parameter to send and recieve 3 data or if you want more security then you 2 can encrypt and decrypt data through secure 1 algorithm

More Related questions