GWT architecture "best practices" - MVP, dependency injection, command, event bus

Tagged:
Nice intro tutorial for the GWT best practices architecture Ray Ryan described at I/O this year over at Hive Development. This is the setup that the AdWords team came up with, and at first glace it looks very impressive. It uses two sub projects I have been wanting to employ for a while now: GIN (which is a GWT wrapper for Guice dependency injection), and GWT-Presenter. Actually, back in the day when working with GWT (a few years ago now), and when writing GWT in Practice, we used a very "presenter" like pattern, even though we called it MVC. We didn't have the event bus, we just used PropertyChangeSupport, but we did discuss it. It's nice to see GWT getting a bit more solid in the "architecture" area as that really seems to be where new developers struggle. There is no set pattern - it's up to you - and that leaves a plethora of options that can seem overwhelming. Many people take digs at GWT for this, but that's missing the point, as we also noted in GWT in Practice GWT is a very much a "toolkit" (it's in the name), and NOT a framework. I have always maintained that the important part is the toolkit itself (performance and capability) and architectural solutions or frameworks will come later organically as third party projects, or they may come from the GWT team, if it expands or has time, but more likely they will come from other Google users (aka Ray and that team, or the Wave team, etc). Other nice GWT related I/O talks are available too: http://googlecode.blogspot.com/2009/06/google-web-toolkit-at-google-io.html