This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes GWT and the fly likes Question about GWT MVP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "Question about GWT MVP" Watch "Question about GWT MVP" New topic
Author

Question about GWT MVP

Mjeff Wilson
Greenhorn

Joined: Oct 30, 2007
Posts: 4
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?
Federico Kereki
author
Ranch Hand

Joined: Aug 27, 2010
Posts: 31
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!


Great fan of Open Source, Linux, and web development with GWT; all of these come together for my ESSENTIAL GWT book!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Question about GWT MVP
 
Similar Threads
WA #1.....word association
Client Design
Stripes mvc?
An integration with Flex question
GWT MVP and SmartGWT