Do Android/iPhone Apps use AJAX to interact with the backend? If yes, is this common? Or do most apps use a different method for fetching database information. And if so, what other methods are there? Are server-side languages ever involved, and if so, is that more common to see with app development?
|
The apps that I have written back-end code for (both iPhone and Android) had REST APIs: the app made simple HTTP requests to retrieve XML data. "AJAX" is not the word for it since there was no JavaScript involved. But the principle is similar: HTTP request, either a GET with query string parameters, or a POST with www-form-urlencoded parameters; XML response. The response could also have been JSON: I think it was only XML due to a decision made by a previous iPhone developer, the guys I was working with said they would have preferred JSON. The server-side was C#/ASP.NET, with .ashx generic handlers that parsed the parameters, did the necessary database interaction, and serialized the response as XML. You could of course use any server-side technology: even considering only .NET, ASP.NET MVC is probably a better solution, or you could even use WCF I believe. |
|||
|
|
|
yes , apps can interact with Database by means of webservices(REST or SOAP) in which it can be designed with any server side languagelike php , java or .net etc. we primarily use php for backend support , Say for Example - a news website needs a mobile app so all the web php links will be provided as REST API's in json / xml format to display in the mobile. |
|||
|
|
|
It's not technically AJAX, but it's pretty similar. AJAX stands for Asynchronous Javascript and XML, it refers to how javascript on a webpage can make HTTP requests to a backend server and update the webpage without refreshing it. Android and iPhone apps which interact with the internet in some way use a similar method. The application on the phone makes HTTP requests to the server and then updates the phone's user interface. |
|||
|
|