Giter Club home page Giter Club logo

couchdb_workshop's Introduction

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.

couchdb_workshop's People

Contributors

klaustrainer avatar sebastianrothbucher avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.