
Learn the basics of real-time communication with Socket.IO to build a simple chat application and web games, with a QuickDraw introduction and practical examples.
socket io enables bidirectional communication between the browser and the server, with the server pushing data and clients emitting events to the server or connected users, built on web sockets.
Explore what the WebSocket is, how it enables bidirectional, persistent client-server communication until one side terminates, and distinguish it from Socket.IO’s WebSocket-based approach.
Compare socket.io and WebSocket differences, highlighting broadcast to all connected users, ease of use, scalability, automatic reconnection, and fallback support when websockets aren’t available.
Learn to build a chat app with http by sending post requests and polling the server for new messages, and see why http isn't ideal for real-time emission.
Build a real-time chat with socket.io by connecting clients to a server, emitting and listening for chat events, and broadcasting messages to all connected users or room members, with validation.
Explore setting up an http server, connecting to socket.io, and enabling bidirectional client-server communication in rooms. Introduce namespaces and vanilla JavaScript UI to build a simple chat app.
Install Node.js, the JavaScript runtime built on Chrome's V8, verify the installation with node -v and npm -v, and create a simple http server that connects with socket.io.
Create an http server with express and socket.io, initialize an npm project, set up public files, connect client and server for bidirectional communication on port 5000.
Create an index.html in a public folder, link the main.js script, run the node server, and open http://localhost:5000 to verify the client page and prepare the socket io connection.
Establish a client-side socket.io connection to a local server on port 5000, initialize io, listen for the connect event, log the socket id, and align client-side and server-side handling.
Explore bidirectional communication with socket.io by emitting and listening to events between server and client, including handling connect events, room-based messaging, and basic hello events.
Create an introduction page by adding a stylesheet in a success folder, linking it in index.html, and including a name input and a button to enter the chat page.
Attach an event listener to the name input using a query selector. Capture and store the username in a module and export default functions for getting and setting it.
Create a chat page, add a button click listener to capture the entered name, display a user label, and switch from introduction to chat page.
Implement logic to switch between introduction and chat pages by toggling display styles, retrieving the username, and updating the chat ui in a Socket.IO beginner workflow.
Create a group chat box in html by building a chatterbox container with a shadowbox label, a messages area for group chat messages, and a new message input for sending.
Fix the layout bug by correcting the messages container class to align items, and adjust placeholder color for visibility; explore building a group chat box with JavaScript for dynamic checkboxes.
Create a messages container and a single message component in html to render group chat messages, including a name and the message content, for dynamic display.
Create a dynamic chat box in JavaScript by building a group Shadowbox for Chatterbox with labeled chat box, messages, and input IDs, then render it in the DOM.
Create and access the chat box using the shadowbox container, wire a new message input, capture username and message on enter, and send to the socket io server.
Learn to implement group chat messaging with Socket.IO in JavaScript by creating and rendering message containers, broadcasting messages to all connected users, and wiring client-server io logic.
Create and export a socket handler to connect to the socket.io server, log successful connections, and enable group chat messaging on the chat page.
Create a send group chat message function that emits a group chat message event to the socket IO server, where it is listened for, logged, and broadcast to connected users.
Learn how to broadcast a socket.io event to all connected clients except the sender, using group chat message events and a client listener to update the chat in real time.
Learn how to broadcast events to all connected socket.io clients while excluding the sender. Also receive and append that message from the server for a group chat.
Learn to implement a basic group chat with Socket.IO by broadcasting messages to all users and appending them to the chat UI in real time.
Register users on the socket IO server and store them in a peers array. Track each user by username and socket ID, and clean up on disconnect using filter.
Emit a register new user event with the username from the store to the Socket.IO server to establish an active session. Test locally and broadcast updates for connected users.
Broadcast updates of connected users to all clients using sockets, maintaining an active peers list and rendering active chatterboxes for each connected user.
Create and render new shadowbox chat boxes for connected peers, assign shadowbox IDs and input IDs, and exclude the current user while preparing to emit messages.
Register event listeners for shadowbox input, save information about the new chat box to the store, and update the active chatterboxes with the new chat box for the connected user.
Implement logic to render only one chat box per connected user by comparing socket IDs against active chatterboxes, excluding already created shadowbox and preventing duplicates.
Learn to emit direct messages over a socket.io server by wiring chat input, handling enter, and sending message data with sender, content, and receiver socket ID.
Learn to emit direct messages from server to client using socket.io, targeting a specific receiver by socket ID, updating chat boxes, and handling direct message events.
Learn to append chat messages in a socket.io app by building and appending a message element to chat container, with left or right alignment depending on sender.
Identify and fix a bug in a chat application, test direct messages and group chats across multiple users, ensuring messages append correctly for all receivers.
Emit a disconnected event when a user disconnects, and update the active chatterboxes in the store. Remove the corresponding shadowbox from the HTML DOM to keep chat boxes in sync.
Add a room dropdown to join a chosen chat room; send messages to that room, and only members in that room see them, storing the room id with set/get functions.
learn how to join a socket.io room, register a user with a username, attach a room ID on the client, emit messages to room members, and handle leaving and disconnection.
Learn to set up a room-based chat using sockets, create a chatterbox UI, and handle join and automatic leave on disconnect to enable group chat.
Emphasize using socket.io to emit messages to users in a specific room by removing direct messages, adding room-based message handling on client and server, and broadcasting to all room members.
Learn to implement room-based chat in a socket.io app by appending room chat messages via a socket handler, updating the room chat box, and testing with multiple users.
Explore socket.io namespaces as dedicated communication channels that split app logic on a single socket connection. Learn to set up a project with index.js, public folder, and express and socket.io.
Set up a simple server with express and http, serve index.html, and integrate socket.io for connections. Create a client to connect and log the socket id.
Test the socket.io setup by starting the http server on localhost:5000, verify bidirectional client-server communication, and confirm matching socket IDs across both sides.
Learn to use socket.io namespaces to isolate server logic, connect clients to orders and users namespaces, and manage namespace-specific events and rooms for larger apps.
Master real-time bidirectional communication with socket io, emitting and listening to events, using rooms and namespaces for scalable video chat apps, with adapters like Redis or MongoDB.
Learn Socket.IO basics and be prepared for more advanced courses with real life usage of Socket.IO.
Socket.IO is a library that enables real-time, bidirectional and event-based communication between the browser and the server. It is perfect solution if you are planning to build real time communication applications like chat, games apps etc. where most important thing is real time functionality.
The best way to learn Socket.IO is to create simple app where you will play with events, create listeners, and manage active sessions.
We will learn also how to work with JavaScript arrays (spread operator, filter, find methods etc.). We will manage our Client side UI with JavaScript and HTML and we will create element dynamically.
CSS styles will be provided to not loss time of styling the app as our main concern is to learn Socket.IO.
We will start with creating http server which we will connect with Socket.IO. At the next step we will prepare our playground in HTML. After that we will be ready to start learning Socket.IO. We will cover broadcast, store active session at server side, emit an events, listen for events, create rooms, emit an events to specific clients and rooms.
We will be not covering advanced concepts like:
Adapters which are needed if we can have multiple instances of our server (It will be covered in other course with real apps where we will be using Socket.IO)
Validation - Also they will be covered in more advanced courses where we will need to spread our Socket.IO logic.