• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Question about GWT MVP

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Frederico,

GWT 2.0 introduced the concept of using the Model-View-Presenter (MVP) pattern to separate the business logic from the view, and gives some examples of how to do that here: http://code.google.com/webtoolkit/articles/mvp-architecture.html. However, it is left to the developer to implement this pattern along with a lot of boilerplate code. GWT 2.1 promises more support for this pattern; are we going to see an actual framework based on MVP in 2.1? What will this framework look like, and how will it help reduce the effort to write a GWT program using MVP?
 
author
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While I cannot (yet) give a definitive answer on GWT 2.1, I did go over MVP in my book. I took it down a notch --going for an event bus is overkill, unless you are bent on showing several views of the same data at the same time-- but implemented all the needed classes and methods, and went over debugging too. I included a little problem that usually isn't shown: suppose you develop a widget (in MVP fashion) for, say, picking a country and then picking a state for that country. (The detail, you have to go to the server to get the states.) How do you include that MVP widget in a MVP form? Where do you initialize it? How do you use it? How do you process its events?

While using frameworks is usually good, you generally find that you must work around (or against! ) it for some things you want to do, and thus I preferred developing my own code, so as to be able to show the inner workings of a MVP application. As soon as I learn more about GWT 2.1, I'll get down to using (and writing about) it.

Thanks for your question!
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!