In my implementation it will be common for their to be multiple databound components bound to the same DataSource.
So for example I have a DataSource foo.ds.xml. Can I cache the result of DataSource.get("foo") and reuse the foo instance to bind n components?
Secondly, I am using realtime messaging to inform clients that DataSource foo has changed, and so all widgets bound to foo need to update their view. If I can reuse foo among all widgets, can I then call foo.fetchData() and then have the widgets redraw themselves to represent the new state of foo?
If this type of DataSource reuse in not possible, what would be the best practice if I have n instances of widgets bound to foo, but only y widgets are actually visible? Ideally, to reduce the overhead of server trips to only the y visible widgets, and have the n-y other widgets know they have stale data, and that when they become visible again they need to update their records before redrawing?
Thank you for your clarification on this matter.
So for example I have a DataSource foo.ds.xml. Can I cache the result of DataSource.get("foo") and reuse the foo instance to bind n components?
Secondly, I am using realtime messaging to inform clients that DataSource foo has changed, and so all widgets bound to foo need to update their view. If I can reuse foo among all widgets, can I then call foo.fetchData() and then have the widgets redraw themselves to represent the new state of foo?
If this type of DataSource reuse in not possible, what would be the best practice if I have n instances of widgets bound to foo, but only y widgets are actually visible? Ideally, to reduce the overhead of server trips to only the y visible widgets, and have the n-y other widgets know they have stale data, and that when they become visible again they need to update their records before redrawing?
Thank you for your clarification on this matter.
Comment