SocketIO IRC-style Tutorial – Part 1 – Intro
One of the technology things that excites me the most is the use of Websockets to help power the “Real Time Web“. When you use a modern browser and use a web based chat system (like IRCCloud), it very likely uses websockets. Twitter feed constantly updating? Websockets. Facebook feed growing as you waste the day? Websockets. “Real Time” Google Analytics? Websockets. You get the idea, lots of cool things we use every day built for the real time web, many of which probably use websockets. The easiest way to use Websockets with NodeJS (which I’ve been spending some of my free time on over the last year) is a nifty tool called Socket.IO.
A few months ago I wanted to learn SocketIO, so I dove into it head first to find a lot of really simple demos. The sample chat rooms are cool, but most of the tutorials/demos I found were mostly a “look, you can send a message back and forth” and no more. I wanted a tutorial with something more, so I made it myself.
Over the next few days you’ll see the entire “SockectIO IRC-style Tutorial” posted. Each day of the tutorial will highlight a different section of the tutorial code in depth, however all of the code currently committed is commented, for those who prefer the give-it-to-me-now version. The code can be found in the GitHub repo ShakataGaNai/socketio-sample. If you’d like to contribute to this tutorial base, please feel free to put in a pull request!
Stay tuned for Part 2: Getting Started.