Always On, Always Connected - Data Storage and Network Services

Remote Data Storage

MongoDB is a NoSQL database or object store that is relatively easy to use.

mLab is a company which offers cloud based MongoDB hosting with a REST API that we can easily utilize within PhoneGap/Cordova

Let's go through the Quick Start

Create a Single-node, Standard Line, Sandbox database with a name that makes sense for your application. Mine is called "aoactest".

Next you'll need a user to connect, click on the database and create one. Mine is "test", test; probably a bad idea.

Next, we'll want to create a "collection" and add some "documents" to start playing with the database. Mine is called "test", still probably a bad idea.

Finally, we'll need to turn on Data API Access for our user to get an API key

We can test by getting a list of our databases: https://api.mlab.com/api/1/databases?apiKey=YOUR API KEY

The Data API has a good overview of what we can do

Now, let's do something simple in Cordova to get a start: example