Synchronizing Offline App Data with PouchDB
Applications which can work online and offline are an advantage to mobile users. For example, someone traveling by air generally has no internet connection. With a well designed app they can still work in offline mode and synchronize the offline data with an application server.
How Does This Work?
When the application is offline, the data is stored using HTML 5 local storage and session storage objects to store data in the browser or WebView. When the application is online, its programming logic will synchronize changes to a central database.
Continue reading %Synchronizing Offline App Data with PouchDB%
via nolanlawson/ember-pouch · GitHub.
Ember Pouch is a PouchDB/CouchDB adapter for Ember Data.
With Ember Pouch, all of your app’s data is automatically saved on the client-side using IndexedDB or WebSQL, and you just keep using the regular Ember Data
store API. This data may be automatically synced to a remote CouchDB (or compatible servers) using PouchDB replication.
What’s the point?
- You don’t need to write any server-side logic. Just use CouchDB.
- Data syncs automatically.
- Your app works offline, and requests are super fast, because they don’t need the network.
For more on PouchDB, check out pouchdb.com.
via We have a problem with promises.
No, not with promises themselves. Promises, as defined by the A+ spec, are awesome.
The big problem, which has revealed itself to me over the course of the past year, as I’ve watched numerous programmers struggle with the PouchDB API and other promise-heavy APIs, is this:
Many of us are using promises without really understanding them.
via Connecting PouchDB to Cloudant on IBM Bluemix – BlueMix Dev.
So, as always, I tend to feel I’m a bit late to things. Earlier today my coworker Andy Trice was talking to me about PouchDB. PouchDB is a client-side database solution that works in all the major browsers (and Node.js) and intelligently picks the best storage system available. It is even smart enough to recognize that while Safari supports IDB, it doesn’t make sense to use it and switches to WebSQL. It has a relatively simply API and best of all – it hasincredibly simple sync built in.
via Taming the asynchronous beast with ES7.
One of the trickiest aspects of PouchDB is that its API is asynchronous. I see no shortage of confused questions on Stack Overflow, Github, and IRC, and most often they stem from a misunderstanding of callbacks and promises.
We can’t really help it. PouchDB is an abstraction over IndexedDB, WebSQL, LevelDB (in Node), and CouchDB (via Ajax). All of those APIs are asynchronous; hence PouchDB must be asynchronous.