Friday Jan 29, 2010

Last Day at Sun

Well folks, today is my last day at Sun. It's been challenging, aggravating, educational, terrifying, boring, exciting, and overall fun. I've worked with some absolutely amazing people and made several friends along the way. I've stared into the eyes of the Hydra—a multi-corporate, multi-national, multi-language, multi-architecture website—and kept my sanity. (At least that's what the voices in my head keep telling me.) So far as I'm concerned, that's an accomplishment.

So farewell, people of Sun. Oracle, I never knew ye, but you've got a tiger by the tail, and I'll be curious to see what research and innovations the new combined company brings to bear. What a tech portfolio that will be!


Contact info

Linkedin: http://www.linkedin.com/in/gregreimer
Facebook: http://www.facebook.com/people/Greg-Reimer/603647710
Non-Sun Blog: http://gregreimer.wordpress.com/
Email: gregreimer ~at~ gmail ~dot~ com


Wednesday Mar 11, 2009

VirtualBox: The Über Browser Testing Environment

I'm now rockin' the ultimate multi-browser testing environment with VirtualBox. No longer must I endure the rigmarole of booting up separate physical Windows machines in order to test different versions of IE, or fooling with unwieldy hacks to get multiple versions of IE running on the same instance of Windows. I simply unpause the appropriate virtual OS instance and go to town. I'm sure that my list of virtual OSes will grow in the future.

Friday Dec 05, 2008

Reglib gets support for submit / change / select / reset event delegation

Anybody who's ever implemented or used event delegation knows first-hand the bitter pain of IE's lack of bubbling on those events. Bitter, bitter pain.

Well, the reglib trunk has just received experimental beta support for those events. The technique is of course to co-opt other events that \*do\* bubble, and that are almost certain to be executed prior to the non-bubbling event. Within the co-opted, bubbling event, the non-bubbling event handler is added.

The fly in the ointment is the "almost" in the above phrase, "almost certain." At the very least, these events can be triggered programatically, without any prior events firing. But I thought what the heck, might as well build it and see how useful it is in the real world.

Of course many browsers do support bubbling on these events, so they get reglib's natural event delegation. Although I'll probably need a more sophisticated test, if(document.all&&!window.opera) seems a bit crude, but I wanted to get this into the trunk and in front of people. I'm sure I'll wake up in a cold sweat tonight and realize I need to recode the whole darn thing.

Here are the new methods:

reg.submit(selector,function);
reg.reset(selector,function);
reg.select(selector,function);
reg.change(selector,function);

More info: all reglib posts, reglib feed, download reglib


Update: So far the results are pretty promising, better than I had hoped even. Early iterations of the code were a bit unweildy and bug-prone, then I had an epiphany and about 90% of the code and complexity evaporated, leaving a solution that seems pretty tight, altogether.

Basically, it sets up reglib's existing delegation on the fly, directly on the element that receives the non-bubbling event. E.g. for the change event, it more or less does reg.focus('select',setDelegationOnThis) to ensure the delegation gets set up prior to a change event. Of course this is only done on IE. Everything bubbles normally for modern browsers. They are quite boring, those modern browsers.

Thursday Dec 04, 2008

Opera 10 will Suport Selector API

Looks like Opera 10 will support the selector API. Now if only there were an Element.is(selector) DOM method for us event delegation geeks...

Monday Dec 01, 2008

reglib 1.0.6 released

UPDATE: I've removed reg.pause() and reg.resume() from the trunk. Sean Hogan makes a good point in the comments below. Plus, now that reglib is doing delegation on form events, things get complicated maintaining the pause/resume system alongside the branch of code that simulates bubbling for form events in IE. One can still easily disable an event by using a selector like this: "body.on a@href" and then adding/remove 'on' from the body classname as necessary.


reglib has reached 1.0.6. Updates include:

reg.pause() and reg.resume() follow a similar pattern to reg.removeEvent():

// handle hover on all links
var hoverLinks = reg.hover('a@href',function(e){
    // handle mouseenter
},function(e){
    // handle mouseleave
});

// stop handling hover on links
reg.pause(hoverLinks);

// resume handling hover on links
reg.resume(hoverLinks);

More info: all reglib posts, reglib feed, download reglib

Tuesday Nov 25, 2008

Goodbye mouseover, hello mouseenter

I decided that mouseover/out is never the behavior I want, whereas mouseenter/leave is always the behavior I want. Practically always. So I've changed over reglib's reg.hover() to behave like mouseenter/leave.

[Read More]
About

My name is Greg Reimer and I'm a web technologist for the Sun.COM web design team.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today