Thursday, October 16th, 2008
Bill Higgins of IBM Rational has written up some thoughts on componentization and packaging for Ajax applications based on work that his team did on the Rational Jazz platform.
Some of what he built was:
- A nice component model based on OSGi bundles and the Dojo module system
org.eclipse.core.runtimeextension registry Java APIs, allowing for open-ended extensibility using the Eclipse extensibility model
- A simple framework for demarcating UI states that made the back button, history, and page titles work seamlessly within the Ajax page, even when a user gesture resulted in crossing a component boundary (e.g. loading and displaying a new virtual “page” from a different component)
- Dynamic, transparent loading of missing code in response to a user gesture that required it
He then goes on to explain the architecture of reusable building blocks, and a realization:
My recent realization (which seems obvious in hindsight) is that the useful functionality provided by frameworks and libraries need not be mutually exclusive. For instance, in our Ajax framework’s dynamic build system, rather than requiring applications to run within our framework to enjoy this capability, we could have created a simple callable library to perform dynamic optimization on a set of files, and then created a framework that simply used this same library.
Over the past month or so we’ve been refactoring our Ajax framework to extract the useful building blocks into simple callable libraries and making the framework proper smaller by delegating to these libraries. We’ve done this in the hopes that our code will be useful to other IBM teams but as a result of the exercise, we’ve gained a deeper knowledge of our software and the software’s quality has improved as we’ve decoupled the framework aspects from the building blocks aspects.
Going forward, it’s my intention that our team will generally start with building blocks first and then consider if we should provide some higher-level framework that uses these building blocks. I only wish we had taken this approach from the beginning but you know, live and learn.
Any kind of heavy packaging systems haven’t done hugely well in the Ajax community as a-whole, but there is a huge problem with components and being able to reuse them. The fact that someone builds a great jQuery plugin, that then gets ported to Prototype and Dojo and …. is frustrating (one example, it happens N times, with the original framework changing).
Posted by Dion Almaer at 7:23 am