As i wrote in last post i am planning to use google app engine to host json api for my android apps so today time went into it.
I was using PHP to generate JSON from MySQL database. PHP makes it a breeze to generate JSON. Only few line of code and you are all set. App engine also support PHP but SQL is paid so i am not using it. Not because of the cost but if it can be done with app engine datastore using python or java then why not do it.
I am not fluent in either python or java but have workable knowledge and also know how to find the answers if stuck.
Today i managed to figure how to generate JSON from datastore using python. Done it with help of django simplejson module.
Reading through the app engine docs i also found it interesting to build a backend using java. Android studio makes it real easy to go through the process but my internet speed killed all the fun. I could have built the whole api with java today but my system spent hours downloading the app engine java SDK and i think that too isn't perfectly working. I tested 2 modules one cloud endpoint and other java servlet. Endpoint one was not running perfectly. The time it took to download java SDK i managed to generate json using python.
Also my Mac(actually hackintosh) was refusing to load the page using "localhost:8080", which is default, as address. So i edited the host file and still nothing worked. When i changed the default port from 8080 to 8888 it started working.
Also genymotion refused to take "10.0.2.2:8888" as address to local api. I had to turn on the android emulator to get it working.
I hope tomorrow i will complete the api and also build the basic app to work with that api. Later i will polish the app.
Showing posts with label python. Show all posts
Showing posts with label python. Show all posts
Tuesday, January 19, 2016
App engine java python and more..
Subscribe to:
Posts (Atom)