The Hablator “Iron” (0.4) – The Best Casual Chat Script Ever

I have just updated a (GPL’ed) PHP chat application I maintain called “The Hablator”.  It is the best casual chat script ever.  (When Amazon.com just opened, it already claimed to have “Earth’s biggest selection”, so saying that about The Hablator isn’t too radical…)  What I mean by a casual chat script is that it isn’t made to be a complete replacement for IRC.  It is designed to serve a few purposes.

First, it allows a site’s visitors to share opinions and collaborate.  It isn’t meant to be a chat room that thousands of “regulars” log into every day.  For instance, if you run a radio station, The Hablator would give your listeners an opportunity to discuss the song currently playing. These people come and go as they wish.  Each time they come, they are greeted with fast and easy access to the chat area.  It isn’t any easier or harder in future visits.

Next, it is a great platform for having online meetings on.  For instance, I joined a documentation project a little while ago.  We had to have a meeting to kickstart the project.  We weren’t going to meet again, so we just wanted a quick and easy solution.  Initially, the first meeting was going to be on Skype, but I refused to install that piece of proprietary junk on my computer and have my bandwidth wasted on other peoples’ telephone conversations.  After that, we tried to move to IRC, but one of the members had some kind of trouble with her IRC client.  She was going to try to find and install a new one, when I suggested we move to The Hablator.  Everyone could easily log on, so we were able to instantly start discussing business matters.  The Hablator worked without a hitch.

Finally, it was made to replace rapid-response email conversations.  This was actually the initial inspiration for creating it.  I found myself getting into several “rapid-response email conversations” in which one person sends an email, and gets a response back almost immediately, to which the person responds and immediately get a response, and so on.  I looked around on Hotscripts for a chat script, but didn’t see any that fit my needs.  All of them were clunky Java/Flash programs, required users to go through a registration process, or didn’t seem relevant to what I wanted to do. (At that time, Java was still proprietary software.  Even if it would have been Free Software, it would have still been a little bit heavyweight for what I wanted to use it for.) What I really wanted was a fully-featured chat program that had just a touch of shoutbox feel to it.  I forgot about it for a while, until the summer of ’07 when I got stuck in another rapid-response email conversation.  I was determined to create a chat script to solve the problem.  The Hablator 0.1 was born!

I don’t know why I just used an exclamation point in the previous sentence, because this version was really ugly, and didn’t work very well. The Hablator 0.1 was an IFrame that contained the contents of a certain PHP file.  That specific PHP file existed for two reasons: to echo the line <meta http-equiv=”refresh” content=”3″>, and to load the contents of the file message.txt.  Whenever anyone posted something, it would open up message.txt and add whatever the user had typed to the beginning.  There was no AJAX whatsoever.  It submitted like any other form, and then once it was submitted,  the user was redirected back to the main chat page.

The Hablator “Stone” (0.2) was released less than a month after.  To be honest with you, I didn’t really change much besides the light to indicate when other users are typing.  That light was really challenging for me at the time, though.  Before this time, I had never had any experience with AJAX.  I suppose learning AJAX during your second month of Javascript is pretty good, but not when you don’t know how to use it.  I spent the longest time trying to figure out how it worked.  What was this XmlHttpRequest thing anyway, and how did it work?  All I knew about it was that I had to use it if I wanted this light to work.  After two weeks of working with it, I finally figured it out.  Everything was in place.  It worked great on Firefox, but did it work on IE?  I had to find a Windows computer to check.  Hoping for the best, I navigated to a demo installation and logged in.  Nope.  Nothing.  I worked for days to get it to work on Internet Explorer.  After numerous email conversations with complete strangers, several forum posts, and hundreds of heaping helpings of frustration, I found the answer.  header(“cache-control: no-cache”).  IE was dumb enough to cache a request made through an XmlHttpRequest object!  What company would be stupid enough to make a browser that caches AJAX requests?  Oh, Microsoft!  After removing this bug, I finally released version 0.2 “Stone” and took a week-long vacation to celebrate.  (It’s a great way to celebrate, especially when you learn that the modifications you did to your server immediately before leaving broke Apache’s configuration, so all requests to the server end up as 500s.  It is even more assuring to know that your server is safely locked up in your father’s bedroom, where no one can get to it!)

While The Hablator “Stone” (0.2) wasn’t exactly a release that introduced a bunch of new features, The Hablator “Bronze” (0.3) was.  All of that time spent working through my problem with the last release had made me a better developer.  I also had a huge list of features I was ready to add.  I started adding feature upon feature, until I knew school would be starting back up soon.  At the time, I assumed my classes would be extremely vigorous, so I thought that I should release before school started.  I finished up some essential features, and started bugtesting.  I made it before school started with two days to spare!  In this release, I realized how complicated I had made the AJAX before, and switched it all over to jQuery.  I also changed the main chat system to an AJAX system based on jQuery.  Yeah, the jQuery libraries were pretty big, but it was still smaller than loading a long list of messages every couple seconds!

At the beginning of the year, I decided I was done with The Hablator.  I really wasn’t all that interested anymore.  Plus, it did everything I originally wanted it to do.  But later that year, I recieved some emails from some people requesting certain features.  It was the first time I realized that The Hablator was actually being used by other people.  I decided to make another release of The Hablator, because there were a bunch of things that still drove me crazy about it.  Once school got out, I had a few music composition projects to work on.  Once those were well underway, sometime near the middle of June, I started back up.  I invited Kate back into my life, an old friend of mine that I hadn’t seen for what seemed like an eternity.  I was ready.  After some sporadic work on both The Hablator and my music composition projects, I started some serious work on it near the middle of July.  Since then, I have been working to produce The Hablator – “Iron” (0.4).

The Hablator has a bunch of really cool features.  It now uses several libraries, including Luke Plant’s FlatFile database, jQuery (obviously), and a slightly modified version of Gary White’s Browser Detection script.  I would like to thank the developers of these projects.  Because of these developers, The Hablator has a feature set far beyond what it would have if I had to make all of those libraries myself!  You can see the complete list of features in the changelog.

I don’t know what is in store for The Hablator in the future.  If I find (or someone else finds) some bugs in this release, I’ll make sure to release an updated version.  There aren’t any new features I want to add, so for right now, it is going to be dormant.  Sometime, I may port it to Joomla!, if I find the need to do so.

I think The Hablator is the best casual chat script ever, but you don’t have to take my word for it!  Download it at http://BernsteinForPresident.com/hablator.php or try the live demo at http://BernsteinForPresident.com/hab-sample.  Hopefully you will find it as useful and fun as I do.

About these ads
Published in: on July 30, 2008 at 10:03 pm  Comments Off  
Tags: , ,
Follow

Get every new post delivered to your Inbox.

Join 229 other followers

%d bloggers like this: