Hello there and please excuse me for my English or the silly question.. Due to my not deep technical background I might not use the right terms..
So..
I have created a web site (in PHP) where the users need to authenticate themselves in order to read some articles. The users are also able to post their articles or comment to the other articles.
What I need to do now is to transfer this simple functionality to an android app so the users can do the same thing through their mobile phones.
How should I approach this? How should I make the app to communicate with the website?
I am aware that directly access to the database is not a good idea at all.. So what are the alternatives?
So far I was thinking to have a url in the website where the user will POST data and actions of what he/she needs to do..
For example: In order to get the articles from a special category, they will need to send some POST data in the url http://www.example.com/mobile.php containing: - username - password - action(read) - options[category,since yesterday, order by rating]
And so goes on..
Then the web site will return the result in a JSON format which the mobile app will read and display it to the user's mobile.
A similar thing will happen when the user needs to write some articles or post comments..
Is the above-mentioned a logical approach or it makes no sense at all? Would you suggest something more professional?
Is there any link you could share please?
Thanks in advance!