Concerning MochiKit: It's well written. I like the Pythonic feel. I like the docs, the humor, and the heavy regression testing. I even like the code, which is a huge compliment!
Concerning DojoToolkit: I like the fact that it's a community of people who have each given up their own framework to work together. I like the mailing list. I like the event system and the package system (although I haven't used it yet). I don't like the fact that it doesn't feel quite as polished by a perfectionist as MochiKit. I also hate the part of the style guide that says you should not use a space before "{" in:
Does this mean I'm going to pick one over the other? Nope. Both have good parts. Fortunately, they're compatible. It looks like I'm going to have to use them both. Ideally, the guys from MochiKit would take a bunch of their stuff and shove it into DojoToolkit. Then the guys from DojoToolkit would change their style guide. (Yes, I readily admit I'm a freak. No, my psychologist doesn't think there's anything he can do for me. ;)
You may wonder why I didn't mention Prototype. I've heard that it has no documentation and that it doesn't play nicely with other JavaScript libraries. I'm sure that it's very nice and that it has a lot of cool features, but these are things that I feel are important.
Also, I just read "DHTML Utopia: Modern Web Design Using JavaScript & DOM". I'm really pleased to find a modern JavaScript book. It was short, yet I got a lot out of it. On the other hand, there were many errors. I think the editing left something to be desired. Furthermore, it reinforced my belief that the intersection of good JavaScript programmers and really good software engineers is really small. There were many code snippets where too much code was duplicated instead of put into some utility function. I wish they had a technical editor who suffered from chronic analness like I do. Nonetheless, it was a pretty good book, and I thank the author for writing it.
As a last note, why have I made it through two DHTML books yet never had the prototype system explained as well as this paper explains it?
Concerning DojoToolkit: I like the fact that it's a community of people who have each given up their own framework to work together. I like the mailing list. I like the event system and the package system (although I haven't used it yet). I don't like the fact that it doesn't feel quite as polished by a perfectionist as MochiKit. I also hate the part of the style guide that says you should not use a space before "{" in:
if (foo){I don't know of any other style guide that suggests this.
}
Does this mean I'm going to pick one over the other? Nope. Both have good parts. Fortunately, they're compatible. It looks like I'm going to have to use them both. Ideally, the guys from MochiKit would take a bunch of their stuff and shove it into DojoToolkit. Then the guys from DojoToolkit would change their style guide. (Yes, I readily admit I'm a freak. No, my psychologist doesn't think there's anything he can do for me. ;)
You may wonder why I didn't mention Prototype. I've heard that it has no documentation and that it doesn't play nicely with other JavaScript libraries. I'm sure that it's very nice and that it has a lot of cool features, but these are things that I feel are important.
Also, I just read "DHTML Utopia: Modern Web Design Using JavaScript & DOM". I'm really pleased to find a modern JavaScript book. It was short, yet I got a lot out of it. On the other hand, there were many errors. I think the editing left something to be desired. Furthermore, it reinforced my belief that the intersection of good JavaScript programmers and really good software engineers is really small. There were many code snippets where too much code was duplicated instead of put into some utility function. I wish they had a technical editor who suffered from chronic analness like I do. Nonetheless, it was a pretty good book, and I thank the author for writing it.
As a last note, why have I made it through two DHTML books yet never had the prototype system explained as well as this paper explains it?
Comments
var target = window.event ? window.event.srcElement : e ? e.target : null;
if (!target) return;
Similarly:
if (window.event) {
window.event.cancelBubble = true;
window.event.returnValue = false;
return;
}
if (e) {
e.stopPropagation();
e.preventDefault();
}
(Hmm, Blogger won't let me indent things or use a pre tag.)
That would have saved a lot of duplication.
Anyway, thanks again for an extremely useful book! I definitely feel like I have a masterful grip on the subject now.
var target = getTarget(e);
if (!target) return;
which is not a lot simpler than what I actually *do*, and requires me to set up another function...