The document introduces CouchApp, a tool that helps organize CouchDB applications. CouchApp generates application skeletons and provides libraries for frontend development. It also helps manage design documents through its deployment process. However, CouchApp may not be suitable for all applications and is better suited for smaller single-page applications where business logic is not massive. Larger sites can become hard to maintain with only CouchApp's rudimentary tool support.
5. How to access documents? Directly by URL and the document key Views (JavaScript Map/Reduce Scripts)
6. Map/Reduce sample function(doc) { if(doc.docType == 'TempoUser') { var date = doc.creation.substring(0,10); emit(date, 1); } } Map function Reduce function function(keys, values, rereduce) { return sum(values); }
7. What else can we do? Update functions for validation or authorization List functions for rendering lists Show functions for showing documents Binary attachments
9. Now what's about CouchApp? CouchApp is a tool that helps you organize your CouchDB apps It's something like Ruby on Rails for CouchDB apps But it's not that easy and mature!
10. First steps with CouchApp Install CouchApp – it's a Python app Generate an application with couchapp generate You now have an ready to deploy CouchDB app
11. Maintain and Deploy You can use git, svn or whatever you want to manage your app couchapp push is used to deploy your app to a CouchDB node CouchApp finally helps you to maintain your design documents
13. CouchApp programming model CouchApp is much more than a code generator It also contains frontend libraries for fast UI development jQuery based Ajax „Evently“ and „Pathbinder“ JavaScript Frameworks for UI event handling
15. One solution for all apps? NO CouchApp is great to manage your design documents Don't manage your design documents (views, update functions) without CouchApp But be carefull when you try to create webapps only with CouchApp!
16. Good for... Small web apps that can be handled in a single page (like GWT) When your webapp does not require massive busines logic Bigger sites become hard to maintain Tool support only rudimentary
19. Gerhard Hipfinger openForce Information Technology GesmbH Dresdner Str. 108 / 3. Stock / Top 11 1200 Wien TEL +43 1 3191775 FAX +43 1 3191775-20 http://openforce.com