Releases » Four-point-oh Alpha in Detail
By Josh on Monday, February 15th, 2010
Now that everything is setup and (mostly) working, I thought it might be worthwhile to take a better look at the new Ajax IM and talk about some of the major changes and benefits of this brand new release.
All the good stuff below the cut.
So why the rebuild? Put simply, the old Ajax IM just wasn’t enough for most people anymore. It lacked certain features, the most glaring of which was its inability to easily integrate with existing websites, which was the primary focus during the architecting of the project. As well, the older versions of Ajax IM were not up to speed with the latest AJAX techniques, such as long-polling and Comet (streaming); these issues are also addressed in the new version.
While the code is still buggy and the current version is an alpha, it is a massive improvement over the past versions. Just take a look at some of the major new features:
Easy integration with existing websites
Ajax IM has, historically, been more of a standalone script than something easily integrated to an existing website. Of course, since that first version, I’ve had a countless number of requests and inquiries regarding “integrating with my website” or “using my current user database.”
Well, today that problem is no more — Ajax IM 4.0 has been built with integration in mind. This means that, with a little work, you can use any existing user database with Ajax IM by creating a database library specific to your circumstances. In the future, there are plans to have “stock” database libraries for many major scripts: WordPress, phpBB, Pligg, etc.
$(AjaxIM.client).bind('hookName', function)), allowing you to execute actions when Ajax IM does something (such as login, receive a message, etc.). The documentation for how to use these hooks is a work in progress.
If you just want to start using Ajax IM right away, without worrying about integration, you can get the script up and running in just 10 minutes with one of the Quick Start (with Node.js) guides.
Automatic cross-page reloading
If you’ve ever used Facebook’s IM or GMail’s Chat feature, you’ve probably noticed how your conversations follow you around the website, no matter what page you are on.
The new Ajax IM does this too, and it does it automatically. Using the latest HTML5 local storage (or Flash storage as a fallback), conversations and friend lists are retained between page reloads, no matter how your website loads individual pages. As long as you load Ajax IM on each page of your website, your users can continue chatting uninterrupted.
Built on a base of HTML and CSS, Ajax IM’s themes can be easily modified as long as you know a little CSS. The default theme is completely functional and includes all current Ajax IM features; just make a copy of the folder and start editing the theme.css file!
To change the theme, you simply set the
theme folder in the
Standalone high-volume messaging using Node.js
PHP isn’t great for IM applications, which require users to both stay connected to the server for long periods of time and make many short requests.
Built-in login and registration forms
Ease-of-use is one of the primary goals of this project, and part of making a messenger easy to use is including some way for users to login and register. A Registration/Login widget has been included and can be easily added to any page of your website (see the Quick Start guide for implementation). The forms can also be easily styled to match your website, as both the HTML and CSS are pulled from your current theme.
An open source project could be built well and work nicely, but what good is it if there’s no documentation? That was a problem with past versions of Ajax IM — very limited documentation and unclear code created a lot of unnecessary confusion.
With the new version comes a new aim: to keep updated, thorough documentation on all parts of the framework. Right now, a number of important parts of the architecture and code have been documented, and the rest is on the way. You can take a look at all the available information in the documentation section of the website.
Git with the program
Ajax IM’s latest work-in-progress source is now kept on github, allowing you to download the latest version at any time. This also means that it will be easy to allow contributions, should anyone like to contribute.
Work in progress
It is still very much a work in progress, so please bear with me as I work out any bugs both in the script and the website. However, I hope you will give the new Ajax IM a try and even, perhaps, become a contributor.