-2

I have great experience in programming by using java and other languages. I need anyone who has great experience in using GWT with MVP to explain how to build GWT Application using MVP:

View package : explain what should be in view class.

Client Package: explain what java files are supposed to be here and what is the benefit from each file.

Server Package: I think here all services files( RPC ).

Activity Package: Explain what is the benefit from the classes here , I think here we we connect events with controls in view classes( Am I correct?).

Place Package: I need to understand this very well.

Also what is the benefit from Clientfactory java file?

what is eventbus?

what is placecontroller?

please if you can order which file should be coded one after another?

Thank you in advance,

Moe
  • 197
  • 6
  • this really does seem a lazy question. It's not in the spirit of SO at all - the OP is asking for a free GWT-MVP training course. – ianmayo Apr 18 '12 at 09:48

1 Answers1

1

1) View is a widget with link to its presenter. It should notify presenter about ui events which should be processed.

2) Views, presenters, client(not shared with the server side) model, places, activities, PlaceHistoryMapper, ActivityMapper. About benefits see below.

Are you understand presenters well? According to your question i assume you confuse it with activities. 1.1 ) Presenter creates and manages view, makes rpc and most of 'logic' stuff.

3) You are right, server package is just a java server logic.

4) Activities link places and presenters. I will return to describing activities below.

5) Place has name, token and own Tokenizer which transforms its place to a token and other way round.

6) I didn't use ClientFactory. I prefer dependency injection with google-gin(gwt client version of guice)

7) Event bus is... I couldn't describe better than official javadoc does :)

Dispatches Events to interested parties. Eases decoupling by allowing objects to interact without having direct dependencies upon one another, and without requiring event sources to deal with maintaining handler lists. There will typically be one EventBus per application, broadcasting events that may be of general interest.

8) PlaceController knows where you are(in application :) and may change current place. (obviously, it has getWhere() and goTo(Place) methods)

9) Firstly you need to code application's singletones like PlaceHostoryMapper and ActivityMapper. PlaceHostoryMapper provides history and converting tokens to places by segregating all PlaceTokenizers. ACtivityMapper segregates all places and activities and provides second ones by first ones.

Views and presenters are based on interfaces. Next I would declare such interfaces. Then write places. Then you able to code activities because you have places and interfaces of presenters. Then in any order implement views and presenters, map activities to places in ActivityMapper and register PlaceTokenizers in PlaceHistoryMapper.

I assume now you have more questions, feel free to ask in comments or by contacts in my profile :)

cardamo
  • 853
  • 4
  • 13