Thursday, August 16th, 2007

Prototype 1.6: The event overhaul, and a whole lot more

Category: JavaScript, Library, Prototype

This is big. Prototype 1.6 is a major upgrade, and the first RC has been released. There is a large number of updates and my pet favourites are:

  • The event system has been cleaned up. It now works the way you would expect, with “this” doing the right thing
  • You can observe and fire custom events on the DOM (a la Dojo)
  • Thanks to the custom events, DOMContentLoaded is normalized across browsers via: document.observe(“contentloaded”, function() { … })
  • AOP-lite: Simple interception and function currying
  • Function delay and defer: (function() { $(“form”).fire(“requestSent”) }).defer();
  • Ajax.Response: Now you can more easily work with JSON
  • DOM Builder
  • Template API: “#{last}, #{first}”.interpolate({ first: “Andrew”, last: “Dupont” })
  • Improved support for JavaScript 1.6 and WHATWG 1.0 standards

Be sure to take a detailed look at this puppy.

Posted by Dion Almaer at 8:49 am

3.7 rating from 96 votes


Comments feed TrackBack URI

It couldnt come at a better time ^_^

Comment by DesignExpress — August 16, 2007

Wow! life just got easier, and my code will get a lot smaller.

Let’s hope Jonathan Snook makes a nice new cheat-sheet.

Comment by James MacFarlane — August 16, 2007

The release candidate is very stable. Highly recommended upgrade :)

Comment by Les — August 16, 2007

I especially liked how DOM builder works now. Very convenient.

Comment by Vasily Vasinov — August 16, 2007

Glad to see PT coming along nicely.

Comment by Rey Bango — August 16, 2007

here come the sleepless nights in trying to port existing code to the new release :)

Comment by Viktor Kojouharov — August 17, 2007

ooo Nice DOM builder. I like.

Comment by Dougal — August 17, 2007

DOM Builder taken from JS Ext :)

Comment by (v) — August 18, 2007

I am really loving the new AOP stuff, as well as the new event modifications. Congrats and a great job to the Prototype team :)

Comment by Nate Cavanaugh — August 18, 2007

All the additions seem very nice. However, the library is getting bigger and bigger with each release. A nice addition would be an official compressed version that we can use. I am at the point where 100k+ is too much but I do not trust me so much to compress it myself.

Comment by Cosmin Catalin Sanda — August 20, 2007

Is there already a stable compressed version of 1.6.0 rc0 available? If i use dojo shrinksafe, an error pops up (_3a8 has no properties on line 1 -_-)

Comment by Roland — September 12, 2007

Leave a comment

You must be logged in to post a comment.