Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CouchApp vs Node.js

On the frontend Im using Sproutcore.

The question is how the backend is going to look like.

Solutions:

  • CouchApp
  • Node.js between Sproutcore and CouchDB

Could CouchApp really replace Node.js on the backend regarding?

  • Websockets/streaming
  • Asynchronous processing
  • Collection of third party libraries
  • Security
  • Speed
like image 774
ajsie Avatar asked Nov 30 '10 04:11

ajsie


People also ask

What is CouchApp?

CouchApp is a JavaScript and HTML5 app that can be served directly to the browser from CouchDB, without any other software in the stack.

Is node JS and node js same?

NodeJS is a cross-platform and opensource Javascript runtime environment that allows the javascript to be run on the server-side. Nodejs allows Javascript code to run outside the browser. Nodejs comes with a lot of modules and mostly used in web development.

For which node JS is not recommended?

js receives a CPU bound task: Whenever a heavy request comes to the event loop, Node. js would set all the CPU available to process it first, and then answer other requests queued. That results in slow processing and overall delay in the event loop, which is why Node. js is not recommended for heavy computation.

Is Node JS good for networking?

Single-page Application (SPA) Development Node JS can create a single-page app that looks and feels like a desktop program, just like single-page web pages. Therefore, it is great for building social networking platforms, dynamic websites, and email solutions.


2 Answers

CouchApp is nothing more than an easy way to deploy code to your CouchDB. It doesn't expand it's functionality but let's you use what's given easy way. So it's not CouchApp vs Node.js but rather what doesn't CouchApp have from the list of features you need to build your app.

If you need websockets/streaming go with Node.js middleware. CouchDB doesn't have 'em.

And if you give some details about your project I can try to give more complete answer.

like image 170
Nek Avatar answered Oct 03 '22 06:10

Nek


I would recommend you watch Mikeal Rogers talk on how CouchApp and Node.js work together. http://jsconf.eu/2010/speaker/nodejs_couchdb_crazy_delicious.html

Keep in mind that a couchapp is, at it's very basic level, simply a file structure within Couchdb (_design) where your js (or other) code resides and is served from. The key benefit is that any code changes in one place will be replicated to all couchdb instances. It makes it a lot easier to maintain widely distributed code.

like image 37
Lee Avatar answered Oct 03 '22 05:10

Lee