Web Info & Tutorials

August 24th, 2007

YUI’S EXPERIMENTAL IMAGELOADER UTILITY

YUI version 2.3.0 introduced some cool features including a Rich Text Editor and a Color Picker Control. One control that really stands out, the YUI ImageLoader Utility, aims to handle the issue of image pre-loading and the negative impact it has on page performance.

ImageLoader operates on the premise that image data for some images is unnecessary at the initial paint of the page, usually for one of two reasons:

1. The image is “below the fold” — that is, outside of the viewport;
2. The image is in the DOM but will not be made visible until some user interaction takes place, as is the case in some TabView implementations.

In the following video, Yahoo! Travel engineer Matt Mlinac, developer of the YUI ImageLoader Utility, discusses the use cases for the new component along with examples on how to leverage it:

A detailed description can also be found on the YUI blog.

August 24th, 2007

JQUERY 1.1.4: FASTER, MORE TESTS, READY FOR 1.2

In preparation for their upcoming jQuery v1.2 release next month, the jQuery team has released jQuery v1.1.4, an interim release which:

  • Increases selector performance
  • Includes an over-hauled test suite
  • Provides the ability to embed jQuery into the namespaces of other objects and libraries
  • Introduces the new method .slice() & new select :has()
  • Corrects some bugs

Of note is the library’s capability to rename itself:

Any Name jQuery

jQuery has taken a big step to become the first major JavaScript library completely capable of renaming itself. Previously, functionality was provided to rename the oft-used ‘$’ shortcut for ‘jQuery’ - but now you can also rename both ‘$’ and ‘jQuery’. This allows for two fantastic results:

* You can now include multiple versions of jQuery, simultaneously, on the same page.
* You can now embed jQuery into the namespaces of other objects and libraries, for example:

// With the Dojo Toolkit
dojo.jquery = jQuery.noConflict(true);
dojo.jquery(”#elem div”).slideDown(”slow”);
// or with Yahoo UI
YAHOO.query = jQuery.noConflict(true);
YAHOO.query(”span.hidden”).removeClass(”hidden”);

August 24th, 2007

AMAZING AJAX SOLITAIRE

In the “I-can’t-believe-it’s-not-Flash” category, Robert Schultz pointed us to his amazing World of Solitaire website, implemented with YUI, MochiKit and PlotKit:

Amazing Ajax Solitaire

It’s hard to single out a favorite feature, from it’s ability to rescale the size of the cards when you resize the browser window to its impressive animations and smooth drag-and-drop. Definitely worth a look!

Robert gave an interview to the YUI blog that discusses implementation details.

August 24th, 2007

BEST PRACTICES IN JAVASCRIPT LIBRARY DESIGN

We had the feeling of having Evangelist Resig become to Google and provide a speech on the Best Practices in Javascript Library Design.

This speech explores every the techniques utilised to physique a robust, reusable, cross-platform JavaScript Library. We’ll countenance at how to indite a solidified JavaScript API, exhibit you how to ingest useful planning to create contained, concise, code, and withdraw unfathomable into ordinary interbreed application issues that you’ll hit to cipher in visit to hit a flourishing library. Evangelist Resig is a JavaScript Evangelist, employed for the Mozilla Corporation, and the communicator of the aggregation ‘Pro Javascript Techniques.’ He’s also the creator and advance developer of the jQuery JavaScript accumulation and the co-designer of the FUEL JavaScript accumulation (included in Firefox 3).

Thanks to Evangelist for reaching by. The Google Trends motion on jQuery…. wow!

August 24th, 2007

CREATING A MAINTAINABLE, UNOBTRUSIVE JAVASCRIPT SLIDESHOW

Slideshow UI controls can be found everywhere nowadays and usually come included, in some form, in most JavaScript libraries. Every now and then, though, its great to take a step back and actually learn how something like a slideshow widget is built.

JavaScript expert Christian Heilmann does just that in a multi-step tutorial that shows you how to build a maintainable, unobtrusive JavaScript slideshow component.

Slideshow Asset

While the end result isn’t as robust as other controls, it is a nice way to get your hands dirty and understand the underpinnings of some of the cool widgets others are creating.

August 24th, 2007

JAVASCRIPT OBJECT LAYOUT

Dean Edwards said: “Interesting or confusing? You decide!”

Can we answer “both” ? :)

JavaScript Object Layout

August 24th, 2007

ADOBE AIR: CAN WE HAVE SYNCHRONOUS QUERIES, PLEASE?

Justin Palmer has an interesting place most the handling with the anachronic nature of Adobe AIR’s SQLConnection collection and the challenges it poses when handling with the DBMS’ response. Justin shows whatever fictive structure of employed around this finished the ingest of Responder objects and circumstance listeners:

var unification = newborn air.SQLConnection();
connection.open(air.File.applicationResourceDirectory.resolve(’development.sqlite’));

var evidence = newborn air.SQLStatement();
statement.sqlConnection = connection;
statement.text = “SELECT * FROM contacts”;
statement.execute();

The cipher above, albeit a lowercase daylong winded, is the bleak necessities for executing a query. While it looks evenhandedly direct on the surface, we’ve already separate into our prototypal problem. If the fulfil activeness is asynchronous, how do we undergo when we crapper begin to regain and cook the accumulation returned? We crapper do it digit of digit ways, run an circumstance perceiver or transfer a Responder goal to the fulfil method.

From the looks of this thread it appears this is on the minds of individual another folks and Adobe’s employed on nonindustrial a method for coetaneous SQL calls is in the works.