The Chattrbox Client Application

You already built the Chattrbox server, which serves out the static files and handles communication over WebSockets. The client application will send and receive messages to and from the server over WebSockets. It will define a format for individual messages. The user will be able to view the messages in a list as well as create new messages by entering text into a form.

Those responsibilities will be handled by three modules:

  • the ws-client module will manage the WebSockets communication for the client

  • the dom module will display data to the UI and handle form submissions

  • the app module will define the structure of messages and pass messages between ws-client and dom

Figure 17.5 diagrams ...

Get Front-End Web Development: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.