PureMVC Tutorial - Flex, PureMVC, Jabber and XIFF 3: Part 1 - Frameworks_
Jul 19, 2008

PureMVC

Download the PureMVC framework from here. Put this into a directory somewhere on your machine and add this to the FlashDevelop project classpath like so:

  1. Right click on ‘XIFFer’ and select Properties…
  2. Go to the Classpaths tab
  3. Click Add Classpath… and in the directory selector choose the PureMVC src folder.

XIFF

XIFF is an excellent Actionscript XMPP (Jabber) framework that we’ll be using to take care of the internals of Jabber communication. Its been around since Actionscript 2 but has recently been ported to Actionscript 3 (albeit in beta form). Download it here, put it into a directory and add the classpath as above.

As XIFF is currently in beta you’ll need to make a small change in order to get it to play nice with ejabberd - a common Jabber server written in Erlang. Research tells me that this is actually a problem with ejabberd’s implementation rather than XIFF’s, but whatever the issue might be this will fix it :)

  1. Open org.jivesoftware.xiff.core.XMPPSocketConnection
  2. Goto line 108
  3. Remove the version=”1.0” / so that the line now reads:
openingStreamTag = "<?xml version="1.0"?><stream:stream to="" + server + "" xmlns="jabber:client" xmlns:stream="[http://etherx.jabber.org/streams"](http://etherx.jabber.org/streams)>";

Now we’re all sorted with the bits we require and its time to set up our directories and packages.