SlideShare ist ein Scribd-Unternehmen logo
1 von 19
CouchApp Build scalable web applications and relax Wien, 7. April 2011 Gerhard Hipfinger
Before we begin First we need a brief intro to CouchDB
CouchDB is a schema free document store Access your documents via restful HTTP API JSON is used as document format What is CouchDB?
A simple example { "_id": "e3bcabbd12e92e4ea28198f5ad00756a", "_rev": "57-68386422f4554017aae948f0e5526425", "active": true, "email": "gerhard.hipfinger@openforce.com", "firstname": "Gerhard", "lastname": "Hipfinger", "dbName": "tempo_93aa6c3872ea46bb909365317c8dbfc3", "liveViewDayFolded": true, "liveViewWeekFolded": false, "liveViewMonthFolded": false, "creation": "2010-08-03T17:54:05.641+02:00", "docType": "TempoUser" }
How to access documents? Directly by URL and the document key Views (JavaScript Map/Reduce Scripts)
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); }
What else can we do? Update functions for validation or authorization List functions for rendering lists Show functions for showing documents Binary attachments
So what? Finally   you   can   save   your  app in CouchDB!
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!
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
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
CouchApp file mapping myapp/ views/ foobar/ map.js reduce.js { "_id" : "_design/myapp", "views" : { "foobar" : { "map" : "contents of map.js", "reduce" : "contents of reduce.js" } } }
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
One solution for all apps? Relax in any case?
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!
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
Questions?
Useful resources http://couchapp.org/ http://couchapp.org/page/evently-primer http://couchapp.org/page/evently-do-it-yourself http://couchdb.apache.org/ http://guide.couchdb.org/
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

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

Lies, Damn Lies, and Benchmarks
Lies, Damn Lies, and BenchmarksLies, Damn Lies, and Benchmarks
Lies, Damn Lies, and Benchmarks
 
Web::Scraper
Web::ScraperWeb::Scraper
Web::Scraper
 
Task Scheduling and Asynchronous Processing Evolved. Zend Server Job Queue
Task Scheduling and Asynchronous Processing Evolved. Zend Server Job QueueTask Scheduling and Asynchronous Processing Evolved. Zend Server Job Queue
Task Scheduling and Asynchronous Processing Evolved. Zend Server Job Queue
 
Node.js Lightning Talk
Node.js Lightning TalkNode.js Lightning Talk
Node.js Lightning Talk
 
Designing net-aws-glacier
Designing net-aws-glacierDesigning net-aws-glacier
Designing net-aws-glacier
 
hacking with node.JS
hacking with node.JShacking with node.JS
hacking with node.JS
 
Modern Perl Web Development with Dancer
Modern Perl Web Development with DancerModern Perl Web Development with Dancer
Modern Perl Web Development with Dancer
 
Front End Development Automation with Grunt
Front End Development Automation with GruntFront End Development Automation with Grunt
Front End Development Automation with Grunt
 
Selenium Sandwich Part 1: Data driven Selenium
Selenium Sandwich Part 1: Data driven Selenium Selenium Sandwich Part 1: Data driven Selenium
Selenium Sandwich Part 1: Data driven Selenium
 
Scalable web application architecture
Scalable web application architectureScalable web application architecture
Scalable web application architecture
 
Selenium sandwich-2
Selenium sandwich-2Selenium sandwich-2
Selenium sandwich-2
 
Introduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCatsIntroduction to NodeJS with LOLCats
Introduction to NodeJS with LOLCats
 
Node.js
Node.jsNode.js
Node.js
 
Modern Perl
Modern PerlModern Perl
Modern Perl
 
Rush, a shell that will yield to you
Rush, a shell that will yield to youRush, a shell that will yield to you
Rush, a shell that will yield to you
 
Djangocon 2014 angular + django
Djangocon 2014 angular + djangoDjangocon 2014 angular + django
Djangocon 2014 angular + django
 
Node.js: CAMTA Presentation
Node.js: CAMTA PresentationNode.js: CAMTA Presentation
Node.js: CAMTA Presentation
 
Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!Forget Grunt and Gulp! Webpack and NPM rule them all!
Forget Grunt and Gulp! Webpack and NPM rule them all!
 
MongoDB and Node.js
MongoDB and Node.jsMongoDB and Node.js
MongoDB and Node.js
 
Perl: Hate it for the Right Reasons
Perl: Hate it for the Right ReasonsPerl: Hate it for the Right Reasons
Perl: Hate it for the Right Reasons
 

Andere mochten auch

Optimizing WordPress - WordPress SF Meetup April 2012
Optimizing WordPress -  WordPress SF Meetup April 2012Optimizing WordPress -  WordPress SF Meetup April 2012
Optimizing WordPress - WordPress SF Meetup April 2012
Ben Metcalfe
 

Andere mochten auch (11)

Seks råd for å lykkes i arbeidslivet
Seks råd for å lykkes i arbeidslivetSeks råd for å lykkes i arbeidslivet
Seks råd for å lykkes i arbeidslivet
 
