FLUID-1080: DOM Binder: Implement an API that handles the work of fetching elements from the DOM for components.

Metadata

Source
FLUID-1080
Type
New Feature
Priority
Blocker
Status
Closed
Resolution
Fixed
Assignee
Antranig Basman
Reporter
Colin Clark
Created
2008-07-31T17:19:42.000-0400
Updated
2011-02-22T16:27:56.710-0500
Versions
N/A
Fixed Versions
  1. 0.5beta1
Component
  1. Framework

Description

At the moment, component developers tend to write a fair bit of boilerplate code to access known, named things from the DOM. If done properly using parameterized selectors, this requires several data structures to to be in scope and is often a source of omission errors.

The DOM Binder API should provide a simple face on the DOM for component developers. Components should only concern themselves with referring to the names of "interesting things" in the DOM, rather than the mechanics of finding them in a safe way. The DOM binder should take care of merging the default selectors with the user's overrides and providing the connection to the DOM. It should also shield developers from the work of determining if an argument is a jQuery, a dom element, a list of elements, or a selector. Thus, outside users can provide interesting things in whatever form suits them best, but the component developer doesn't have to manage the complexity.

A sketch of this API is documented here:

http://wiki.fluidproject.org/display/fluid/Architecture+Sketches

And "vestigial" versions of the DOM Binder can be found in the Undo service.

dev-iteration40

Comments

  • Colin Clark commented 2008-07-31T17:19:55.000-0400

    infusion-05-wishlist

  • Antranig Basman commented 2008-08-08T20:55:42.000-0400

    Implemented initially at revision 5313 but gradually taking shape through 5335.
    createDomBinder is now a top-level method in Fluid.js, invokable either in isolation or else automatically through the standard Fluid initialisation call fluid.initView.

    Will accept either selectors or direct functions as specifiers of "Dom Parts".

  • Michelle D'Souza commented 2011-02-22T16:27:56.709-0500

    Closing issues that were resolved for 1.0 and earlier releases.