The joy of refactoring

Sooo you might remember that I happily refactored a site to use Seth’s custom javascript events. (I believe they have since been wound into prototype core, if you’re going to implement them now.) Anyway, recently we had a number of changes that needed to tie into various user actions, and since they were already custom events from back in February, creating the new classes and having them listen to the events, or in one case adding a new event to a pre-existing class and it’s subclasses took almost no time. I love when that happens. Thanks Seth!

One thought on “The joy of refactoring

  1. Very cool!

    Actually, the custom events stuff that is built in to Prototype 1.6 is quite a bit different than what I produced independently. Still works, but we focused quite a bit more on being able to reliably produce custom built-in events like click. (Though it does also support custom events like what I had done.)

    But what I did was good enough for Apple. They’re using it all over their site! (Originally they were using it only in the iphone sub-site.) Sure wish they had at least said “thanks,” though. :-)


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s