Browser history sniffing with Dojo

Posted by Mike on Jan 14th, 2010

Niall Kennedy posted a now-famous article about using some browser trickery to determine what websites a user on your site has visited. I’ve taken that concept and created a module that can be used with the Dojo Toolkit javascript framework.
It provides two methods that you can use in your code, isVisited and isAnyVisited.
One important [...]


Fiddler scripting is pretty cool

Posted by Mike on Feb 4th, 2009

I never really gave Fiddler all the credit it was due. I guess I should have read the homepage:
Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.

I had previously only used it as a session inspector — to review requests and responses as they occurred in the wild. [...]


Readying Javascript for the Enterprise with Automated Testing

Posted by Mike on Jan 5th, 2009

<flame>
Javascript seems to gets left in the dust when we consider code quality. It’s been rigged, scattered, and smeared every which way from Sunday. Most sites of significant complexity have a severe amount of legacy, rotting code buried deep in a countless number of files. There is little separation of concerns in [...]


Decorate a method with Dojo

Posted by Mike on Oct 2nd, 2008

Here’s a quick example of how to incorporate the Decorator Pattern into your javascript code using the Dojo framework. Rather than decorating an entire class, this example merely decorates a single function, extending the original function with some extra logic.

// Instantiate widget class
var w = new core.widget.MyWidget();
 
// Decorate the original "method1" function
var _old_method1 = [...]


On my mind today

Posted by Mike on Sep 17th, 2008

I’ve got some ideas that I need to find time to work on. In no particular order:

Port MockMe to the Dojo javascript framework
Utilize browser history sniffing to build a generalized user segmentation framework
Write a Ubiquity plugin for spreeder (to easily speed read a page in Firefox)
Port OWASP’s AntiSamy project to Python, to provide comprehensive [...]


Fun javascript goodies

Posted by Mike on Sep 15th, 2008

Just ran across another of many lists of javascript libraries. I found 3 things that I’ll probably end up using, 1 of which was especially interesting.
Sniffer browser history is something I’ve never thought of or heard of until reading Niall Kennedy’s post, which apparently he talked briefly about a few years earlier. The [...]


Cancel dojo XHR in progress

Posted by Mike on Sep 3rd, 2008

Often you run across a use-case where you want users to be able to fire off an XMLHttpRequest while another is ongoing.  Sometimes, the requests are independent and affect independent objects as a result.   But othertimes, the callback functions from the two could be affecting the same event.
For example, imagine you have a list of [...]