Close
Loading, please wait...
This announcement will hide in 60 seconds

YUI Plugin: Dispatcher

2007-11-25
RSS Channel bookmark this link
Dispatcher Manager

This component can be used alone with other YUI components without include the Bubbling Core Object. The Dispatcher plugin was created to satisfy one of most requested functionalities for the developers that work with YUI Library: "the dynamic execution of the Ajax's response content". The incompatibilities of the browsers, cause that the execution of the code inserted in the pages using the innerHTML property is not a standard mechanism, neither if you try to use a reference to a remote script. This plugin require only the "utilities" package of the YUI library, and will guarantee several important points:

  • All of the dynamic contents (loaded thru the YUI Connection Manager) will be processed by the Dispatcher, and the javascript chunks will be executed (remote and inline scripts)
  • All the javascripts within a content will be executed according to the order of apparition.
  • All the contents will be included in the DOM's structure before beginning the execution process. This means that you can use references to an element within the container.

The last release of the dispatcher support cross-domains capabilities using the most common technique (proxy), also introduce two new method "jsLoader" and "cssLoader", for remote script and CSS loading onDemand and the hashtable to discard multiple execution for the same remote file, and path-correction for remote files if you need it.

1 Comment

Minor grammar and word use comments

On the page , I noticed a couple simple grammar and word use problems that you might want to know about.

First, the two sentences starting with "The Dispatcher plugin ..." are very hard to digest.

The following is an attempt to rewrite this in a form I can understand (but I may be missing something you're trying tto impart):

The Dispatcher plugin was created to satisfy a very common need of developers using the YUI library: dynamic execution of Ajax response content. Typical strategies to fulfill this need, like executing the innerHTML property or referencing remote scripts, are unreliable due to browser incompatibilities. The Dispatcher plugin avoids those problems.

Second, the phrase "... order of apparition" should probably be "... order of appearance". If you look up "apparition" in the dictionary, you'll see that's not quite the right word.

Comment by David Karr - April 27, 2008
Latest Releases

Accordion Manager
This YUI Widget will allow you to create expandable and collapsible areas using the correct HTML and CSS, but without writing a single line of javascript code. (new)

Sound Manager
This plugin will allow you to play sounds (mp3, wav) in your pages based on the classname of the elements, also it can can be integrated with any YUI and YUI-CMS components.(new)

Loading Mask
The Loading Mask widget will hide all the page's content until the onLoad's event, which mean that the website will not be displayed until the current page be fully loaded. Also this widget can be used in conjunction with the YUI Connection Manager to block the actions over the page until the AJAX's request finish. (new)

 
Hot Components

Accordion Manager
Create expandable and collapsible areas using the correct HTML and CSS, but without writing a single line of javascript code. (released)

Bubbling Core
The bubbling core now include a generic communication mechanism for widget2widget, widget2browser and widget2server messages. (updated lately)

Tooltip Manager
Improved, now using the YUI Overlay instead YUI Tooltips, also introduce a new feature, "content onDemand" using the YUI connection manager. (updated lately)

 
Coming Soon

Dynamic Layouts
A customizable interface to create a dynamic application (a single page without scrolls) with collapsible panels and multiple areas. (comming soon)

Plug and Play Widgets and Mashups
The dispatcher now support all the necessary features to create plug and play widgets, then I decide to produce some examples and some widgets to boost this features. (comming soon)

 
Bubbling's Radar

AdWeb Solutions
El equipo de desarrollo de AdWeb Solutions ha estado usando nuestra librería en la mayoría de sus aplicaciones web, creando herramientas muy interesantes para intranets y sobre todo aportándonos ideas sobre el uso de la bubbling en interfaces dinámicas. (You guys rock)

 
Related Links

Yahoo! UI Library (YUI)
YUI Official Website at the Yahoo! Developer Network.

YUI Official Forum
Get help and share your knowledges thru the frenetic javascript mailing list at Yahoo! Developer Network...

Motionbox EventHandler
For those who use propotype instead YUI, here is an implementation of the bubbling core routine for Propotype, I never tested it, but it's seen like a good implementation.

 
Recommended Reading

The Bubbling Technique & Custom Event, YUI’s Secret Weapon
In this article I’ll share my experiences in the event-driven programming within the web browser and show how the Bubbling Library, combined with YUI’s Custom Event capabilities, can create an unobtrusive behavioral layer suitable for powerful web applications.

Event-Driven Web Application Design
I recommend you to read carefully the Christian Heilmann's paper, where he wrote about how to plan an Event-Driven application, and how this technique will become the future of the web application as a result of an evolutive process.

A JavaScript Module Pattern
Eric Miraglia's detailed explanation of how to use the closures and specifically the module pattern (singlenton) as a flexible and multi-funcional structure...

 
 
Linux MySql Server PHP Mozilla FireFox FireBug YAHOO! Bubbling Library
This website is XHTML 1.0 valid! This website can be browsing with all browsers! This website is valid for Level A of Web Accessibility!