Book Image

Learning Node.js for Mobile Application Development

Book Image

Learning Node.js for Mobile Application Development

Overview of this book

Table of Contents (21 chapters)
Learning Node.js for Mobile Application Development
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
14
Creating an E-Commerce Application Using the Ionic Framework
Index

A refresher – WebSockets


Before we move on, let's have a quick refresher on an important concept that we visited earlier—WebSockets.

WebSockets is a standardized Internet protocol, which allows for direct server-to-client communication over a network. This is rather unusual in the world of traditional client-server architecture, where almost all communication is initiated by the client and the server simply responds to such communication.

WebSockets makes it easy to build real-time apps because the server can dynamically push new data to the connected clients as soon as its state changes. This is ideal for chat applications, in which we would otherwise have to use more tedious and resource-consuming approaches, such as polling, in order to approximate the same effect.

For a deeper understanding of WebSockets, please refer to Chapter 5, Real-Time Data and WebSockets, where we dealt with them in depth.