Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, depending on how the access and security is setup. If the user has access to the database, they can just open the _design document and edit the html template, JavaScript code, the view, list and show functions.

For those that are still confused a bit, couchapp takes advantage of the fact that couchdb is accessed via a RESTful interface. Documents and databases are identified and accessed with URLs.

Typically your client and couchdb speak JSON to each other. When you GET a resource, you just get back a JSON object.

However:

1. You can change the format of what you get back. You can also return back XML, HTML, XHTML, etc., instead of JSON.

2. You can add attachments to documents. Attachments can be images, html pages, anything. You can specify the content type and couchdb will happily serve those when you click the attachment resource URL.

CouchApp takes advantage of those 2 things. It renders html page templates saved as document attachments, and fills those in with data from some view (read: query), and then returns HTML.

It basically cuts out the traditional middle layer by performing that work inside the database.

Combined with the fact that replication works so well in couchdb, you can just move your web app just by replicating a database: a one-step process.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: