04.20.2009 - aimapi-core and SocialThing
Oh hi, long time no speak. How's every little thing?
I've spent the past few months working on the SocialThing for Websites client, which you can see in action on AOL's country music blog The Boot. Techcrunch didn't tear it apart, and the comments aren't as rabid as one might expect on an article about an AOL product, so I suppose it came out next-to-all-right.
The client itself was a lot of fun to work on, and there were a lot of interesting technical hurdles that we had to hitch our pants way up and leap over which kept things awfully interesting. More on those later, though.
So, you ask - besides dropping all the UI stuff that you weren't particularly interested in the first release, what's so great about aimapi-core? Well...
- Its only 44k (with white space and comments). The original is 80k and does less.
- More transactions (some of which didn't exist in 2006):
- addBuddy and removeBuddy
- getStatus and setStatus
- getBuddyFeed (AIM's lifestream - see buddyupdates.aim.com)
- pushFeed - a means of pushing content into a user's buddyfeed/lifestream
- and more!
Alternate means of listening for events. The original codebase used long polling via script nodes. Unfortunately this meant rapid polling in Firefox because of a bug in that browser that prevents more than one script from downloading at once. This rapid polling was both memory intensive and had the status bar constantly letting you know that it was "Waiting for 12.345.79.80..." which kinda sucked.
So how was this resolved?
- If AIM.params.useSWFListener is true, the API uses swfobject to pull in swfsocket.swf which uses AS3's socket API to listen for host events (IMs, presence updates, etc). Many thanks to my pal Rick Gardner for writing this piece.
- If swfsocket fails to initialize, the API falls back to scriptiframe.js, a clever work around that James Burke came up with that uses an iframe to long poll for events.
And if all that fails, it goes back to using dynamic script nodes to listen for host events.
- And more! (...that I still need to write documentation for!)
So give it a look, and let me know what you think. Oh, and for those wondering - no, the SocialThing client is not a frame a' la the diggbar. Come on, give me a little credit.
And glad to see a post here again!
Posted by Shad on April 20, 2009 @ 3:38 pm
Posted by Shad on April 20, 2009 @ 3:49 pm
Posted by Mark on September 17, 2009 @ 7:58 pm
Posted by Tenerife Traveller on October 7, 2009 @ 5:39 am
Posted by Toys boy on October 15, 2009 @ 5:45 am
Posted by health spa freak on November 4, 2009 @ 10:27 am
Comments have been closed for this post.