Here's a modest change for 2008:
Cool things down with Prototype. (Maybe it's time to start seeing other frameworks.)
No I'm not donning the fashionable gang colors of those edgy developers railing against Rails, and barely felt the OMG!
feng shui fad, so why am I suddenly dissatisfied? Here's why:filesize('prototype.js') > filesize('yomomma.jpg')
I'm not. Prototype's great.
I'm really not dissatisfied. Prototype's a great framework, now with strong documentation. But the cutlery block's got more than one slot, and I've grown too attached to the chef's knife.
OMG!
filesize('prototype.js') > filesize('yomomma.jpg')Sweet code is all about Qi.
It doesn't feel JS
Same old story: Prototype wants me to believe JavaScript is Ruby! Code blocks! Iterators! Argh! JavaScript is not Ruby! Fzzzftphhh!
Events
Getting better all the time, but still not Prototype's strong point. Example: jQuery's triggerHandler makes me jealous.
Event.observe(window, 'load', ...Ok, this one's not Prototype's fault, but a change of library will help break the habit. In case you haven't noticed, window.load is my favorite trigger to initialize libraries. It's simple, it's decoupling, it guarantees safe DOM manipulation, and it reminds me to care for the scriptless browsers. So where's the problem?
It disrupts what I like to call
render rhythm
; the late trigger causes flickering: DOM manipulation becomes a visible process. The traditional inline<script>approach is ugly, but goes down smooth.Just found out that Prototype 1.6 includes
document.observe('dom:loaded'..., which is pretty much the same as jQuery's$(document).ready, or MooTools'window.addEvent('domready'...Woohoo!
So, where to now? I mentioned jQuery (commonly known as the other JavaScript framework
); I've also batted my eyelashes at DOMAss and base2, and heard nice things about MooTools. Ideally, I'd like to test my knife metaphor: learn to pick a framework best suited to carve a particular project's scope. Even if I become another framework's fiancé, I'll certainly keep current with Prototype's development. It's one of the web's most common frameworks, and common ground is what frameworks are all about.
PS: Digging up Roger's article, I noticed Google Reader now has a search tool. Cool!