Offline/Online Sync in a Real World Ionic Application with CouchDB
This is supposed to be a longer description
Introduction to PouchDB
An introduction to the basics of PouchDB
PROModule Outline
- Source Code & Resources PRO
- Lesson 1: Introduction PUBLIC
- Lesson 2: Application Requirements PUBLIC
- Lesson 3: A Brief Introduction to NoSQL PUBLIC
- Lesson 4: Introduction to CouchDB PRO
- Lesson 5: Introduction to PouchDB PRO
- Lesson 6: Structuring Data in CouchDB PRO
- Lesson 7: Installing CouchDB Locally PRO
- Lesson 8: Adding Data to Futon PRO
- Lesson 9: Starting the Application PRO
- Lesson 10: Setting up the Basic User Interface PRO
- Lesson 11: Using Design Documents to Create Views in CouchDB PRO
- Lesson 12: Getting Data From CouchDB into Ionic PRO
- Lesson 13: Using Node, Express, and SuperLogin PRO
- Lesson 14: Login and Registration PRO
- Lesson 15: Offline Access and Reauthentication PRO
- Lesson 16: Advanced Form Validation PRO
- Lesson 17: Restricting Document Updates PRO
- Lesson 18: Filtering Data from CouchDB PRO
- Lesson 19: Improving User Experience PRO
- Lesson 20: Migrating to Production PRO
- Lesson 21: Conclusion PRO
Lesson Outline
Introduction to PouchDB
We've covered the basics of what CouchDB is and why we are going to be using it to build this application, but I've also mentioned another technology called PouchDB. In this lesson, we are going to cover what PouchDB is, why we would want to use it, and how it differs to CouchDB.
Essentially, PouchDB is a JavaScript implementation of a CouchDB database. Rather than sitting on a server somewhere "in the cloud", the database is on the user's device itself. PouchDB also provides a useful API that we can use to interact with the local database.
You can run a PouchDB database in complete isolation if you want to. If all you are interested in is local data storage, but the requirements of your application would benefit from a CouchDB style document database, you can just install PouchDB and use it locally. In this scenario, it would be similar to using Ionic's Storage API, just with a lot more functionality (Ionic's Storage API is more like a simple key-value NoSQL database, whereas PouchDB would provide us with a fully featured document based database).
Although PouchDB and CouchDB are two different things, any database that uses the CouchDB protocol can be easily synced to any other database that uses the same protocol.
We can easily sync a local PouchDB database to a remote CouchDB database. Syncing means that any changes made to the local PouchDB database will automatically be reflected in the remote CouchDB database, and any changes made to the remote CouchDB database will be reflected in the local PouchDB database. This isn't just limited to two databases either, you could have any number of local PouchDB databases synced to any number of remote CouchDB databases.
To summarise:
Thanks for checking out the preview of this lesson!
You do not have the appropriate membership to view the full lesson. If you would like full access to this module you can view membership options (or log in if you are already have an appropriate membership).