lastzero's software engineering blog

Observing absurdities helps lead to a state of Zen

July 6, 2008

JavaScript Components

My blog was a calm place for a while now, because I’m terribly busy with writing code (like it should be…). With this posting, I want to present the prototype of JavaScript Components, which are comparable to Swing Components in Java. They make use of the Composite Pattern. That means every Component can act as a container for other Components. Together with Models, Views and a Controller (Event Dispatcher), they can form reusable widgets. Other projects did work on similar things (for example jMaki Widgets), but from what I see, they target different audiences. The suggested Components use a client-side only approach. They are tested with JavaScriptMVC, but may be useful for other frameworks as well. jQuery is required for DOM operations.

There already is a LayersComponent, which implements a content stack. Any component can be added as a new layer and only the respective top layer is visible.

Please check out the demo application (download as ZIP).

In today’s environment, the most common methodology is code and fix. Applying more discipline than chaos will almost certainly help. Martin Fowler

Powered by PHP, Memcached, MySQL and WordPress