Which way to MVP? and other notes from DevNexus
Posted by David Chandler on March 10, 2010
I had the privilege of speaking at DevNexus this week (conf was a great success, with 300+ developers from the Atlanta area), and the challenge of speaking on AppEngine and GWT MVP immediately after Google engineers spoke on the same topics. It was great to meet AppEngine for Java co-creator Toby Reyelts and GWT engineer Chris Ramsdale, both of whom are frequently seen on the forums.
Chris and I presented slightly different ways of doing MVP. Ray Ryan’s Google I/O 2009 presentation that started the MVP craze showed the approach taken by gwt-presenter (which I showed), where each view implements an interface defined by the corresponding presenter. Other Google teams have subsequently modified this approach and define interfaces for both presenter and view. This simplifies DOM event handling. In Ray Ryan’s original model, the presenter would add a ClickHandler to a Widget implementing HasClickHandlers. In the double-interface model, the view could instead add the ClickHandler and call a method on the presenter interface. I have definitely run into situations where the latter would be handy, but I don’t have a strong opinion either way, and Chris was very careful not to be dogmatic, either. There are lots of good ideas out there. Someone at my GWT talk asked if I had seen mvp4g (I hadn’t, thanks!), and claimed it has runAsync support for presenters, which sounds promising.
At the end of my talk on gwt-presenter and gwt-dispatch, I presented a few GWT development tools (Firefox Web Developer Toolbar and Firebug) and made the claim that they represent the best there is for WYSIWYG GWT development.
OOPS! Embarrassingly, I hadn’t tried Chrome Developer Tools yet! Google has raised the bar again.
Speed Tracer also looks very promising for analyzing GWT, in particular.
Having been “heads-down” on AppEngine and GWT for the last 6 months, it was good to take a breather and catch up on new developments.