Quirky way of communicating the data source changes - Requires manual actions of both sending the events and handling them. I.e. if I change smth in JCR and forget to send CCE, no one will ever know.
- Apps that are not related to the changed data source still have to handle its CCE and see if they should react (hence
ContentConnector#canHandleItem ).
| We should try to expose the data source observation utilities and subscribe to them where needed. - e.g. we have already the JCR observation mechanism that Vaadin's
DataProvider can subscribe to in this or that way and just push the change notification to the UI automatically. - Whenever we change smth in the data source the UI is notified eventually.
- For the data sources that do not have real time observation, we could easily provide a timer-based implementation that merely refreshes the UI periodically.
| Benefits - Clear and re-usable data source observation mechanism.
- Less boilerplate for the app developers
Questions - Need to provide un-registration strategy. For some cases a mere weak-hashmap solution might work . We though should also make sure that once the view is dead, no observation left-overs are still hanging around
|