Playing with Pusher

A couple of weeks ago Ben Nadel did a few excellent blog posts about Pusher, a service in beta stages that offers “real time client push to HTML5 browsers” that support web sockets and falls back to a flash plug-in on browsers that do not support web sockets.

This evening I finally had a few minutes to play around with it between working on other projects.  I thought it would be a bit of an ordeal getting things going, but it was surprisingly fast.  Pusher is in open beta so getting an account setup took all of a minute (literally).

Since that was far too easy, the next hurdle would be communicating with the service.  If you check Ben’s demo code quite a bit of it was more or less preparing the data to be sent to Pusher so it could be pushed to the clients.  Ben had a link to pusher.cfc by Bradley Lambert which actually alleviated the hassle.

That is the heavy lifting of setting up your pusher app.  I did actually write a few lines of code to setup the remote facade for interacting with pusher.cfc, aside from that everything just worked out of the gate.  For those interested, the remote facade for pusher.cfc.

<cfcomponent output="false">

 <cffunction name="push" access="remote" returntype="any" returnformat="json">
  <cfargument name="channel" type="string" required="true">
  <cfargument name="event" type="string" require="true">
  <cfargument name="data" type="any" required="true">
  <cfargument name="socketID" type="string" required="false" default="">
   var push = getPusher().triggerPush(, arguments.event, serializeJSON(, arguments.socketID);
   return push;

 <cffunction name="getPusher" access="private" returntype="any">
   var pusher = createObject("component", "com.pusher");
   return pusher;


I bound to a few simple events on a test page so I could make sure everything was working, but I did not get much further this evening.  Before I started going wild binding to events, I wanted to take a little time and think things out a little bit.  What I will say is, if you are looking for real time client push and you don’t feel like dealing the the added complexity of running Blaze/LCDS or the other alternatives, I cannot think of a better way of spending 30 minutes.


cfMud is now up at GitHub

I thought it would be pretty cool to create a MUD based on ColdFusion and jQuery so I thought I would give it a shot and see what I could come up with.  This was my first project that would rely heaving on jQuery and using AJAX calls to push data to the server and back to the client.  The code is still in EARLY in development, but I am putting it up on my public repo.

The main feature is a clickable map that allows you to move your character around the world.  It was designed to be pretty lightweight and caches a large chunk of the map at a time.  I don’t the the multi-user part down either, currently it works for one person.  Also, the NPC system leaves a lot to be desired, the movement is slow and clunky due to the nature of how it is handled (jQuery sends a heartbeat to the server which handles all the server side NPC management).

I don’t have access to my database server to include schema at the moment, but I will update the repo later on this afternoon with the schema in place.

jqDesktop demo app now at GitHub

A few months ago I was playing around with jQuery quite a bit.  I came out with a jQuery desktop-esq demo (which can probably be found here in a download link somewhere) and created a new repository for it at GitHub.

Unfortunately, things happen and both fell by the wayside.  I have a few new projects that will be coming up in the near future and GitHub will be used extensively and a buddy told me about a very nice front end for Git called SmartGit.  Playing around with it was a good excuse to finally get the repo updated.

If you are looking for a nice GUI for Git I highly recommend it.  It is free for non-commercial use and reasonably priced otherwise. It is not open-sourced, but you still cannot beat the price.

If you are interested in checking out the little jQuery Desktop application you can find it here:

I am now using Aptana for development

Lately I have been in flux trying to find a new IDE for development.  Over the course of the last year or so I have used quite a few editors.  I rely heavily on Dreamweaver, I have used it for so many years it is almost second nature for me.  The down side to Dreamweaver is it has a lot of features, many I never use.  All those nice features can sometimes make it feel sluggish at times.

I also use jEdit quite a bit for local development.  While it does not have all the bells and whistles of a full-featured web IDE, once you are familiar with it, it flies.  The one notable exception being the initial load time while it is building the file index.  I do miss having SFTP support, code completion, etc.  I wanted to find something that was lightweight like jEdit, but with some of the more advanced features found in Dreamweaver.

I have used CFEclipse pretty extensively in the past, but we have had somewhat of a rocky relationship.  When it originally came out I had some issues with the SnipEx servers which was one of the main reasons I switched originally.  It seems like s/ftp was not supported or if it was, I had problems implementing it with my servers.  It is a great project, but I had more impediments where it seemed like Dreamweaver just worked.

With that in mind, last week I set out to give CFEclipse a try again and I must say it has matured since the last time I used it.  SFTP integration is working nicely now (although I haven’t had a chance to test synchronization). The SnipEx servers seem quite stable and have grown as well. CFBuilder being built on Eclipse has also taught me many tricks to stream line development.  While some of the shortcuts do not work, many of them do.  The one issue I did have was related to the File Explorer not being able to create directories.

Which brings me to Aptana.  I have heard of it before but I have had neither the time nor the inclination to pick it up.  I tried installing Aptana as a plugin in Eclipse but I didn’t have much luck.  I decided to to download Aptana and then install CFEclipse as a plugin and I am pleased with the results.  The Aptana File view resolved the issue I was having with CFEclipse’s File Explorer, plus it is pretty nice to boot.

I have only used it for a day but I am pleased so far and I look forward to playing around with it some more tomorrow.  I still intend on purchasing CFBuilder when I can, but I think this will definitely work for me in the mean time.

Now my next fun project will be to get EGit up and running.  I will save that for tomorrow though.