So I've been writing small android applications and want to start writing bigger apps that have the ability to allow users to create accounts, allow me to store their account data online in some sort of database and really just adding some sort of functionality that would require some sort of backend.
I'm new to programming and am starting with Java/Android. Where should I start to learn about this stuff? Would this be a database I would need? What type(s) are popular or good to learn/use?
I read about https://www.parse.com and it looks interesting and easy to use but I don't want learn something that isn't a standard or that I would only be able to use with their client.
In Android Studio, open an existing Android application that you want to modify, or create a new one. Select the Android app module under the Project node. Then click Tools > Google Cloud Endpoints > Create App Engine Backend. In the wizard, enter the Project ID, Project Number, and API Key of your Cloud project.
Android does not support MySQL out of the box. The "normal" way to access your database would be to put a Restful server in front of it and use the HTTPS protocol to connect to the Restful front end.
For the backend development of Android apps, developers use a form of JavaScript known as Node. js. This framework, among several other aspects, enables a developer to manage data changes from the frontend and create robust network frameworks capable of handling multiple concurrent user requests.
I have never used Parse before, but it seems like an easy way for you to not worry about writing all the server-side code, the downside is: it costs money the more you want to use it and you're also tied into their API and way of doing things. If you do use Parse, you'll only have to worry about writing code for your Android app to interact with Parse. You can see their documentation for details on that.
The cheaper route involves a bit more work. You'll need a
Server to host the backend
Server-side language (i.e. Java, PHP, Python.. list goes on) to control/handle requests from your Android application.
A database (mySQL, PostgreSQL, Oracle, etc.) setup with the schemas you want (i.e. a User table)
The general flow is: your Droid app would make a request to http://yourserver.com/BackendFunction with parameters to that function. Your server side scripting language would do the backend work (i.e. adding a user to the database). The server responds back to your application with some info (usually JSON or XML, whatever you choose) with relevant information, and your app displays a nice view of that info.
You'll need to research how to query databases with whatever server-side language & database you're using and how to send/handle HTTP requests & responses.
You're right that you'll need some sort of datastore on the server side to store your data. It could be a traditional RDBMS database (mysql or postgresql), or something newer like a noSQL solution (mongodb, riak, couchdb). Parse looks cool, but I've never tried it.
For my recent Android project, I've been using Couchbase's Android libraries (http://www.couchbase.org) with ektorp (http://www.ektorp.org) that allow me to replicate to a server-side CouchDB instance. It's been great for a number of reasons:
Also, based on the datastore you choose, you'll still need to decide on a few things:
It might seem daunting (server-side stuff tends to feel that way sometimes), but keep at it and you'll get it!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With