Planza (opens in new tab) is a web application for planning events, whether that means trips, a night out - or pretty much anything else. The lead JavaScript developer at Planza, Christophe Vingerhoets, tells us the technology behind this complex application, which uses Backbone on the frontend and a Node server on the backend and connects using WebSockets.
By using Sockets, Planza is able to do a lot of things in real time:
"Planza is a single-page HTML5 web application. On load, all JavaScript and templates are sent to the client, which will establish a WebSocket connection to our Node servers that will start listening to backend updates," says Vingerhoets.
"Whenever a database update occurs," he adds, “Redis (opens in new tab) will publish the updated model (JSON) to all clients so the frontend models of all subscribers of that particular Redis channel are synced. A Backbone View will then automatically respond to this data update, so a Handlebars (opens in new tab) template can be parsed and the UI will respond accordingly... and all this in real time to enhance user experience!”
This article originally appeared in net magazine issue 247.
Liked this? Read these!
- Create a perfect mood board (opens in new tab) with these pro tips
- The ultimate guide to logo design (opens in new tab)
- Brilliant Wordpress tutorial (opens in new tab) selection