Reputation: 2667
I have worked with web services before from the client side on Android, but now I am looking to build my own web service, and I want to find the best solution for working with Android before I start hacking away. I want the output format to be JSON, as I think it will be faster and perhaps a little easier than SAX. So, in what language would it be the easiest and most direct (in everybody's opinion) to pull this off? I don't care which language it ends up being, so long as it is the fastest, easiest, and most efficient way to connect with my Android app. I could pull it off in PHP but I am not sure it that is the rout I want to take just yet. Just looking to get some opinions before I start.
Upvotes: 2
Views: 766
Reputation: 12636
In my opinion, if you build complex and dedicated for android app service the most suitable language is java - this same language as your app, this same knowledge, this same tools. As far as I remember PHP was very poor language, easy to write something like "hello world" but very annoying when you want to write something more complex. On the other side you should take a look at costs of writing and deploying your service. PHP developers are far cheaper than Java EE developers, one month of Java hosting costs similar to one year PHP hosting with MySQL installed. This is really big advantage to PHP.
Upvotes: 0
Reputation: 34150
This question is really really broad. But I'll take a crack at it. Your options are:
Upvotes: 2
Reputation: 20047
If you know Java and want to use it on both sides, I'd recommend restlet libraries: http://www.restlet.org/documentation/. Restlet gives I think appropriate level of abstractions and have ready-to-use client and server bindings for the popular environments. For example it has an android client side libraries, you can run server on J2SE, J2EE or Google App Engine by default. Simple, clean and easy to use.
Upvotes: 1
Reputation: 4590
I am currently working with CakePHP to help build my API's and such for my web service. It is a fairly easy and fast way to bring everything together. I have a MySql DB, PHP code, and then the API to back it all up.
Upvotes: 0
Reputation: 15390
If you know PHP then just use a framework like CodeIgniter to set up elegant URIs to your endpoints. That could be an option if you are comfortable with PHP already.
Upvotes: 0