Tuesday, 29 September 2009

STEP GWT app

Hi

Just to say that I've now got a properly structured MVP (Model View Presenter) with an EventBus and dependency injection prototype thing going. I'll send something very basic once I've got a dropdown tied with a list of biblical books from JSword and packaged all up. The idea here, being to test on someone's laptop where JSword installs/starts up properly... I'll add logging to track what happens in the request...

The following is technical design questions to anyone who has done GWT stuff before...

In the things I've seen, the EventBus is just used to notify other parts of the page/views that the application UI is changing... I'm thinking of putting some structure in place to propagate the events via a Command pattern to the server (so flags in the event to work out whether the event should be passed through) in order to remove the need for global commands. Here's the pattern I'm thinking of:

UI Component says: fireEvent("I need a list of biblical books from somewhere")
Our new EventBus propogates the event to all interested and registered clients, and if a flag is set to the "server event bus".
The server event bus then propagates the event to all interested listeners. They respond by firing another event onto the "server event bus" where the event will then propagate to the client to all interested parties and update all parts of the UI as appropriate...

I don't know if anybody has done GWT stuff before? This sounds like a brilliant idea, driving the whole app via events. Not sure if people think it's good or not... Not sure if others have done stuff in GWT before?

Cheers
Chris

No comments:

Post a Comment