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. You have learned how to create a simple application with some limited features. There can be many additions made to this application and it can be made more powerful. Let's give you some tips on features that you can develop.

Input username

Whenever the user visits the URL, the application asks for the username. The username that is inputted is displayed in the top-left corner of the screen. I think this scenario is quite easy to build. I will leave its implementation to you. It is easy up to the point that we want to show the list of users, which is basically our next scenario.

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 the server side. Let me list down some key points that you need to implement this feature:

  1. As soon as the user enters the name, save it on the server side. This can be achieved by sending...