Web Info & Tutorials

August 2nd, 2007

STUFFING MORE AJAX IN THE BACKPACK

Backpack, the simple web-based manager of to-dos, notes, ideas, and schedules from 37 Signals, has had an upgrade.

The team discussed some of the changes, and the biggest addition is the ability to move any "widget" (note, to-do list, picture gallery, etc.) anywhere on the page, or even to another page.

We talked to Sam Stephenson, also of Prototype acclaim, to get his thoughts on the changes, and what we may see in Prototype and Script.aculo.us coming out of this practical work. He gave us some detailed thoughts, and posted them on the 37 Signals blog:

Sam on Backpack

Under the hood, Backpack's Pages tab has been completely rewritten. We moved nearly all of the application's UI logic out of hand-written JavaScript files and into Ruby using RJS templates. This resulted in approximately 1600 fewer lines of application JS, and let us deliver pages with substantially less markup, since the edit states are now loaded on-demand instead of included in bulk with each page load. In addition, we're running Backpack on the latest versions of Rails, Prototype, and script.aculo.us from SVN.

Most of the custom JavaScript in the new Backpack is used for wiring the interface in reusable ways. We've built a handful of mini-libraries that sit on top of Prototype and script.aculo.us, and we're using them in several of our other applications in addition to Backpack.

One of these libraries adds support for specifying a CSS selector for script.aculo.us Sortable containment. It uses Prototype 1.6's new Function#wrap to add the behavior in an aspect-oriented way without modifying the original Sortable source code. This is the library that powers Backpack's widget reordering. It's currently being used in Backpack and Basecamp.

Another library, internally called Hover Observer, uses an unobtrusive technique (monitoring the entire page for mouse movement) to add and remove a "hover" class on element hierarchies with certain class names. Combined with CSS, this allows us to easily show the edit/delete/move "nubbins" when you mouse over widgets on the page, or show drop-down menus when you mouse over applications in Open Bar.
The library also lets us specify enter and exit delays, so if you accidentally mouse outside of a target area, the hover class isn't removed immediately. Think of it as a cross-browser implementation of the :hover CSS pseudo-class, on steroids. Hover Observer was developed for Backpack and is now being used in Basecamp and Highrise.

The last library is tentatively known as Transitions, and provides an extremely simple API for animating transitions between DOM states. The animation resizes and fades an element’s content from one state to another, much like the effect you see when switching preference panes in OS X System Preferences. You’ll see the effect when you edit any item in Backpack. Because the API is simple, RJS-compatible, and easy to integrate into existing applications, we were able to develop it and drop it into Backpack in a single weekend.

I'm extremely pleased with how everything turned out, and I'm looking forward to open-sourcing as much of our JavaScript infrastructure as possible in
the very near future. If you have a Backpack account, I hope you're pleased with the changes, too. :)

August 2nd, 2007

EXT 1.1 RELEASED

Ext JS is the Ajax community's answer to, "Yes, but does it look wicked cool?" Several folks pointed us to yesterday's release of Ext 1.1:

The Ext team is proud to announce the immediate availability of Ext v1.1 for download. The 1.1 version includes the new stand-alone version of Ext, a lightweight HTML editor, a new Ext.Ajax utility class, enhancements to DateField and DatePicker, expanded documentation and bug fixes.

Ext\'s New HTML Editor Component

We have mixed feelings about the new stand-alone flavor of Ext. It's great that you can get a tight little optimized package if all you're after is a little Ajax helpy whelpy and some eye-candy, but does the world really need another XHR wrapper API?

[Ext.JS includes a] new flexible API for making Ajax requests with Ext. Ext.Ajax provides features such as global headers and parameters, cross library file uploads and most importantly, global Ajax events. These events are very powerful and could be used to queue and combine Ajax requests into a single call, cancel requests, provide data locally, add parameters, etc.

Still, kudos to Jack et al. for a solid update to a fantastic toolkit.

August 2nd, 2007

BUBBLE 2.0?

The sky is falling! Every playing has to hit it’s doc curmudgeon. It’s a franchise, and PC Magazine’s is held downbound by Evangelist Dvorak. Now he’s moaning most a dot-com eruct redux involving Web 2.0 supported companies.

Each of these bubbles had a characteristic theme. For the dot-com bubble, it was e-commerce—it rattling should hit been titled the e-commerce bubble. Everything was convergent on how the cyberspace was feat to defeat every existing brick-and-mortar operations. We were told that you’d be purchase sandwiches over the cyberspace and having them delivered the incoming period by FedEx. Everything was most “eyeballs” and uncovering structure to draw customers, whether they bought anything or not. Every article in every production in the land parroted the litany as to how you’d be discover of playing in a assemblage or digit if you were not inform on the Web in a bounteous way. Of course, this was every crap.

The underway bubble, already titled Bubble 2.0 to handle the Web 2.0 moniker, is harder to mark downbound insofar as a direct devastating thought is concerned.

He goes on to disregard at the different concepts that are in taste in the Web 2.0 space, every of which could become gymnastics downbound in a crash.

  • Neo-social networking
  • Video mania
  • User-generated content
  • Mobile everything
  • Ad-leveraged search
  • Widgets and toolbars

An scheme eruct is defined as “trade in broad volumes at prices that are substantially at dissension from inbuilt values”. Is that rattling where we are? I don’t wager every that whatever “me too” or strength investments in Web 2.0 companies — meet a $10 meg assets here or there by whatever VC’s. Facebook has a super appraisal because they actually create lots of business income (shoot, 1% of all online time is spent on Facebook), and online business it here to stay.

Most of the Ajax/Web 2.0 state I wager correct today is existing companies retooling their online proximity to verify plus of whatever of the newborn technologies and ideas.

Sorry Dvorak, no eruct here yet.

August 2nd, 2007

MONTHLY AJAXIAN ROUNDUP FOR JULY, 2007: IPHONE AND THE PLUGIN WARS

The summer is traditionally a slow time, but this July had some fun happenings. The iPhone buzz continued, and Episode 2: The Plugin Wars continued. Mozilla announced that their front was moving the battle to enemy territory. Brendan Eich said, "If we fight them over in IE, they won't come fight us over here" ;) He then launched his Iron Screaming Monkeys and Microsoft retaliated by hinting that "for performance reasons" they may have to take out the scripting host in future versions of IE.

iPhone

Frameworks

Dojo

Script.aculo.us

ExtJS

Yahoo! UI

jQuery

JavaScript

Offline

CSS

Browsers

Tools

Showcases