How Kanso Processes Requests
Kanso makes it easy to re-use code between the client and server wherever possible, but to be used effectively you must understand how requests are processed.
- The browser makes a request to
- CouchDB looks up the show / list / update function that
- This function is executed server-side by CouchDB, rendering a HTML page containing the document or view.
/fooand executes it again, client-side. This allows the application developer to enhance the page by making additional requests and generally doing things CouchDB wouldn't normally allow.
- Kanso binds event handlers for every form submit and link click (even ones yet to exist). If the target URL is part of your app, Kanso will look up the new show / list / update function and execute it client-side without a round-trip to the server (apart from fetching relevent documents or views).