Summary
In this chapter, we created a functional chat with private rooms and groups, like other software such as Slack or Teams, with very few lines of JavaScript (no comments, less than 35 lines). In addition, we have taken the first steps in an authentication system. We can now register and manage clients in different Channels, depending on our needs, and know who is connected or disconnected. The magic is over – we are now masters of Channels.
In the next chapter, Chapter 6, Creating SPAs on the Backends, we will deal with the last few elements that are necessary to dynamize a site, such as changing pages, deciding when we want to update a whole section or add a new HTML fragment, working with sessions so as not to depend so much on the database, and validating the origin of the data to avoid cross-site request forgery (CSRF) with WebSockets. With all the skills we will have acquired, we will develop a complete SPA by building a blog in Chapter 7, Creating a Real-Time...