GWT 1.6: MVP and testing, part 2

posted on June 29, 2009 in coding

As for completeness, I made the previous example in a MVP + eventBus example. This can be download here. Unfortunately, I didn’t build a model class since that was too much overkill.
The procedure is simple and partially explained in the previous topic:
(more…)

GWT 1.6 MVP and testing, part 1

posted on June 25, 2009 in coding

After successfully building the eventBus, I decided to extend the application to use the MVP (Model-View-Presenter) pattern. The use of this pattern is nicely explained on the google testing blog. Since it’s quite a new way of doing this, there is very little example code available.
Since the gwt best practices are mostly focused on testing, and testing is an invaluable part of application design, we’ll write the test first. I’m not going in detail about Test Driven Development, there are plenty of good books around.
(more…)

GWT: capturing mouse position, drag and drop

posted on June 20, 2009 in coding

If you need to use drag and drop in your GWT application, there is a wonderful library available: gwt-dnd. Check out the demo: it offers almost everything one might expect from drag&drop.
Sometimes though, such a vast and feature-rich library is too much. I needed to create a custom scrollbar, and to do this with gwt-dnd is not that simple, since its constraint panel only affects the dropzone while the draggable element can still be dragged anywhere in the main AbsolutePanel.
So I looked for another way, and in fact it isn’t hard at all:
(more…)

Building a GWT 1.6 application: Managing events with an eventBus

posted on June 19, 2009 in coding

GWT 1.6 gets rid of all the Listener classes, and replaces them with the new Handler classes. For a comparison of the two, Jason from Lemming Technology Blog has a good overview.

At Google I/O, Ray Ryan talks about best practices for architecting your GWT app. There he mentions using an Eventbus to manage your events, and even provides some example code. Still, it all seemed a bit confusing, so I made a little testapplication to test it out.
(more…)

Blom Inrichtingen - interieurprojecten in de gezondheidszorg