0

Essentially,

I would know to the various components involved to get from start to finish from absolute scratch.

I am about to undertake an Android project where I pretty much need to completely create a back end and a way to interact via HTTP. A RESTful approach seems the way to go but now I am pretty stuck on where to start - things I should take into consideration.

At the moment I see the following being important:

Are there other alternatives I should be considering? Is this the best approach considering I have done no PHP and very little MySQL so far? Does the fact it is mainly Android based mean there are unique options to consider?

If there are any other good resources I should be considering, I would be very grateful!

Cheers

mgibson
  • 6,103
  • 4
  • 34
  • 49
  • 1
    if you are fluent in Android you probably have a proper knowledge of Java. In which case, Playframework is a good place to start. It is a simple yet complete and quite self-packaged framework for web applications. – njzk2 Jul 25 '13 at 15:27
  • Ah, looks very interesting! Am I correct in saying that totally needs the need for PHP, but you still need a data backend such as MySQL? – mgibson Jul 25 '13 at 15:41
  • pretty much. there is jdbc in play so you can plug it into many different databases, including H2, which is an in-memory database, and sqlite, which doesn't require an external server such as MySQL or PostgreSQL – njzk2 Jul 25 '13 at 15:45
  • Cheers, will definitely check those out. Is there any particular database(s) that you would recommend? Mainly reliable, easy to use and easy on the wallet/ideally free to a point? – mgibson Jul 25 '13 at 15:53
  • H2 is good enough to start the dev. You can use SQLite quite easily (nothing to install) after that, or whatever is on your production platform. I consider using Heroku for hosting, they provide postgreSQL – njzk2 Jul 25 '13 at 16:11

3 Answers3

2

I'm in the same situation. I'm going to develop an Android app with a REST backend (PHP + MySQL). A few things I'm taking into account:

And I would like use Python instead of PHP, but there are less sharing hosting services that support GCI for Python.

Community
  • 1
  • 1
Marcos
  • 4,643
  • 7
  • 33
  • 60
  • Interesting. I currently am familiar with most of that Android related stuff. Why did you choose PHP then as opposed to Play Framework or WCF? Also why did you go for MySQL over other alternatives? It would just be good to get an understanding of why you are planning to go with that combination as there seem to be many possible combinations. – mgibson Jul 26 '13 at 08:03
  • 1
    In my humble opinion I think that WCF and similar frameworks are overkill (at least for my system). Not just the platform itself, but the language they use too: Java-.net vs Php-Python. And my knowledge about databases is limited to relational databases, hence MySQL. – Marcos Jul 26 '13 at 12:47
  • Fair enough, thanks for the insight. – mgibson Jul 26 '13 at 13:02
1

Do you know VB or C#? if so maybe you should consider a wcf webservice instead of PHP its very simple and there are plenty of tutorials on integrating with android.

KBusc
  • 663
  • 8
  • 24
  • I do know some C#. So you are suggesting Android, C#/.NET webservice (does that cost?) and a data back end? Is there a data back end you recommend? – mgibson Jul 25 '13 at 15:45
  • Currently I am using MySQL which integrates very well with Visual Studio / WCF web service – KBusc Jul 25 '13 at 15:54
  • And besides the MySQL host, is that free? – mgibson Jul 25 '13 at 15:59
  • I would think so because you can get a trail version of VS and then wherever you plan on Hosting you DB you would presumably host your service that you built. I must say that I don't actually know though. I just do the development and make it work locally and pass it on to someone else to worry about hosting it so I cant say much about the cost. – KBusc Jul 25 '13 at 16:03
  • Thanks for info, appreciate it! – mgibson Jul 25 '13 at 16:09
1

REST based backend service can be developed usin microsoft stack, I can suggest to create REST full WCF services in the following way.

  1. Create REST WCF services, use WebHTTPBindings, provide suitable UriTemplate and http verb to each of the service method.
  2. Create a new 'Class Library' project which will be your business logic part. Methods in business logic will be called from WCF layer.
  3. At the back any database can be used either MY SQL, MS SQL server or Sybase.

Benefits of using REST WCF service are as follows:-

  1. Since REST services are resource based, its method are easily called directly by its uri from any platform. So calling WCF service method will be very easy from android app.

  2. Excellent support for JSON. Serivce methods can be configured to send response and receive request in JSON form. JSON is excellent lightweight,interoperable data interchange format.

  3. Support for various HTTP verbs.

Have a look at the following:- http://msdn.microsoft.com/en-us/library/dd203052.aspx