On the frontend Im using Sproutcore.
The question is how the backend is going to look like.
Solutions:
Could CouchApp really replace Node.js on the backend regarding?
CouchApp is a JavaScript and HTML5 app that can be served directly to the browser from CouchDB, without any other software in the stack.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With