Dec 18 2008
∞
I’m trying to figure out how to tackle rewriting sifr3 to remove redundancies with jQuery and reduce file size. I’ve tried two different tactics:
- Remove a component of code, like the query selector engine, and replace all the calls to it with jQuery. It worked great for the query selector, but completely fell apparent when I switched over all the DOM methods. Too much rewriting since jQuery methods return jQuery node sets and not DOM elements.
- Start at the entrance point and rewrite sifr3 in a jQuery style. The problem is that I have to write a ton of code, almost the whole thing, before I can try running it in the browser.
It looks like my only option is starting from scratch, and just using the sifr 3 script as a reference. I’ll have to start simple and build up functionality, testing in all target browsers as I go. Slow, but there’s just no magic bullet for this kind of thing.
I also want to try testing with FireUnit but I’m not sure how to make everything testable outside it’s standard context.