Re: Too much is happening (the events are crowding the bus)?

2009-11-26 Thread mariyan nenchev
Hi, I am interested in this gwt architecture too. I did have a look at the video and a hello world application implemented with this architecture, and really i think that this is too much code to write. I also looked at the apache hupa project, that is using the same architecture. And they did a ge

Re: Too much is happening (the events are crowding the bus)?

2009-11-25 Thread Arthur Kalmenson
I agree with Matt here. We also followed the same principle of having many smaller events, meaning a Presenter will get only the event it wants to listen to. Using an enum in the event could work too, but again as Matt pointed out you'll end up having if-then-else trees, which is hard to read, test

Re: Too much is happening (the events are crowding the bus)?

2009-11-17 Thread Matt Bishop
Your simple, many-classes design is actually a Good Thing. Event objects should really only do one specific step in the workflow of your application. Lots of small, discrete and completely specific action classes is far preferrable to a smaller set of classes that contain if-then-else trees and s

Re: Too much is happening (the events are crowding the bus)?

2009-11-16 Thread ArmanGal
I use Operation enum inside the action that tells my presenter how to handle the action. + I create number of constructors for this event to support every operation, while the event it self has all needed properties for all operations. ;) On Nov 15, 4:19 am, "slind...@gmail.com" wrote: > I am at

Re: Too much is happening (the events are crowding the bus)?

2009-11-16 Thread Ian Bambury
As Thomas says, only introduce an event when needed. Also, remember that there is no point to an event if nothing else is interested. If you only have one list of cars, then a CarAdded event is not needed since the list can deal with the server response directly. The same is true of the other eve

Re: Too much is happening (the events are crowding the bus)?

2009-11-16 Thread Thomas Broyer
On Nov 15, 3:19 am, "slind...@gmail.com" wrote: > I am attempting to implement the EventBus pattern and I find myself > creating a LOT of Events (extending GwtEvent). I'll try to illustrate > what I mean with my Car object. I have a list of cars and a button > called "Add Car". This button has a

Too much is happening (the events are crowding the bus)?

2009-11-15 Thread slind...@gmail.com
I am attempting to implement the EventBus pattern and I find myself creating a LOT of Events (extending GwtEvent). I'll try to illustrate what I mean with my Car object. I have a list of cars and a button called "Add Car". This button has a ClickHandler attached which will fire a AddCarEvent. This