Callbacks suck, async is easy

I’m using PouchDB lately, a JavaScript database that works in the browser. PouchDB for Javascript requires callbacks and I found myself stacking quite a bit of JS-specific syntax together. I haven’t written JS in quite a while so this was daunting. Lets go through all the pieces that add up to easy async database calls.

Synchronous PHP example

Here is a PHP sample of accessing a database.

[Read More]