Friday, November 26, 2010

Re: Activities versus presenters - best practise

I think everyone is misinterpreting the statement in the documentation
"Activities are analogous to presenters"

the exact definition of analogous is : "similar or equivalent in some
respects though otherwise dissimilar"

the key part of what people are missing being 'otherwise dissimilar'

it seems that everyone is taking that statement as having said both
activities and presenters being similar only...!

On Nov 27, 1:01 am, Thomas Broyer <t.bro...@gmail.com> wrote:
> On 26 nov, 14:40, Raphael André Bauer <raphael.andre.ba...@gmail.com>
> wrote:
>
> > Hi,
>
> > just a simple best-practise question.
>
> > We are using GWT 2.1, mappers, activities and views. Everything works nicely.
>
> > But sometimes we want to use activities (aka presenters) and views
> > without a mapper. We could switch from an activity back to good old
> > presenter and a custom view interface that exposes eg. "Widget
> > asWidget()" or so.
>
> > But we could also stick to activities and their start(...) method. Of
> > course the activity would not be managed and would have no life cycle.
> > On the other hand it would be only a single programming model and we
> > would not need to define our own view interface.
>
> I don't understand that last bit. Activities don't define any "view
> interface" (Activity != MVP, contrary to what the doc says); any
> Widget implements IsWidget.
>
> > Does anybody have an advice how to handle that "best"?
>
> If you go with the "Activity model", developers will expect their life-
> cycle to be respected, which means adding tests that your "container"
> is not breaking it.
> If you don't use Activity, it'll be clear for the developer that the
> life-cycle is different.
>
> Other than the life-cycle though, I can't find any difference between
> the two approaches.

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

No comments:

Post a Comment