high performance ui widgets

high performance ui widgets

Hello all :)

I have following usecase, where all widgets are not working on optimal way.

For example a button widget. If I have a dynamic list of entries and every entry should has a button, there are 2 things to consider:

1. Event delegation.
There should be an optional way to do an event delegation over container where all buttons are rendered in. The best way is to do it within widget factory, to enable this auomatically for all widgets.
Target is instead of f.e. 100 event bindings for 100 buttons only 1 binding on parent container of all buttons.

2. getHtml method.
There should be a way to get markup from every widget, which generates its own markup.
Target is to be able to use widgets in high performance situations like a dynamic list, where every entry should have a button widget. It is currently extremely not performant if we render the list first and then run selector to replace button elements with widget own markup or whatever the widget wants to do. In addition every widget instance will bind a couple events.

At this point we could make use of the new template engine well.

What do you think about this guys?

regards,
Oleg Slobodskoi