UIExecutor Framework Available

I published my code for a simple UIExecutor framework for Vaadin 7.1.x. I originally wrote it to be able to easily test my view-models while using background tasks and to be able to cancel a task during execution or UI access. It has since expanded a bit to support dynamic polling intervals on the UI or manual push.

For example, if you’re UI is using polling, the executor will use a fast polling interval as long as there is a running background task and then use a slow interval when there is no task. This reduces wasted round trips while providing a responsive UI when a background task completes. If using manual push, the executor will automatically call UI.push() when the task is complete.

Currently just the code is publish but I’ll probably look to get it setup as a full project and eventually as an add-on. Feedback is welcome.


https://github.com/mpilone/vaadin-uiexecutor

-mike

Hi,

Thanks for this work.
I want just to know if this must be used with vaadin push feature or I can used to remplace the vaadin push ??

Thank you Mike !
Your code is elegant and solved my issues with ui changes from background threads !
I can use both push and poll but I have to disable poll since I’m having trouble of using it with tomcat 7

Regards

This is really nice! Looking forward to seeing an addon.

Thanks for the feedback. I pushed a new version that I’ve had sitting around for a while. I never got time to make this an addon but the code is simple enough to grab and reuse.

Hi Mike, do you mind if I fork it and submit it as an addon? Not sure if to fork it or we can collaborate on it in your repository, but I think that I’d better fork it and strip it of deprecated stuff, then it will not be backward compatible. I’ll have to add some tests and a demo before publishing.
This is a very nice thing that will probably be useful for many people, but they can’t find it here, it will be much more visible and accessible from the directory.

Michael, feel free to fork it and submit it. Just make sure my name and original repo link appear in the documentation someplace. While I’d like to collaborate I probably won’t have the time to get to it anytime soon. I’d like to do the same with my Timeline component but I’m hoping to get some time on that one in the next few weeks.

Thanks for taking it on.

I rewrote this a bit into an add-on called UITask for Vaadin. The new implementation is much simpler with the hopes that it (or something like it) becomes part of the standard Vaadin library. Just like Swing has SwingWorker and JavaFX has Task, it would be nice for Vaadin to come with some kind of simple framework/task for executing background work safely. In the mean time, you can grab the add-on
here
.

-mike