Linux Today: Linux News On Internet Time.

More on LinuxToday

Simplify Your Apps with the XML Binding Language 2.0

Dec 30, 2009, 18:32 (0 Talkback[s])
(Other stories by Kurt Cagle)


Re-Imagining Linux Platforms to Meet the Needs of Cloud Service Providers

"As web applications replace web pages on the Internet, there are a number of approaches that are being taken to add new functionality to these sites. One approach, the one perhaps most heavily used by applications, is programmatically controlling different parts of a web page via scripts and user events. In most cases, this process creates some form of binding on elements after the fact, which can often lead to fairly messy java-script code both in terms of long blocks of scripts and inline event handlers calling those java-script functions.

"However, there's another approach that may have the potential to both simplify your applications and contribute significantly to reuse. The idea behind it is deceptively simple: in a web page's CSS page, you define what's called a behavior, a script that binds to a given behavior language document written in mixed XML and java-script called the XML Binding Language (XBL). Once the page loads, any element that's associated with that particular rule will gain the behavior, essentially acting as a new "element" with its own presentation, its own responses to user input, and its own underlying data.

"XBL has been floating around in various incarnations since the early 2000s. Microsoft created a type of binding called behaviors in the late 1990s, but the technology never really caught on with other browsers. In early 2003, XBL was introduced in Firefox as one way of building extensions using the XML User-interface Language (XUL), though XBL wasn't formally specified as a standard outside of Firefox. XBL bindings have worked in Firefox web pages almost from the inception of the browser, but again, other vendors didn't follow suit."

Complete Story

Related Stories: