Flash External Interface “addCallback” Gotcha in Internet Explorer

Just learned this one the hard way. Apparently in Internet Explorer, a Flash application cannot use the “ExternalInterface” to add a callback named ‘play’. This list of reserved words also includes ’stop’, ‘tags’, ‘item’, ‘length’ and possibly others.

Makes sense, but it took me a while to figure this one out since it does not seem to be documented anywhere. For a while there, I was a very frustrated developer!

Minor Update to IMapper Library

I made a small change to the IMapper library today. It should now play nicely with other JavaScript libraries.

The alteration will ensure that “$” is referencing jQuery, at least within the scope of the library. This symbol is used by a variety of JavaScript libraries, most notably Prototype.

Obviously, the ready() method used to initialize IMapper will be slightly different depending upon your setup.  I would highly recommend reading up using jQuery with other libraries before you actually attempt too.

I haven’t extensively tested the update.  If you are using IMapper (with jQuery) and another JavaScript library that uses the “$” symbol please let me know if there are any name conflicts or bugs.

FB_PIC Update

A long time ago I wrote a GreaseMonkey script dubbed “FB_PIC” for Facebook.  The script has one simple function: when you mouse over profile links, it’ll show the full-sized profile picture for that given user.  Today I noticed Facebook altered their interface so I decided to make some updates to FB_PIC.

Please note that due to how the Facebook UI works, FB_PIC has trouble keeping up with page changes.  I am still working on an efficient work around to coupe with Facebook’s very unique UI.  In the mean time if you notice that FB_PIC isn’t working as exepected just refresh the page.  This will re-bind all of the nessecary events to the apporiate elements.

For more details exactly what FB_PIC is and how to get it, head on over the FB_PIC page and check it out.

Full Tree Selects via Materialized Paths

At my internship I have been working on this really awesome in-house analytics systems.  One of the database tables used in this project behaves as a self-referential tree.  Since I am using Ruby on Rails for this project, I decided to go with the acts_as_tree plugin on this particular model.  This plugin adds various tree related methods with a minimal requirement that a foreign key column named “parent_id” exists in the corresponding table.

This plugin functioned as expected and something can certainly be said for sheer simplicity that this particular tree structure employs.  The complication arose when my application called for a full select of all the descendants from a given node.  This particular tree structure doesn’t support an efficient way to grab all of the corresponding descendant records.

Read the rest of this entry »

My Experience with Google Maps API

A few weeks ago, I was tasked with improving the Google Maps feature for a major project at my internship.  The map was part of a location-based search feature that is used on several different parts of the project. Essentially, a user enters a zip code and some other search parameters and a list of locations is generated and mapped out for them. While I am an experienced JavaScript programmer, and am familiar with a lot of related libraries and APIs, the Google Maps API is one that I had yet to introduce myself to.  So when presented with this task, I jumped at the opportunity and began to read up on various API documentation that Google provides.

As expected, the features and functionality provided to individual developers by the API is impressive.  One can achieve virtually all of the functions that Google’s own mapping service provides and then some.  Since the project I was working on called for a fairly simple mapping system (the basic markers and info window we’re all accustomed too), I didn’t really get a chance to learn all of the nifty features provided by the API.  Once I get some much needed free time over winter break, I am sure I will learn more about the API and possibly throw together a simple web application showcasing what I have learned.

In developing the mapping feature for this project, it became clear that I needed some sort of library to help manage the various pieces of data and events.  I decided to create a Singleton Class that uses jQuery to help manage the map overall.  My code uses the Module Pattern as described by Douglas Crockford.  While the name, Module Pattern, may seem misleading (I think ‘Singleton Pattern’ does it better justice), the Module Pattern is a rather useful JavaScript design pattern that eliminates the need for global variables and enables some key Object Oriented Design concepts (private variables and methods anyone?).  I decided to dub this simple class IMapper.

Read the rest of this entry »

You are currently browsing the archives for the Web Development category.

© MJCBlog.net - All Rights Reserved
Powered by WordPress