Our First Node.js App: Backbone on the Client and Server. Here at Airbnb, we’ve been looking curiously at Node.js for a long time now.
We’ve used it for odds and ends, such as the build process for some of our libraries, but we hadn’t built anything production-scale. Until now. The Problem There’s a disconnect in the way we build rich web apps these days. In order to provide a snappy, fluid UI, more and more of the application logic is moving to the client. But all too often, it’s not so clean; application logic is somewhat arbitrarily split between client and server, or in some cases needs to be duplicated on both sides. If you’ve seen my tech talk or last blog post, then all this should sound familiar. This Holy Grail approach is something we had dreamt about for a long time, but not having any experience with Node.js, we didn’t quite know where to start. Our Solution I’m proud to announce that we’ve launched our first Holy Grail app into production!
The performance gains are an awesome side effect of this design. Gimme the Deets! Views. NodeCellar: Sample Application with Backbone.js, Twitter Bootstrap, Node.js, Express, and MongoDB. In my previous post, I shared my recent experience building a RESTful API with Node.js, MongoDB, and Express.
In this post, I’m sharing the client application that uses that RESTful API. The Node Cellar application allows you to manage (retrieve, create, update, delete) the wines in a wine cellar database. The client application is built with Backbone.js and Twitter Bootstrap. Run the Application You can run the application here. NOTE: Node.js is running on port 3000 on my EC2 Instance.
Server-Side The details of the Node.js, MongoDB, and Express implementation are documented in my previous post. Client-Side In this application, Node.js is used to provide the RESTful services that the client application needs to manipulate the data. This is a Node.js and MongoDB powered version of an application I initially posted here with PHP and Java backends.
Source Code The source code is available in this repository on GitHub. A Full Javascript Architecture, Part One - NodeJS. This post is the first of a three-part series showing how to build a complete javascript architecture using : NodeJS : For the server side.
We will use Socket.IO to manage long-terms real-time connection.Google Chrome Extension : For the client side. WebSocket, Notification and Local Storage will be used.MongoDB : To store the datas. To illustrate our architecture we are going to create a Node application that will track tweets about the “What’s Next” event and broadcast them in real time to the clients. The client will be a Google Chrome browser extension and will use two features of the HTML5 specification to display the tweets broadcasted by the server. This first part is dedicated to the creation of a Node application. Introduction to Node What is Node ? Node is an open source toolkit for developing server side applications based on the V8 JavaScript engine. Node is part of the Server Side JavaScript environnement and extend JavaScript API to offer usual server side functionalities.