Re: Experiences using event bus

2020-09-01 Thread Gordan Krešić
On 01. 09. 2020. 10:42, Jens wrote: But what I don't get is why you don't want to explicitly clean things up? If you rely on WeakRef or anything similar you depend on garbage collection, which isn't really great since you never know when GC will happen and behavior is different between browse

Re: Experiences using event bus

2020-09-01 Thread Jens
> If I'm looking at it correctly, it provides just syntactic sugar on top of > GWT's own EventBus, right? Thats true,´. > From what I can see, problem with "ghost" references in event bus which > would prevent subscribed objects from being garbage collected is still > there. > Right.

Re: Experiences using event bus

2020-09-01 Thread Gordan Krešić
On 31. 08. 2020. 23:06, lofid...@gmail.com wrote: My favorite for EventBus is this framework: https://github.com/google/gwteventbinder If I'm looking at it correctly, it provides just syntactic sugar on top of GWT's own EventBus, right? Benefits are obvious, but it looks like they are limite

Re: Experiences using event bus

2020-08-31 Thread lofid...@gmail.com
My favorite for EventBus is this framework: https://github.com/google/gwteventbinder In combination with the video, IMHO is the easiest framework for EventBus: Google I/O 2013 - Demystifying MVP and EventBus in GWT

Re: Experiences using event bus

2020-08-30 Thread Gordan Krešić
On 30. 08. 2020. 02:19, Thomas Broyer wrote: A WeakRef would be the only way, other than implementing explicit reference-counting. Bump, didn't even know for WeakRef, tnx. Support isn't great: https://caniuse.com/#search=WeakRef but at least it opens a door for better bus implement

Re: Experiences using event bus

2020-08-29 Thread Thomas Broyer
WeakMap and WeakSet aren't iterable, you cannot discover what they contain, you have to know and can only check if it's in the map/set and for a map get its associated value. This is of no use for an event bus wanting to keep weak references to its handlers. A WeakRef would be the only way, oth

Experiences using event bus

2020-08-29 Thread Gordan Krešić
I would like to ask for any advice/idea on how to use event buses in GWT. So far I'm using GWT's own com.google.gwt.event.shared.EventBus, but wouldn't have issues migrating to other implementations. My concern goes to very cumbersome and error prone handling when to unregister subscribers to

Experiences using event bus

2020-08-28 Thread Gordan Krešić
I would like to ask for any advice/idea on how to use event buses in GWT. So far I'm using GWT's own com.google.gwt.event.shared.EventBus, but wouldn't have issues migrating to other implementations. My concern goes to very cumbersome and error prone handling when to unregister subscribers to