The format of this course will be be a bit different from courses that I have instructed in the past. Rather than begin by covering data types, syntax, etc, we will focus on coding demonstrations. It is my belief that you learn best by doing. We will begin with a few basic examples and then move on to writing fully functional applications.
So, traditionally when you have a client side application, for instance a React application that communicates with an API, it’s kind of like a ping pong request. You send a request and you receive a response. It’s kind of like a one for one. With a WebSocket you can keep clients connected on the server side, and you can send data to the client whenever it’s deemed necessary. So to demonstrate this capability, we’re going to be building a chat application. Users will be able to create an account, search for other users and add them and then message back and forth with them.
You’re going to learn how to use React and React Redux. You will learn how to use LoopbackJS, which is the rest API framework that we’re gonna use, which is built on top of Express. You’re also going to learn how to install packages through the Node package manager. Node is the environment that we can use to run server side applications like React’s hot load server, which is a way that we can run React in development. When we make changes to files it will automatically reload the page in our browser. So it makes development extremely simple. We’re also going to learn about WebSockets.
WebSockets, again, are a way that we can add bi-linear communication. The server can keep connections open indefinitely, and send messages to clients, and it can keep a running list as well. Now the package that we’re going to be using for it is called socket.io. You install it to your computer, however there isn’t any third party communication between any services. This gives us everything we need to make WebSockets work out of the box. I believe this technology was fully enabled in browsers in 2010. So it’s already 10 years old. But when we talk about technologies like PHP and whatnot, it’s relatively new.
I make sure that everything is accessible on my GitHub so you troubleshoot any issues you might have.