Of all the tutorials i have come across to connect to an external database from android, most of them use php program on the server and use a httppost to pass the arguments. Why dont people just connect directly to the database using jdbc . Or is there some other point that i am missing here.
Share
In the mobile world there no such thing as perfect reception so you get dropped calls and missing data when the user moves in and out of good reception. The JDBC protocol isn’t designed to handle the complete/partial disconnect that occurs in mobile, especially when you are in the middle of a query. HTTP on the other hand at least allows you to design in your own retry mechanism as a failed HTTP request is just a failed HTTP request and not an exception bubbling up from the network layer/JDBC driver.
Also as you are communicating over the public internet (even over SSL) the data going into your server should at least be checked in some manner before it hits the database.