Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make the server backend of a mobile app?

I am an Android developer and I want to make an app which shows users on a map and performs tasks based on their location.

The whole model of the app has to run in the server. I need an API which:

  • Receives user location
  • Performs calculations based on the location of the users
  • Sends response to specific users with the results

The problem is that I have 0 experience in doing server side programming.

Can you please suggest me a way of making the server?

I checked the Google Colud Platform and this video. The video addresses the connection between the app and the server, but what I really need is coding the model and deploying it on the cloud.

What is the way for me to build the API for such an app, as a developer with no server side programming experience?

Can you suggest me a tutorial which goes trough the process of building a cloud backend for a mobile app?

like image 462
BabbevDan Avatar asked Sep 03 '16 20:09

BabbevDan


2 Answers

This is a very complex question. I don't recommend using a "ready-made" solution like FireBase because it's even harder to transform it into a "proper" API later on when you need it. If you know Android then you know Java, you'll have no problem learning working with a framework like Spring Framework which I recommend. Java on the backend needs a Java Servlet container, like Tomcat. First you should set up a development environment on your machine for this. I recommend searching for Spring Framework tutorials for this i.e. Spring Framework REST tutorials.

Secondly you'll need a database like MySql or MongoDB to store data. Spring comes with ready made connections to most of the most common databases, so its pretty easy to work with them.

When you're ready to deploy your service I recommend using a PAAS like Heroku.com where you can run your service for free first. In this way you get to control everything yourself and you also learn a useful skill.

like image 157
breakline Avatar answered Oct 18 '22 23:10

breakline


Since you are coming from the JAVA background you just need some basic building blocks and you shall be good to go.

  • Use PASS: They will take any devops from your side which will be a big relief considering you are not familiar with anything on server side. I recommend using Heroku or App Engine. Here's guide to App Engine with JAVA on top. https://cloud.google.com/appengine/docs/java/

  • Database: Not sure how you are storing and managing your user data as of now, but if you need database, there are various of those available now. The reason Firebase is top suggestion, cause it leverages realtime and gives you control on your side without spending a lot of time on your side.

  • APIs: You will be taking user's geo-location and sending it to server. On server you will need to process that into a real world location and any other logic. You will need to use Google's GeoLocation and reverse geocoding APIs for that. Find apis here : https://console.cloud.google.com/apis/

Also if it's any help, App Engine and Heroku both offer free limits and should be pretty sufficient for your use case.

like image 27
Vikram Tiwari Avatar answered Oct 18 '22 22:10

Vikram Tiwari