Dan
Dan

Reputation: 1174

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:

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?

Upvotes: 13

Views: 16116

Answers (4)

KursikS
KursikS

Reputation: 326

Fast deploying server for Android developers on Ktor with files, resources and database

https://github.com/KursX/kursx-server

sudo apt update && sudo apt install -y git && git clone https://github.com/KursX/kursx-server.git /opt/kursx-server

bash /opt/kursx-server/install.sh $IP $DOMAIN $TOMCAT_VERSION

Upvotes: 0

gener
gener

Reputation: 51

Since you have limited experience on server side development I'd suggest using a backend-as-a-service platform. This approach has the benefits of allowing you to focus your time coding the client where your competitive differentiators are, and lets you leverage years of experience in server-side development without having to ramp up on the technology. It also means you can iterate quickly and test features ideas with less risk.

There are several options out there, but in your case, you'll need something that provides enough flexibility to implement custom logic and a custom data model. Some platforms allow you to create a full backend application with REST api endpoints, and automatically take care of deployment, security and management. Some examples of backend service providers can be found here https://en.wikipedia.org/wiki/Mobile_backend_as_a_service.

Some of the platforms actually allow you to build a full custom app without actually writing any code, and some of them provide ready-made components (like chat, leaderboards etc) but are less flexible.

Here's a list of Backend-as-a-service providers:

You didn't provide specific details about the tasks you want to implement on the backend, but it's likely that you could satisfy your requirements with a straightforward REST api that accepts your location data, runs business logic, reads or writes from your data model and returns whatever data your client needs. (Sorry I can't get more specific without details on your requirements). If you're dealing in sensitive information like location data, I'd strongly recommend securing the api with TLS/SSL (i.e. https), or make sure the platform you use provides this.

Upvotes: 0

Vikram Tiwari
Vikram Tiwari

Reputation: 3905

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.

Upvotes: 1

breakline
breakline

Reputation: 6083

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.

Upvotes: 19

Related Questions