Friday, June 24, 2005

XBEL and DHTML: a perfect match

XBEL

The XML Bookmark Exchange Language (XBEL) has its origins in the Python community. It is described as an internet "bookmarks" interchange format and has similarities to the OPML format. I first encountered XBEL as the core format of the uPortal bookmarks channel. I have since used it as the main storage format in numerous web applications including a bookmark manager, newsfeed aggregator and several "shopping basket" types of program. As you can probably tell from my other blog entries I like to mix Java with XML technologies which probably partly explains my infatuation with this format.

Example XBEL tree:
tree.xml

DHTML Tree

I first discovered the DHTML tree widget on a page entitled Unobtrusive DHTML, and the power of unordered lists. This appealed to me as I am required to write accessible web applications and this looked a pretty neat solution without necessitating the need for JavaScript to be enabled in the browser. It also transfers a lot of the load associated with rendering tree refreshes from the server to the client side. The above DHTML tree was extended by Matt Kruse to add expand/contract functionality. I recently re-implemented the DHTML tree inspired by the mechanism of D.D. de Kerf's Easy DHTML TreeView but using unordered lists instead of table layout. The reason I moved to D.D. de Kerf's design was to allow multiple trees to exist simultaneously on a single page that would not interfere with each other but would share the same static CSS and JavaScript files (not perfect yet).