A single-page application (SPA), also known as single-page interface (SPI), is a web application or web site that fits on a single web page with the goal of providing a more fluid user experience similar to a desktop application.
Single page apps are distinguished by their ability to redraw any part of the UI without requiring a server roundtrip to retrieve HTML. This is achieved by separating the data from the presentation of data by having a model layer that handles data and a view layer that reads from the models.
Single page applications are more capable of decreasing load time of pages by storing the functionality once it is loaded the first time, allowing easier data transfer between pages and a more complex user interface instead of trying to control so much from the server.
An SPA can deliver the best of both worlds: the immediacy of a desktop application and the portability and accessibility of a website. With a little effort, it can support desktops, tablets, and smart phones running many different operating systems. SPAs are easily updated and distributed, usually without requiring any action from the user.
Technologies | Description |
Node.js | Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. | CoffeeScript | CoffeeScript is a little language that compiles into JavaScript. |
Backbone.js | With Backbone, you represent your data as Models, which can be created, validated, destroyed, and saved to the server. Whenever a UI action causes an attribute of a model to change, the model triggers a "change" event; all the Views that display the model's state can be notified of the change, so that they are able to respond accordingly, re-rendering themselves with the new information. In a finished Backbone app, you don't have to write the glue code that looks into the DOM to find an element with a specific id, and update the HTML manually — when the model changes, the views simply update themselves. |
WebSocket | WebSocket is a web technology providing full-duplex communications channels over a single TCP connection. |
Socket.IO | Socket.IO aims to make realtime apps possible in every browser and mobile device, blurring the differences between the different transport mechanisms. It's care-free realtime 100% in JavaScript. |
HTML5 Pushstate | To enable servers to push data to Web pages over HTTP or using dedicated server-push protocols |
MongoDB | MongoDB is an open-source document database, and the leading NoSQL database. |
Mongoose | Mongoose provides a straight-forward, schema-based solution to modeling your application data and includes built-in type casting, validation, query building, business logic hooks and more, out of the box. |
Express | Express is a minimal and flexible node.js web application framework, providing a robust set of features for building single and multi-page, and hybrid web applications. |
Connect | Connect is a middleware framework for node, shipping with over 18 bundled middleware and a rich selection of 3rd-party middleware. |
Async.js | Async is a utility module which provides straight-forward, powerful functions for working with asynchronous JavaScript. |
Redis | Redis is an open source, BSD licensed, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. |
Cluster | Extensible multi-core server management for nodejs. |
HARProxy | HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. It is particularly suited for web sites crawling under very high loads while needing persistence or Layer7 processing. Supporting tens of thousands of connections is clearly realistic with todays hardware. |