Posted in JavaScript on 04/20/2009 03:01 pm by Jenny
Re: Chrome Extension API; How we wish we have named parameters
If only! Sure, you can use a hash to get a similar effect, but why not just add that in? JavaScript is getting more and more like Python every day anyway…
Posted in JavaScript on 04/06/2009 09:52 pm by Jenny
So today I was hooking up some event handlers in Dojo. It looks like this for DOM elements:
dojo.connect(myElement, "onclick", myObj, "handler");
One would expect it to be similar for a dijit like:
dojo.connect(myDijit, "onclick", myObj, "handler");
But that didn’t work. Why not? Because the dijit event names are camel-case:
dojo.connect(myDijit, "onClick", myObj, "handler");
Why not standardize them to match the equivalent DOM event names with lowercase spellings?
Posted in JavaScript on 04/01/2009 09:21 am by Jenny
When I first decided to learn a JavaScript framework, I went with Prototype. It was 2006. Prototype was one of the most mature frameworks. When combined with scriptaculous, there were a good amount of things you could do. The big win for me, however, was the large community and decent documentation. It was a good choice and we’ve had a very productive three years together.
Unfortunately, I feel like the Prototype world has not kept up with the times. Well, perhaps that’s a miss-statement. Prototype is still just what it started out as: a base to build upon. Scriptaculous still provides animation and a few widgets. Meanwhile, the other frameworks have become much more full-featured. The widgets provided by Dojo, YUI, or ext.js are far beyond the ones offered by Scriptaculous. Writing something complex? Package management would help a lot. What about some base CSS to get started on my project with (or even better, themes)?
I will still be using Prototype for smaller projects. I think it’s great if you just want to toss in a dash of JavaScript flare and would like to use some nice helpers. But, I’m done writing big applications with Prototype/scriptaculous. It’s time to learn something new!
I’ve done a quick review of the options out there, and I’ve decided to pick up Dojo next. Ext.js needs to be licensed for commercial projects. What if the cost is too much for a project I’m working on? YUI looks excellent, but somehow it feels less organized. In fact, I plan on playing around with YUI a bit too for comparison.