Web Info & Tutorials

August 20th, 2007

DOJO 0.9 FINAL VERSION RELEASED

Congrats to the entire Dojo team on shipping Dojo 0.9. In short, you can now expect great things from this revamp, including a tight, fast core, a unified good looking set of widgets, and an extensible space for all things Dojo.

Now that this new base is out there, the team can continue to build on it, and take it to the next level. Bye bye 0.4, hello 0.9.

Alex says it best:

After a complete re-think about the purpose and value of Dojo, and after
months of grueling ground-up work on the part of the entire Dojo team,
I’m happy, proud, and excited to announce that Dojo 0.9.0 is available and AOL is already hosting 0.9 in their CDN.

For those porting Dojo applications from previous version of the
toolkit, you can refer to the Porting Guide for help on where APIs landed in the shuffle

In may cases, you’ll need less code overall to get the same thing done
(or done better), and Bill Keese (Dijit Project Lead) has put together
a great overview of what’s new and awesome.

The quick rundown of 0.9 features:

Dijit

  • unified look and feel for all widgets
  • ambitious a11y and i18n features in every Dijit widget
  • a mature CSS-driven theme system with multiple, high-quality themes
  • huge improvements in system performance
  • data-bound widgets
  • Declarations for lightweight widget writing
  • a new page parser that allows instances of any class, not just widgets
  • no magic

Core

  • reduced API surface area (easier to remember and use)
  • dojo.query() always available, returns real arrays
  • from-scratch high-performance DnD system
  • Base (dojo.js) is 25K on the wire (gzipped)
  • dojo.data APIs finalized
  • new build system
  • new test harness for both CLI and browser use
  • dojo.behavior now marked stable and based on dojo.query
  • excellent animation APIs with Color animations in Base (always available)
  • all the features you’ve come to count on from Dojo (RPC, JSON-P, JSON, i18n, formatting utilities, etc.)

DojoX

  • high quality implementations of previously experimental features: gfx (portable 2D drawing), data wires, offline, storage, cometd, etc.
  • dojox.gfx now includes Sliverlight support
  • many more features and improvements than there’s room for here.
August 20th, 2007

FUN WITH TERNARY OPERATORS

Paul Bakaus wanted to save some bytes, and ended up geeking out on ternary operators and bitwise operations in JavaScript.

Ready to write some code like this?

JAVASCRIPT:
  1.  
  2. condition == true && ( foo() | bar() | some() );
  3.  
  4. function findActive(selector) {
  5.     return selector != undefined
  6.         ? typeof selector == "number"
  7.             ? headers.eq(selector)
  8.             : headers.not(headers.not(selector))
  9.         : selector === false
  10.             ? jQuery("<div>")
  11.             : headers.eq(0)
  12. }
  13.  
August 20th, 2007

IPHONE APPS: FACEBOOK AND MINGLETS

As soon as Joe Hewitt was part of the Facebook team, we contacted the local bookie to put some money on the number of days before an iPhone view of Facebook would appear. Joe was slacking off, so my guess of 3 days was a little off. ;)

Joe and team did a great job though. It is a beautiful UI, and is nicer to use than the site in some ways. My only peeve is the sliding effect that happens more often than I would like (e.g. when I click on a tab I don't want a wipe!). A great use of iUI.

iPhone Facebook

Jason Schuller has created a new social chat app for the iPhone called Minglets.com.

The application uses jQuery and YShout, the Ajax shoutbox.

Minglets

August 20th, 2007

HOW STACKED ARE YOU?

Mark Wubben, of sIFR fame, had to indite a depth-first tree iterator and was wondering what the call arrange limitations were for the different browsers, so he wrote:

JAVASCRIPT:

  1.  
  2. function Foo() {
  3.     Foo.count++;
  4. }
  5.  
  6. Foo.count = 0;
  7. Foo.prototype.invoke = function() {
  8.     new Foo().invoke();
  9. };
  10.  
  11. setTimeout(function() {
  12.     document.body.innerHTML = “Maximum call arrange size: “ + Foo.count;
  13. }, 1000);
  14.  
  15. new Foo().invoke();
  16.  

which resulted in:

  • Safari 2.04: 100
  • Firefox 2.0.0.6: 1001
  • Internet Explorer 7: 1789
  • Opera 9.22: 3340