Skip to content

Instantly share code, notes, and snippets.

@ngpestelos
Created April 25, 2010 14:51
Show Gist options
  • Save ngpestelos/378452 to your computer and use it in GitHub Desktop.
Save ngpestelos/378452 to your computer and use it in GitHub Desktop.
Had some time during the weekend to tinker with CouchApps and Evently.
0 - Preliminaries
* setup couchdb 0.11 and couchapp
* remove old couchdb versions lying around your system
* there's a current issue with ubuntu 9.10 and javascript libraries (installing libmozjs removes firefox)
* a CouchApp is a wrapper for a design doc
1 - Where to start?
* generate a couchapp
* (_attachments/index.html) a good starting point (generated by couchapp)
* (_attachments/index.html) link to app.js
* (_attachments/app.js) acts as a bootstrap (links divs with evently widgets)
* what is an evently widget? a collection of markup, data, and js code that responds to events
2 - Server admin
* no users? everybody's an admin
3 - account widget
* how to trigger a signup? (see signup method in jquery.couch.js)
* signup method calls saveDoc (ajax call using PUT or POST)
* prepareUserDoc handles prefixes and password encryption
* form (on submit calls doSignup)
4 - app object
* jquery.couchapp.js ($.couch.app)
* how to get db object? (app has a db property)
* how to query a view? (app.design.view)
* what is handleDDoc?
References
* CouchDB book
* Taskr code and documentation
* jchris video on how to setup security
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment