UI.polling vs. Refresher Addon

Hi at all,
where is the difference between the two mechanisms, the integrated polling and the polling done by refresher addon? Is it that the intergated polling (UI.setPollInterval(>1)) reloads the page anyway while refresher only reloads if something has changed?
Which of both should be preferred? Which one causes less traffic?

Thanks in advance


as far as I know the only difference is that the Refresher includes a listener which notifies you on server side when a poll is happening, so you can do something when a poll occurs. The integrated polling mechanism has no such listener. The amount of traffic is pretty much the same since only changes are sent anyway.

The Refresher addon predates the integrated polling. They have identical mechanisms , but Refresher has one feature that’s not in Vaadin 7.1: refresh listeners. If you need those, use Refresher, otherwise the core polling should be quite sufficient. Poll listeners will be included in Vaadin 7.2.

Ahaaaa, okay. That means with such a refresh listener the UI tells the server side: “hey, i will reload now, please fetch new data!”, right?
So, i will keep the integrated polling. The background data in our project is fetched by its own polling mechanism anyway.


I am wondering if there is one more difference?

The UI polling in V7 means you can only have one poller per UI.
With the refresher, you can have any amount of components in your UI polling (which may be useful under certain circumstances).

Am I right or wrong?

Yes, I thought of mentioning it but didn’t really come up with a persuasive use case. What would be useful is requesting a refresh interval of “at most
milliseconds”, but this could be easily enough implemented with UI polling as well, without needing superfluous refresher instances.