2

I am creating an app which I would like to have communicate with my website. The app will have to get data for a particular app user from the website's database. I am unclear as to the best way to do this.

I have seen one way of doing this for example is creating a login page on the app which then hits a login.php logic on my website. This is convenient because I can use one code base to handle sign in for both the website and the app.

Another solution I've seen is using JSON requests to handle the communication between app and website. This is convenient because JSON objects are easy to create and parse.

I would basically like to know the best/common way to have this communication occur, what are the pros and cons to having one over the other, and any other security issues to consider.

For example, is there a risk of exposing sensitive user data when using one method over the other? If so how can this be prevented? How and where does encryption and user validations come into play here?

Any assitance would be greatly appreciated!

edc598
  • 317
  • 3
  • 11
  • 3
    Usually, questions that ask *"What is the best way to do X"* are too broad and aren't definitively answerable as far as SO is concerned. If you don't have specific code samples in mind for a *"which is better"* question, I'd say [programmers.stackexchange.com](http://programmers.stackexchange.com) is a better fit. –  Feb 16 '12 at 18:53
  • Thanks for the suggestion. I'm trying to find some help on this question wherever I can. Stackoverflow was only good forum i knew of. Will definitely look into this site. – edc598 Feb 16 '12 at 20:03

0 Answers0