views:

35

answers:

0

I am looking for a JavaScript framework that provides encapsulation of UI widgets, and allows the developer to define composite widgets. In particular, I need to be able to take a widget, clone it, and place it somewhere in the document, and the widget should take care of managing any subwidgets and of keeping matching DOM objects and JavaScript object in sync. I want to be able to take a multi-item form, where each item contains multiple widgets, and tell it to add or remove an item, without having to write specific code for each form, handle the subwidgets explicitly, reinstalling event handlers, etc..

Is there any JavaScript framework that offers such a feature. If not, which one comes closest? So far I know that jQuery doesn't (its focus is on providing an interface for DOM manipulation, not to encapsulate complex entities).