I am developing a system including an iOS and Android app. I have two approach:
1 - I thought about use MySQL as the backend.
And then use REST in java using jersey to transfer my resources to the apps.
2 - Currently I heard about Parse which is consider as a easy way to add a backend to the mobile applications. It lets the mobile developers write server code without servers.
Which one is your suggestion? please support your answer with proper reasons and your personal experience.
If you want to be trendy, use node.js and MongoDB. (Although MongoDB is not trendy anymore, but it allows binary files of arbitrary length and works beautifully.) PHP with MongoDB works fine too.
My reasons: they are widespread technologies and with a very low barrier of entry. Avoid Java unless you want to nurse your JVM.
Assuming your typical backend for a mobile app which involves one or more REST apis and provides server-side functionality such as user authentication, communication (e.g. chat, messaging), or persistence (e.g. a leaderboard for a game, or retrieving geo-location related data). You basically have the two options you mentioned, build yourself or use a backend-as-a-service platform.
Build yourself (pros):
You retain all of the IP
You have the best level of customization
Build yourself (cons):
Very high learning curve if you lack server-side coding experience
Longer to implement, and harder to iterate quickly if you need to change something or add a feature
Higher risk of critical issues if you lack experience (e.g. security vulnerabilities, reliability etc)
You need to monitor and maintain the system once it's deployed. This can become a full time job if the app gets big enough
Backend-as-a-service platform (pros):
Much faster to get something up and running. This is a big one if you're launching something new and want to validate the market
Benefit from the years of experience of server-side developers who built the platform
Often, platforms will provide ready-made components that already do what you need
Running and operating the backend is included as part of the service, you don't need to worry about it.
It's actually cheaper than implementing it yourself if you consider the time investment, or if you hire a backend developer to build it for you
It allows you to focus your energy and time on the client side app, which is where you'll most likely differentiate yourself anyway
Backend-as-a-service platform (cons):
You have less flexibility, depending on the platform (some are better than others)
There's usually a recurring cost (although you'll also incur some of this if you build it yourself, to run the servers and databases)
There's always a risk that the provider will shut down (like Parse) and you're left scrambling to find an alternative or rebuild it yourself
There are now many backend-as-a-service platforms available to chose from. Unfortunately, Parse is no longer one of them, having been acquired by Facebook and subsequently shut down https://www.computerworld.com/article/3027537/application-development/facebook-is-closing-down-its-parse-developer-platform.html
I feel that a backend-as-a-service platform is a good option if you don't have much experience on the server side, or if you have limited time and want to focus your attention on the client side app. One of the greatest benefits is fast iteration. You can try something out and change it quickly with relatively little investment if you realize that your feature didn't hit the mark. 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:
http://pipegears.com (No coding required)
https://www.appcelerator.com/
https://cloudboost.io/
http://api.shephertz.com/
https://backendless.com/
https://quickblox.com/
I participated in the development of an iOS/Android app. We used a server coded in java working as a web service running on Tomcat 7, with a mongoDB database, and JSON parsing for communication. Certainly not the best solution ever, but it was working.
Related
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?
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.
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.
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:
https://quickblox.com/
https://www.appcelerator.com/
http://www.configure.it/
https://cloudboost.io/
http://api.shephertz.com/
https://backendless.com/
http://pipegears.com (No coding required)
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.
I am planning to build a web application and android app, which will manage huge numbers of notification (push notification), and can work in slow internet connection too. I need to send and get instant notifications. Number of users can be thousands or millions, application will have multiple servers (web farm), multiple database. Now I need to decide that which database will be best for this kind of application and which language should I use for programming. Please help me out. Any suggestions will be appreciated
Well, first you need to decide what your immediate needs are. Are you going to use this on a platforms that could potentially have hundreds of people accessing information at the same time? Then you need to estimate your future needs.
This will help you to decide your database system.
As per my experience i am suggesting you to use MYSQL database.
I Blindly Suggest you to Use Parse Cloud Database,as it provides SDK for All mobile Environments like Android and IOS for easy implementation and also it recently Launched a Javascript SDK to use.Its free for Trial.MultiPlatform Support and Secure
Check it out Here: https://www.parse.com/
Are you sure you going to get to thousands and millions users ? Everyone starts from scratch (read: zero users, except some friends). By this I mean, that you have to concentrate on what's the real issue within your development (growing app user base is different story):
Creation of Android app and it's lifecycle (updates, support of previous versions & etc).
Back-end. Will I also work on Back-end. Working on 2 'projects' (Android app and it's back-end) isn't easy. Not everyone is experienced enough to work on multiple assignments at the same time.
Valuate an option of using SaaS/Paas backend. Most of the have trial or free version for developer.
Third option is great. Get cheap/free web host. Store there configuration, that your Android app will download when it starts. In configuration you should declare what's the back-end and how to communicate with it. You can use any of known services like https://www.firebase.com or https://parse.com/plans or even use Google App engine free tier / AWS free tier.
About developing app for Android - if your app doesn't need any complex calculation or libraries - just write it with JavaScript. It's fast enough. Though, Java apps are always faster and easier to debug.
Good luck !
I want to build an app that sends data from device to device (android-to-android or android-to-iOS etc.) and I was starting to look at the server side aspect.
I was thinking to myself, should I use an MBaaS platform of some kind or build the backend myself?
is it better to use MBaaS because its less time consuming?
is it better to implement it all by myself because it will require less financial resources?
any thoughts on the matter?
Please advise.
I would do look at MBaas as a starting place. You can always decide later to 'port' your application later. Start with your basic requirements: Authentication, Role-Based Access Control, REST API, Business Logic and Event programming. The best part of MBaas is there dozens of vendors that will give you a free trial (like Espresso Logic). Make sure the pricing plan meets your long-term objectives. I have built services from scratch and trying to get all the services right and integrated takes a lot longer. Time is money - so balance the two.
We are going to build a multiplayer game.
The idea is that every player has a tablet and is connected to a server.
The server should control the game logic, while the clients (the tablets) will only serve as a frontend to the game.
We need to make a decision about the frameworks/programming language we are going to use.
A crossplatform frontend would be cool, but is not mandatory. It has to run on Android devices at least.
The communication between the server and the client must be bidirectional and realtime.
We don't care about a small amount of delay.
Currently we consider an HTML5 client in combination with a javascript server (running upon nodejs) to be the best option.
The communication would be managed by the javascript library socket.io.
The HTML5 frontend can be run either in-browser or as an app (built with PhoneGap).
However we did not decide yet since we want to be sure to make the right choice.
There might be frameworks that can do a better job.
Does anyone know a better solution?
Play 2 is great for this well, but node/socket are great choices too. I would use backbone.js for the front end as it gives you a lot of flexibility and it's easy to keep the views in sync. (there is an example of such an app on my github if you're interested)
I have an application already developed and in production. It's developed in groovy, as a desktop application with its own UI, and its purpose is to screen-scrape a website to extract some information every minute, and show alerts to the user when it need to.
Now I am trying to move this application to android, so it will be available all the time the phone is up (the more alerts the user gets during the day the better). Before starting I would like to gather opinions from people with experience (haven't touched android yet):
I see the following ways to set the app in android:
just port the whole application to android/java and have it running in the background all the time, doing more or less what the app now does. To take into account.
I assume running groovy on android is out of the question. I think I saw once some reference to a project to port it to android but it was so slow it was useless. So it must be android/java
Getting the html pages every minute (or less if i decrease) and doing all the parsing etc is doable or drains to much battery? What about memory, pages to parse could be not so small is there any limit on android?
Set up a server side living in some hosting doing the screen-scraping every minute and only sending alerts to the background running android app, that would be much lighter than the previous one.
I assume there is some built-in push functionality in android apps can listen to?
What server side hosting/service would be recommended (and for what reason, cost, perf, easy of use...).
My guess would be 2, using GAE due to the affinity with android and maybe I could even use gaelyk to reause part of my groovy code...
I am targeting android 2.2.1 and up. The number of users is very small and easy to deal with so updating the android app is not a problem.
thanks
If you choose #1 you will not only drain the phones battery but also generate more traffic to the web-site you are scraping (if all users are scraping the same pages). In any case, I would go with #2. (Have you considered sending out an email or SMS instead of writing an app? Of course, this really depends on your use case...)
Regarding the server platform:
GAE and Android are both by Google but I don't see how that would help you in this case. I develop GAE apps and never came across any Android specific features for GAE. However, GAE seems like a good fit for your intended use. It is quite possible that you could get away with a free instance (depending on the amount of processing you need to do, which will depend on the number of users and scraping).
Some points you should also consider
with GAE you don't get a static IP as opposed to EC2.
if you need https: does not work with custom domains (so users will always see something like https://youapp.appspot.com)
On the plus side: you don't have to deal with adminstration and can focus on coding. I believe EC2 is a lot more involved in that respect. (At least that's why I chose GAE). The technology look-in is greater on GAE of course.
Hope this helps!
P.S.: Just to be clear, I have no experience with Android.