Reputation: 7841
I am developing one application which need the following functionalities
I think these above things are very common now a days in any website. As I am very new to android I am confused about using webview, or using http java api.
Which one is the normal procedure in industry everyone uses? Can anybody provide me the standard procedure which is secure and safe and easy to implement.
Upvotes: 1
Views: 671
Reputation: 28316
Direct access to the SQL server would mean that people could run arbitrary queries on your SQL server, which is obviously a security issue.
I would implement an API on your website that offers your functionality, instead of directly accessing the SQL database from the app. This is how most sites do it, including Twitter, Facebook and may others.
An API is usually facilitated by a set of scripts that take in some parameters (usually via HTTP POST) and return a result, modifying whatever they need to in the process. There are a few standards for how to handle this, but popular encodings for data are XML and JSON.
Since you can implement HTTP POST quite easily in most languages (e.g. via AJAX in JavaScript), it makes it really easy to port to new devices.
Upvotes: 1