6

Android MySQL php + JSON alternative - codesd.com

 2 years ago
source link: https://www.codesd.com/item/android-mysql-php-json-alternative.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Android MySQL php + JSON alternative

advertisements

I have written a simple database driven app in C# which uses a 2 table MySQL database. This is all a learning curve for me (except c#, which I am now comfortable with)

The app is small, has a couple of datagridviews, uses a few sql select/inserts statments to populate the datagridviews and also update records.

I want to port this app to Android. All of the internet sources I can find recommend a middle php sript which accepts http requests in order to fetch the data from MySQL and then return the results back to the android device where it is parsed with JSON etc etc.

This method is a little out of my reach since I dont have php experience, all of my attempts to implement the php layer have failed, speciially the android app was not receiving any data back, I'm assuming I messed up somewhere inside the php file.

Is there an easier (more noobproof) way to interact with the MySQL database from within android which doesnt require the need for php + JSON? Any ideas are appreciated, thank you in advance.


If you are comfortable with C#, why not use ASP.Net MVC for the middle man?

MVC is especially easy to deal with JSON, and you actually only need to create those "controllers" (as models should already be there from your existing app, and JSON don't need the View to display).


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK