Create a real time chat using Flex 3, OpenFire and XIFF 3.0
OpenFire is an opensource real time collaboration server that use XMPP (also called Jabber) to create istant messaging applications.
The official web site also says “Openfire is incredibly easy to setup and administer, but offers rock-solid security and performance” and I can confirm you that it’s really true!
Check the video (open full-screen for a best view) to see OpenFire in action and take a look to the final result of the script i’m providing you:
I knew nothing about this technology before 10 days ago but in about 6 hours I was able to configure OpenFire (OF) server in my local OS (simply downloading from their website [http://www.igniterealtime.org/projects/openfire/index.jsp] and configuring it in about 15 minutes, downloading a cool Flex sample from velloff.com, understanding from this script the basic OF funtionalities and creating the simple demo I’m sharing right now.
The velloff demo (really thanx to them) is very cool but honestly, in my opinion not so usable and a bit different from the application logic I needed to create for my job.
So I got it, I studied it checking OpenFire API Reference too, and modified and cleaned to implement following stuff:
- User Registration (i choosed mySQL during the open fire setup but many db are supported)
- Login
- Open automatically a room after login and registration
- The first logged user will become moderator
- Moderator can kick users
- Public multiuser chat
- Logged complete user list
- Private chat between users

Naturally to become a real application it needs to be improved and completed with a lot of stuff but I think this script and the velloff demo can be a good point to start your OpenFire experience.
To manage other features like “friends list”, bans, user status and other cool features download the velloff demo and check the OpenFire Reference.
Sorry if the code is not so elegant but I just posted the script I modified from velloff hoping it will be useful to someone : )











Leave your response!