Writing a browser-based MUC client
In this last section, we're doing to write something more exciting that will allow visitors to visit a website, view a list of chat rooms, choose to enter one, and then interact with other users in realtime. They'll also be able to see a list of other members in the room and get notifications of when they leave and new ones join.
To keep things simple (well, enough for a book), we're not going to cover password-protected rooms, changes in affiliation/role (everyone will be able to write), private messages, invites, and a whole bunch of other stuff, but we will cover joining errors so that we can ensure our users get to chat!
But won't users need XMPP accounts? One thing you might have realized is: without usernames and passwords, how are users meant to connect to the server and join in the conversations? Well, there are two options here:
- Allow users to sign up as they connect, also known as in-band registration. This isn't the best solution since it opens...