jQuery & CouchDB - Die zukünftige Webentwicklung?
jQuery & CouchDB - Die zukünftige Webentwicklung?jQuery & CouchDB - Die zukünftige Webentwicklung?
jQuery & CouchDB - Die zukünftige Webentwicklung?
 
5 trekk som hjelper deg å lykkes
5 trekk som hjelper deg å lykkes5 trekk som hjelper deg å lykkes
5 trekk som hjelper deg å lykkes
 
Seks eten
Seks etenSeks eten
Seks eten
 
Porno preek
Porno preekPorno preek
Porno preek
 
openExperts Talk: die Cloud und ich
openExperts Talk: die Cloud und ichopenExperts Talk: die Cloud und ich
openExperts Talk: die Cloud und ich
 
Spatial Perception
Spatial PerceptionSpatial Perception
Spatial Perception
 
Web Testen mit Selenium
Web Testen mit SeleniumWeb Testen mit Selenium
Web Testen mit Selenium
 
Optimizing WordPress - WordPress SF Meetup April 2012
Optimizing WordPress -  WordPress SF Meetup April 2012Optimizing WordPress -  WordPress SF Meetup April 2012
Optimizing WordPress - WordPress SF Meetup April 2012
 
openExperts Talk - Kunden an die Macht
openExperts Talk - Kunden an die MachtopenExperts Talk - Kunden an die Macht
openExperts Talk - Kunden an die Macht
 
openExperts Talk - 12 Jahre agiles Manifest
openExperts Talk - 12 Jahre agiles ManifestopenExperts Talk - 12 Jahre agiles Manifest
openExperts Talk - 12 Jahre agiles Manifest
 

Ähnlich wie CouchApp - Build scalable web applications and relax

Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP
yucefmerhi
 
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
Mahbubur Rahman
 
Spark For The Business Analyst
Spark For The Business AnalystSpark For The Business Analyst
Spark For The Business Analyst
Gustaf Cavanaugh
 

Ähnlich wie CouchApp - Build scalable web applications and relax (20)

From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
From Zero to Hadoop: a tutorial for getting started writing Hadoop jobs on Am...
 
Php intro
Php introPhp intro
Php intro
 
jQuery Presentation - Refresh Events
jQuery Presentation - Refresh EventsjQuery Presentation - Refresh Events
jQuery Presentation - Refresh Events
 
Eugene Andruszczenko: jQuery
Eugene Andruszczenko: jQueryEugene Andruszczenko: jQuery
Eugene Andruszczenko: jQuery
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Justmeans power point
Justmeans power pointJustmeans power point
Justmeans power point
 
Improving code quality using CI
Improving code quality using CIImproving code quality using CI
Improving code quality using CI
 
Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP Lecture 3 - Comm Lab: Web @ ITP
Lecture 3 - Comm Lab: Web @ ITP
 
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
Taking Advantage of Client Side / JavsScript Templates in Rich Internet Appli...
 
Redis And python at pycon_2011
Redis And python at pycon_2011Redis And python at pycon_2011
Redis And python at pycon_2011
 
Grails and Dojo
Grails and DojoGrails and Dojo
Grails and Dojo
 
Web services - REST and SOAP
Web services - REST and SOAPWeb services - REST and SOAP
Web services - REST and SOAP
 
Spark For The Business Analyst
Spark For The Business AnalystSpark For The Business Analyst
Spark For The Business Analyst
 
Silver Light By Nyros Developer
Silver Light By Nyros DeveloperSilver Light By Nyros Developer
Silver Light By Nyros Developer
 

Kürzlich hochgeladen

Kürzlich hochgeladen (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 

CouchApp - Build scalable web applications and relax

  • 1. CouchApp Build scalable web applications and relax Wien, 7. April 2011 Gerhard Hipfinger
  • 2. Before we begin First we need a brief intro to CouchDB
  • 3. CouchDB is a schema free document store Access your documents via restful HTTP API JSON is used as document format What is CouchDB?
  • 4. A simple example { "_id": "e3bcabbd12e92e4ea28198f5ad00756a", "_rev": "57-68386422f4554017aae948f0e5526425", "active": true, "email": "gerhard.hipfinger@openforce.com", "firstname": "Gerhard", "lastname": "Hipfinger", "dbName": "tempo_93aa6c3872ea46bb909365317c8dbfc3", "liveViewDayFolded": true, "liveViewWeekFolded": false, "liveViewMonthFolded": false, "creation": "2010-08-03T17:54:05.641+02:00", "docType": "TempoUser" }
  • 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
  • 8. So what? Finally you can save your app in CouchDB!
  • 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
  • 12. CouchApp file mapping myapp/ views/ foobar/ map.js reduce.js { "_id" : "_design/myapp", "views" : { "foobar" : { "map" : "contents of map.js", "reduce" : "contents of reduce.js" } } }
  • 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
  • 14. One solution for all apps? Relax in any case?
  • 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
  • 18. Useful resources http://couchapp.org/ http://couchapp.org/page/evently-primer http://couchapp.org/page/evently-do-it-yourself http://couchdb.apache.org/ http://guide.couchdb.org/
  • 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