Skip to main content

Resources

Videos and Tutorials for Couchapp Development and Deployment

Requirements

  1. Knowledge of: HTML, Javascript and CSS
  2. A Couch* compatible backend: you may use our hosted versions of CouchDB and Barrell.
  3. DDoc.Lab or similar, to develop your couchapps.
  4. Optionally Postman or similar, to easily test your API.

Fundamentals

Being web servers, Couch* backends can serve content over HTTP. Depending on the type of content to serve (Assets, Static, Dynamic, SEO friendly, Ajax), one of these two techniques may be used:

  1. Content from attachments

    This is the simplest way to retrieve content from CouchDB. The content is uploaded as attachment to a database document and then retrieved by browsers as it is, withouth any manipulation. Updating the content is done by overwriting the old attachment again.

    Useful for: Static web pages, Single Page Applications, Assets files(Javascript, CSS, images such as icons or logo)

  2. Server side rendered content

    Server side rendering is useful to generate dynamic content, depending on the state of your database, the user who logged-in, the date, ip address or other parameters usually derived from the HTTP Request Header or Body. This technique allows templating, a way to merge content from database with HTML templates.

    Useful for: Dynamic web pages, Template rendering, Search Engine Optimization


Getting Started

Couch* API Basis

The video introduces methods to store and retrieve content from a Couch* backend, that is a backend compatible with the CouchDB HTTP API.

Futon, the default CouchDB administration interface is used to create a new database and put documents inside. The Postman http client is then used to access data using methods provided by the API.

VIDEO COMING SOON...

Hello World

The video shows how to use ddoc.lab to create a simple static website as a couchapp. Here we take HTML and assets files from the bootstrap jumbotron example.

Web page source and assets are uploaded as attachments to a database document, and navigated by simply accessing the document URLs. This URL is then connected to a domain, to let the page be served withouth the need for any complicated path.

VIDEO COMING SOON...

World of fruits

The homepage shows a list of fruits, each one representing a single database document of type fruit. Each fruit can then be clicked to access a dynamically generated and SEO friendly web page showing its details.

The video shows how to create HTML pages from your database documents. Handlebars templating library is used to merge data together with a defined HTML template.

VIDEO COMING SOON...

Todo List

Example of a Single Page Application, implementing a classic Todo List to keep tracks of activities.

VIDEO COMING SOON...


Tutorials

Chatty Couchapp Tutorial

Chatty is a chat application implemented as a Single Page Application. All components are couchapps: administration backend to create regular users and frontends to chat with other users.

The Chatty Tutorial has been developed by Smileupps Team, to illustrate:

  1. real-time push messaging
  2. domain-based User Interface selection
  3. read and write security
  4. reads are performed using long-polling
  5. writes(insert/update/delete) are performed using a general purpose action-based API: each database document has a type, which defines exactly the actions allowed.

Case studies

Lesorub.pro

The website is a Content Management System, where all components are couchapps: backend, frontend and dev environment. Each database document has a type (Company, People, Text, User) which defines the HTML template to use for rendering and the actions allowed for that type.

Lesorub.pro is the website project of the russian regional lumberjack championship. Main project objectives: offline-ready backend, integrated championship-related apps and flexibility.

The author ermouth is a long-time CouchDB contributor, author of cloudwall.me, jquery.my and ddoc.me, the in-browser Couchapp Development Environment.


Publish to Store

COMING SOON