actually that's EXACTLY what i did, only on in the place itself as thomas
thinks i did, there is only ONE place class which contains as single token
string.

the reasons for this is override gwt's type system for the places where each
place class  is by default a new place, which goes against oo principals
which say that you only extend a class is it has additional  functionality
i then created one place tokenizer class, which is actually the place's
factory so to speak, this is the class i'm actually subclassing for new
places, but the new functionality here is the abstract method getActivity
where each  tokenizer implements with their own activity, thus the activity
mapper is really just a 3 liner , and as each places holds a reference to
it's creator it's simple go map them all thus i'm avoid all the annotations
specifications required for tokenizers

by implementing activity mapper's get place with the only the parameter
place, you allready "bound" and tried to place for activities relationships.

what's more if even if have different activity mapper which influcence on
the decision, then they should be included as a parameter and supply a
generic method for each mapper to implement which will assist in decision.

the way i look at it, the same place where you define a .. "place" (not
necessarily INSIDE the place, but logically)  should also provide for way to
know what activities to use, other wise you have to run around difference
..places to maintain your code.



On Mon, Jun 20, 2011 at 4:18 PM, Jens <[email protected]> wrote:

> Am Montag, 20. Juni 2011 14:50:00 UTC+2 schrieb Elhanan:
>
>> actually i think there should be no code activity mapper as the place
>> itself should contain the logic on what activity it should be refferred, for
>> each new place activity combo i have to go though lots of boiler plate code
>> which is really redudent..
>>
>
> Hm if you want to define the activity by the place I think you can simply
> do it. Create an AbstractPlace that contains an abstract method like
> getActivity() that returns new activities for that place. Your
> ActivityMapper would then be more or less a three liner. If you have more
> than one display area you would need more than one method, e.g.
> getMainActivity, getSideActivity.
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/google-web-toolkit/-/8UhwpTWBmhgJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to