Book Image

Websocket Essentials: Building apps with HTML5 websockets

By : Varun Chopra
Book Image

Websocket Essentials: Building apps with HTML5 websockets

By: Varun Chopra

Overview of this book

Table of Contents (13 chapters)
WebSocket Essentials – Building Apps with HTML5 WebSockets
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
6
Enhancing HTML5 Web Application Development Using Modern Tools
Index

Do it yourself


This application is a very simple and easy-to-build application. We have seen how to create a simple application with some limited features. Many additions can be added to this application to make it more powerful. Let's give you some tips and information on features that you can develop.

User registration

Whenever the user opens the URL, a log-in/sign-up dialog box will open. User details such as his/her name will be displayed in the top-left corner of the screen.

Tip

This scenario will need a database connection. There are some databases available which can be easily connected to our Node.js server, such as MongoDB. I will leave its method of implementation to you. For help in connecting Node.js and MongoDB, visit http://mongodb.github.io/node-mongodb-native/.

The list of users

Make a button which will show you a list of users that are currently online. This scenario needs code changes both on the client as well as the server side. Let me list down some key points that you need...