Dispatch: A Day of Cleanup

With most of the pieces of the puzzle in place, I took today to go back over the codebase and remove artifacts of the refactoring work I've been doing, and spent some time renaming variables and methods I've created so they more accurately reflect what they're doing:

On another note, I've been playing with an interesting memoization technique that lets you declare the methods to be memoized in a block: ``` class Foo extend Memoizable

memoize do
def memoed(baz)
baz * 1000
end
end

def unmemoed(baz)
baz * 1000
end
end

After creating this class, Foo.new.memoed will be a memoized method, but creating the memoization will not use alias_method_chain. Instead, it uses normal Ruby structures, and super. You can see the full details in <a href="http://gist.github.com/45232">a gist I posted with the code</a>. It definitely gets a bit into the deep end of metaprogramming magic, but the end result is memoized methods that will retain their names in stack traces (probably my biggest personal gripe with alias_method_chain).

Finally, I'm going to start putting together a quick prototype of how Rails3 can be JavaScript agnostic while retaining the existing JS helpers next week some time. I've already gotten a lot of good feedback from the jQuery and Mootools communities, and plan to get as much involvement as possible as I move forward. Feel free to ping me (wycats on freenode or gmail) if you have any specific suggestions or just want to chat about the project. More details to follow next week :)