“Action Oriented Programming”

It’s good to be back in SF after a pretty hectic week in Boston for Dojo Developer Days and The Ajax Experience. There’s a lot to say about them, which hopefully I’ll get to in a longer post. Our first DDD event under Pete‘s excellent leadership was a success and Dojo and SitePen very well represented at the conference.

While in Boston, Gavin and Jill joined a gaggle of Dojo hackers at a dinner ostensibly to mourn my birthday (thanks to Dylan and Pete for organizing!) and in the course of conversation Jill asked something along the lines of:

So why do people get so excited about closures?

Which prompted a several of us to flail and flop gasping the salt flats of analogy like fish out of polite-conversation water. After about 10 minutes of this, Jill succinctly summed it all up in the form of a question:

Oh, so it’s like “action-oriented programming”?

This is perhaps the most insightful and succinct description I have ever heard of what JavaScript is all about.

Update: Jennifer just played this for me and it gets right to the heart of this post: the important part of doing what we do with computers, and more importantly, with the web, is to give the power of Computer Science to real people…and it starts with insights like Jill’s that build a shared way of thinking and talking about the world. It makes me sad that many programmers miss that, but when non-programmers can share in the beauty and power of code, it does a lot to make it all seem worthwhile.


  1. jbot
    Posted October 10, 2008 at 6:03 am | Permalink

    Why is it everyone seems to get excited about creating new terminology for something which has been around for a while? You know like Web 1.0, Web 2.0, etc.

    And now JS get’s the same trite treatment when terminology already exists which can be applied in large part to what JS is all about to a degree. Though a relatively new term, Aspect Oriented Programming neatly summarises what the new JS libraries and their uses: “It encapsulates behaviors that affect multiple classes into reusable modules.” (http://www.developer.com/design/article.php/3308941)

  2. Posted October 10, 2008 at 10:14 am | Permalink


    Whoa, dude, chill a bit. I was just trying to relate a story, not invent a term. We (the Dojo community) know all about AOP (and its grandparent meta-object protocols). AOP isn’t even that new.

    Incidentally, Dojo was one of the first libraries to provide support for unified AOP (via dojo.connect()) for DOM and JS events alike. Due to the performance hit of providing around and before advice, Dojo 0.9+’s dojo.connect only implements after advice but you can get all of the previously supported advice types via dojox.lang.aspect.


One Trackback

  1. […] any case, Dojo’s event system leads to some interesting “Action Oriented” code. For example, the code reading the output from the Arduino BT is encapsulated in a […]