By Robert Dempsey
DECEMBER 5, 2007
Introduction
In today's online world of Web 2.0 and social networking, when webizens visit a site they expect to be able to interact with other users, going beyond mere communication and creating true online relationships. To keep them coming back, a site must be interactive and allow users to connect with each other. WIMZI not only gives you all of that, but it also makes it easy for web developers to add that capability to the sites we build. In addition, the business community can leverage these capabilities to reduce costs. In this article, I will discuss what WIMZI widgets can do for you and get you on the fast track to building sociable, more interactive sites.
WIMZI and Web AIM–A Primer
Let's get started by taking a look at WIMZI and Web AIM. WIMZI is an AOL Instant Messenger (AIM)® widget that you can easily embed in a blog, a social networking site, or any web site. With WIMZI, you can easily connect with visitors to your site using only a free AIM account and a few lines of code. WIMZI keeps your AIM screen name private and lets you track visitors to your web site and profile them in real time. As you will soon find out, it's extremely easy to create WIMZI widgets and use them on your site.
Along with WIMZI, AOL offers Web AIM, which takes mashups (web applications that combine data from more than one source into a single online tool) and rich Internet applications to the next level by using AIM integration. Web AIM does this by providing:
- Internet messenger (IM) chat – chat with site users without ever leaving your web page
- Buddy lists – your users see their buddy list and buddies who are members of your site
- Presence and profile information – show the presence and profile information of site users directly on your web page
- Custom themes – tailor the look of Web AIM to match your site
- Seamless integration – of all of the above
Note that Web AIM offers maximum customization for all of the functionality listed here. You can implement as much or as little as you want depending on the needs of your site or application.
What WIMZI and Web AIM Mean for Ruby on Rails Developers
Depending on the complexity of authentication, chat, and messaging features, building them into a web application can take weeks. This time can be reduced to hours by using WIMZI and Web AIM. In addition, social networking sites are always looking to enhance the online relationships they create and foster. By using WIMZI and Web AIM, developers can help these sites leverage one of the largest online communities in the world--AIM--integrating true presence and communication capabilities. And the learning curve for visitors to your site is nonexistent.
Why You Want to Use WIMZI
Of the many reasons to use WIMZI, one that comes immediately to mind is to connect with visitors to your site from wherever you might be physically located. You can also supplement a contact form by using the widget. You might wonder why you'd have a potential client fill out a form if you can start talking with them right away. In a powerful example that we will explore toward the end of this article, you'll see that you can use the form for customer service. The example shows how this usage will reduce your monthly phone bill and allow support staff to be geographically distributed while also breaking down potential language barriers and related misunderstandings. Keep in mind that another great thing about WIMZI is that visitors don't need to have an AIM account to be able chat with you. Anyone can contact you with a single click--no log on, no authorization, and no additional account information are required.
Adding WIMZI to a Ruby on Rails Application
Adding WIMZI to an existing application is simple; you can be up and running in a few minutes.
The first step is to point your browser to the WIMZI site: http://wimzi.aim.com/. There, you'll be greeted with a page that will soon be quite familiar:
To begin, log on using your AIM screen name or e-mail address. If you aren't yet signed up, visit AIM.com and create a free AIM account.
After you log on to the WIMZI site, you are taken to the widget management screen. Here you can create new widgets and update existing ones. The simplicity is almost overwhelming. It couldn't be easier to create and manage widgets--no manual is needed.
To create a new widget, simply follow these steps:
- Name it.
- Size it.
- Choose a theme.
- Add messages.
- Preview your widget.
- Agree to the terms of service.
- Click Create It.
Voila! A new widget is ready for you to use on your web site.
Now, let's get embedded! First, fire up a terminal session (or open a command-prompt window if your computer is running Windows) and create an empty Ruby on Rails application. For this example, name it “wimzi.”
Go to the root directory of your new Rails application and open your favorite text editor. For this article, you'll work with a single file. In production, you can either place the widget code in the main layout files so that the widget appears on every page of your site or put specific widgets on individual pages. This flexibility is useful if you have different widgets for various functions, such as a password-protected part of the site that only members can access or a customer service page.
Going back to your browser, you are told to copy and paste the code provided into your web page. You have two options here--HTML or Flash. If you're going to put your widget on your MySpace page or another site that works best with Flash (as opposed to JavaScript), choose the Flash option. For your Rails application, you can use either. One caveat is that if you choose the Flash option, make sure you don't have the location check selected.
At this point, if you want to take another look at your widget before embedding it, you can click the Preview button to the left of the Code button. When you're ready, choose either the HTML or the Flash version, copy the code that is displayed, and paste it into your text editor. In this example, I use Flash.
Now that it's ready to go, deploy the new page to your server. What comes next is very cool and amazingly fast.
Note: If your computer runs Windows, I suggest you use the AIM client. I used Apple iChat on my Mac, which worked without any issues, and I use that for the remainder of the article.
Let's see what the widget looks like when you first go to the site but aren't logged in.
After you log in to the AIM service, the widget is instantly updated with your status and you're ready to chat with web-site visitors.
The widget also knows when you change your AIM status to Away, and again instantly updates the widget.
When visitors come to your site and see that you're available, they can initiate a conversation by typing in the message box and pressing ENTER. If visitors want to tell you who they are, they can also type their name. Next, iChat opens a new chat session. To converse with visitors, click Display, and then click Accept.
In our testing of the widget, there was no more latency than a usual chat session from the time we typed text in iChat to its appearance in the widget.
Another cool thing is that when you and your visitor are connected, if you're using the AIM client, the visitor will be added to a buddy list named after the widget.
That's it! You're done. From start to finish, the entire process of signing into the WIMZI site, creating a widget, embedding it into your Rails application, and deploying it to your server took less than 10 minutes. Not only that, but your AIM screen name is secure from random visitors who make it to your site.
Concerns and Potential Issues
Although WIMZI is an excellent feature for any site, what concerns might you have about using it? Let's address a few items:
What happens when visitors refresh their browsers?
When visitors refresh their browsers, they lose the history of the conversation. However, they're still logged in to the same session. The session isn't disconnected until visitors close their browsers. The person on the other end, whether yourself or an employee, will maintain the entire chat history.
Can I log the conversation between visitors and myself (or my employees)?
Absolutely. Both iChat and the AIM client can log conversations. For iChat, I recommend using Logorrhea to view the logs. Also, make sure that in iChat, on the Preferences menu, on the Messages tab, you select the Automatically save chat transcripts option. By default, this selection will save all of your iChat logs into ~/Documents/iChats.
Can I block incoming chats?
You can block incoming chats after a visitor initiates the chat from within your site.
Can I initiate contact by using WIMZI with visitors to my site, or do I have to wait for them to IM me first?
Absolutely. You can initiate conversations with your site visitors.
Conclusions
So, there you have it. It doesn't get much simpler than that. You get the power of AIM integrated into your Rails application in 10 minutes or less, enabling instant conversations with your site visitors, no matter where you are--simply log on to AIM and you're ready to converse. Use this feature to differentiate yourself by giving your visitors a higher level of interaction; bring your web site users together by enhancing the social network experience with real-time conversations; and respond faster to customer needs.
Where can you go from here? The possibilities are endless. With Web AIM, you can allow the users of your social networking site to chat with each other, thereby increasing its value. Businesses can also leverage the free AIM service. Let's say you're a business with dedicated, geographically distributed customer support staff and you're looking to keep costs down. You could use WIMZI in the following way:
- Your customers visit a central support page to obtain assistance.
- Customers click a button that puts them into a queue, informing them of the potential wait time.
- When a customer service agent becomes available, the visiting customer is directed to the page with the WIMZI widget, which will connect them to the customer service agent site.
- The customer initiates the chat, your customer service agent responds, and customer support is provided.
With the low cost, ease of creation, and speed of implementation you can't go wrong with WIMZI. In 10 minutes or less you can take your site to the next level and provide a level of interaction that doesn't require weeks of development and builds on a proven and highly used infrastructure--AIM. Imagine how else you could use this fantastic service!
Resources
WIMZI - http://wimzi.aim.com/
Web AIM - http://developer.aim.com/webaim/

Wonderful!
Great service I think.
Bst Rgds,
Michael B.