17

What is your favorite GWT MVP Framework, and the reason behind your choice?

  1. Mvp4g
  2. GWTP
  3. GWT 2.1 Built in
  4. gwt-mpv
  5. gwt-pectin
  6. guit
  7. Other platform (please provide link)
  8. Own solution (with boilerplate code?)
  9. None

Thanks.

Updated: Added suggestions 3, 4, 5 to the list.

Updated 2: Added guit to the list.

Jeff Schaller
  • 2,352
  • 5
  • 23
  • 38
Lee Chee Kiam
  • 11,450
  • 10
  • 65
  • 87
  • GWT-Pectin doesn't look like a MVP framework, but describes itself as a "binding and validation framework". They describe how it can be used along a MVP framework and I saw somebody is using it with GWTP, for example. – PhiLho Jan 23 '12 at 12:56

8 Answers8

5

This is a bit of a difficult one at the moment. It seems MVP is the flavour of the month (or year, as it were) but there are so many options available and very few actual tutorials.

I went through the Contacts example and kinda got it: http://code.google.com/webtoolkit/articles/mvp-architecture.html

Then I realised they had added Activities and Places in 2.1, so I looked at that example: http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html

There are also numerous frameworks out there but most people seem to want to use "the google way" if possible. I'm going to give http://code.google.com/p/gwt-platform/ a go because it looks like it has some great docs, and that'[s what google is lacking at the moment.

The point is, there are no good TUTORIALS available - that's how we will all actually understand. The Stockwatcher tutorial on gwt was really useful, we could do with more like it. Here's some tidbits I've found:

Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164
slugmandrew
  • 1,776
  • 2
  • 25
  • 45
4

I use GWTP because it is reasonably well documented, easy to understand and has an active user community. When I started learning the framework I had to ask a couple of questions in the forums and on both occasions, I got a friendly and helpful response on the same day from one of the authors.

smcmahon
  • 217
  • 3
  • 8
2

I think the best technique of MVP for GWT is to have the following classes

  1. Model
  2. View
  3. Presenter

And make the view and the presenter interacts through a defined interface and have the presenter fetch data from the model. First, it is very simple, secondly it allows team working since we are using interfaces, every teams just have to abide by the interface.

For e.g.

     1. Those working on the MODEL abide by the ServiceAync Interface

     2. Those working on the view creates the User Interface and returns the  
        specified control to the presenter according the program interface defined by
        their respective presenter
     3. And Finally those working on the presenter level defines an interface which
        the view has to implement

I think that the main problem that can arise in this is when one part which may be one of the View,the Model or the Presenter doesn't abide by the interface

Noor
  • 19,638
  • 38
  • 136
  • 254
1

For me its GWTP, a complete model-view-presenter framework to simplify your next GWT project. available at http://code.google.com/p/gwt-platform/

prayagupa
  • 30,204
  • 14
  • 155
  • 192
1

The new version of GWT (GWT 2.1) introduced an MVP framework,

they introduced some new terminology like:

  1. Views
  2. ClientFactory
  3. Activities
  4. Places
  5. PlaceHistoryMapper
  6. ActivityMapper

you can check the details here:

http://code.google.com/webtoolkit/doc/latest/DevGuideMvpActivitiesAndPlaces.html

mmohab
  • 2,303
  • 4
  • 27
  • 43
1

Seems see GWT frameworks are a dime a dozen, much like Java web frameworks. That being said, I went with 4. Primarily because I wanted to do MVP without the boilerplate interfaces:

http://www.gwtmpv.org/viewgeneration.html

Docs are light, as always, but ping me if you have any questions, I'd be glad to answer them.

gwt-pectin is good too--I think gwtmpv is more succinct, but gwt-pectin has been doing the rich model/bound to a view approach for awhile.

Stephen Haberman
  • 1,454
  • 1
  • 9
  • 12
1

Also using the built-in MVP framework, luckily when using Spring Roo GWT, all that boilerplate code is generated for you.

Jan Vladimir Mostert
  • 12,380
  • 15
  • 80
  • 137
  • Do you use/know anyone use Spring Roo + GWT in production? Thanks. – Lee Chee Kiam Dec 14 '10 at 10:22
  • I'm using it in production for two projects that will go live next year; some people tell me I'm crazy to be using it, I think they're crazy for still building stuff in javascript. Another company in Cape Town is starting a Spring Roo GWT project in March next year, not allowed to give more details. Personal experience with ROO is that it gets in the way if you just step slightly over the edge of the path that ROO wants you to use, otherwise it's an awesome tool. – Jan Vladimir Mostert Dec 21 '10 at 08:38
0

I tried GWTP but it doesn't everything under the hood without you understanding it and it is hard to diverge from there way of doing things. I had this issue the first time I tried it and I tried it again too. Unfortunately, I had the same issue. I wanted to combine the Presenter and View for 1 page because it was overkill for that page. Unfortunately, I couldn't figure out how to do that so I decided that my worst fears had been realized. It's very hard to diverge from their way of doing things in GWTP. The architecture of GWT 2.1 is much more decoupled. I hadan issue with the ActivityMapper though. Now I'm looking at mvp4g.

jgleoj23
  • 262
  • 2
  • 9