ChattyTime

ChattyTime featured on AdAge!!

Tuesday, December 23rd, 2008

Wow! Thanks AdAge!

Some Notes about Working with XMPP, SamePlace and Firefox Extensions

Thursday, December 11th, 2008

This may serve as a rough guide for working with Jabber and Firefox. Right now I believe the only option for doing so - unless you want to build your own Jabber client - is to build upon SamePlace. SamePlace is a great extension, and even though it’s relatively new, I wish I discovered it sooner. Since installing it my browser has basically been my desktop. The interface is really nice and you can use it with a bunch of instant messaging services.

Firstly, if you have never built a Firefox extension, use the wizard. I went through hell doing my Hello World extension using Mozilla’s instructions. Also, the Hello World example is a far cry from making an extension that has even the most limited functionality. Ted’s extension wizard gives you the framework and outlines the components perfectly.

Secondly, this may be common knowledge to JavaScript pros, but as someone who is relatively new to JavaScript, I discovered quite quickly that event listeners are my friends. Mozilla’s documentation was the best I found for a high level description of their purpose and parameters, and adding browser event listeners will add robustness to your extension.

With Jabber you trigger events on channels. You need one channel per event type and direction. Channels exist for incoming and outgoing messages, presence, and listening for iq packets, among others. According to SamePlace creator Massimiliano Mirra, “<iq>’s are used when you have to carry out a ‘conversation’ with a server or other entity following a predefined sequence, such as updating your profile or requesting a roster (contact list).  With iq events you listen to those packets, although you’d usually not set a listener for them and instead use the one-time listener given as third argument to send(), as in:

XMPP.send(account, <iq to=”some-entity”>…</iq>, function(reply) {
alert(reply.stanza) })

Remember that since your Jabber Firefox extension lives only on the client, events that affect both clients (chat partners) should be handled by both directions - ‘in’ and ‘out’ - of an event type. This means that if you are processing the text of a message in the same way for the sender and receiver, you must have two channels and two events - message ‘in’ and message ‘out.’

Play around with these ideas to get a feel for developing for Jabber. Also, don’t forget to download ChattyTime, a very exciting and brand new extension by Andrea Dulko and I. Thanks!

ChattyTime 1.0 is Here at Last!

Thursday, December 11th, 2008

A labor of love for many weeks, ChattyTime is here. You should try it, it’s a lot of fun and it’s practical. Something of a technical write up will follow, but for now here’s some more info about ChattyTime. You can download the class presentation too.

***

ChattyTime adds some exciting new features to SamePlace, the award-winning, extensible instant messaging client and Firefox extension based on the XMPP (Jabber) protocol. It is compatible with AIM/ICQ, GMail, MSN, Jabber, and Twitter, and it has a Jabber service of its own.

ChattyTime allows you to open “gift” pages right in your friend’s browser. Search news, Google, the dictionary, YouTube, and translate English/Spanish for your friend. Now there’s no excuse to say, “Just Google it,” because this feature is quicker to type! You might also like the location-based search feature, which will give your chat buddy search results in his or her zip code.

The other major feature that we here at ChattyTime are pretty excited about is the ability to browse the web with your friends. It’s ubiquitous browsing. By turning the feature on, no matter who clicks on what, you and your buddy will browse the same web pages. Use this feature for conferencing, YouTube, holiday shopping, or whatever you want.

Special characters determine the type of gift page to be sent. For example:

~economy opens the Spanish translation for “economy”
=pterodactyl opens Google results for “pterodactyl”
@pizza opens results for pizza in your friend’s zip code*

Here’s the current list of special characters (also available in the ChattyTime option under Firefox “Tools”):

= for Google search
; for YouTube
@ for location-based Google search
# for dictionary
~ for Spanish/English translations
! for New York Times
- plus any URL to send any web page you want

To browse the web with friends:

  1. Each user sends :1 to begin session.
  2. One user sends :0 to end session.

Some notes on group browsing with this version of ChattyTime:

  1. You will send links to any opened chat window, so close the windows of the buddies that are not participating.
  2. You will share all your browser activity with your buddy. Of course your buddy will not have access to your password protected sites, but you will still direct him or her to those pages.

*To use location-based search function, friends much have Loki installed.

www.chattytime.com

Live Web/DAP/DWD Final Project Proposal

Thursday, November 20th, 2008

Andrea and I have been experimenting with updating online chat. Using AJAX among other things, we were able to allow users on one web page send search results to each other by opening a new window on each client’s side containing the results. Users will be able to open links for one another and browse and navigate the web as a group. For the prototype we added the use of Loki to produce location-based search results. If you and your chat partner both have Loki installed on your browser, you should try our prototype.

For the final project, we are going to create a Firefox extension with these principles on top of, to my knowledge, the only existing Jabber Firefox extension SamePlace. It is quite good. Here is a screenshot of how it looks in the browser:

If you are having trouble understanding how this works, imagine that this screenshot is your desktop. When you navigate to a different page, your chat partner automatically goes to that page as well. If you are planning your evening, you can both be on the same page without having to send links back and forth. The location-based search feature is activated right in the chat window by use of a special character. For example, @restaurants would produce search results for restaurants in my area, and #restaurants would produce search results in your area.

When our extension-upon-extension is complete, you and your chat partner will be able to pull up links for each other for group research, entertainment, or basically whatever you want. Of course we’ll keep the Loki feature, so even if you don’t know where your chat partner is, you can still give them search results based on their current location.

The project will be coded pretty much entirely in Javascript. There needs to be a database that will most likely need to contain a chat id or some other identifier that will be used to access the location info.