I'm just starting off on my first attempt at the MVP architecture in GWT.
My understanding is that the job of PlaceTokenizer.getPlace(String)
is to take the token in the URL after the hash, parse it, and return a Place
with the object to which that token refers.
In my application, I have a resource (say, a video), which I tokenize by the video's unique id. Then my getPlace
method ought to take this id, and retrieve the video information from the server. Is this the right approach?
As far as how to execute this, the only way that I could figure out would be to have my RemoteService
right on the PlaceTokenizer
, and make the call right in that getPlace
method. Something about this made me hesitate. It seems like the call would be better suited for the Activity
or somewhere else.
Is this how it's done? If not, is there a better way?