KlausTrainer / couchdb_workshop

Repository for the OpenTechSchool Dortmund CouchDB Workshop Event

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CouchDB Workshop

Prerequisites

  • Apache CouchDB 1.6.1
  • A current version of NodeJS or io.js

Installation Instructions

Exercises

The following exercises are supposed to be performed on the feeds app, which is located in the feeds_app directory. See the installation instructions above.

Document Update Validation

Write a document validate document update function that prevents non-admins from deleting documents. Store the function in couch/validate_doc_update.js, and push it to your feeds database by using couch-push the same way you did when installing the app (see above).

See http://docs.couchdb.org/en/1.6.1/couchapp/ddocs.html#vdufun.

Load More Articles

On the lower left corner of the page, there is a "Load more articles"-button, which has no functionality attached to it yet, however. When the button is clicked, load the next eight articles, sorted in descending by their postedTime timestamp key order, by using the recent_articles view that is already included.

See http://docs.couchdb.org/en/1.6.1/api/ddoc/views.html, and http://docs.couchdb.org/en/1.6.1/couchapp/views/pagination.html.

Favorites

On the lower right corner of each article, there is a white star, which is supposed to be used as "Favorite"- or "Unfavorite"-button, respectively. It has no functionality attached to it yet, however. When an article has been marked as favorite, a black star should be displayed instead of a white one. It should be possible to revert a favorite, i.e., unmark a favorite article.

See http://docs.couchdb.org/en/1.6.1/api/document/common.html.

Sample Solutions

Document Update Validation

See validate_doc_update branch.

Load More Articles

See load-more-articles branch.

Favorites

See favorites branch.

Favorites (advanced version)

See advanced-favorites branch.

About

Repository for the OpenTechSchool Dortmund CouchDB Workshop Event


Languages

Language:JavaScript 65.4%Language:HTML 23.1%Language:CSS 11.4%