Re: how to avoid instanceof checks in ActivityMapper ? is DoubleDispatch used in Expenses sample ?

2011-01-04 Thread Y2i
I was thinking of a similar approach, but couldn't come up with a way to populate the lookup table (initialize it for the first time with data). could you please explain how you register activities/places in the lookup table, so that they are available at run-time ? At the moment I simply

Re: how to avoid instanceof checks in ActivityMapper ? is DoubleDispatch used in Expenses sample ?

2011-01-03 Thread Thomas Broyer
I'm sorry but, what's the problem actually? theoretical purity? (AFAICT, Roo generated apps use those processors for ease of maintainance: the processor is maintained by Roo while the activity mapper is generated once) -- You received this message because you are subscribed to the Google

Re: how to avoid instanceof checks in ActivityMapper ? is DoubleDispatch used in Expenses sample ?

2011-01-03 Thread zixzigma
are you suggesting this is nothing to worry about ? in the case of Expenses app, there are only three entities: Expenses, Reports, Employees (and number of places and fine-grained activities mapper, is relative to the number of entities) however, in a larger app , there might be 50 entities. and

Re: how to avoid instanceof checks in ActivityMapper ? is DoubleDispatch used in Expenses sample ?

2011-01-03 Thread Y2i
My app has a Place for every EntityProxy type. BasePlace has getProxyType() method that is called in MyActivityMapper.getActivity(place). Based on the proxy type returned, getActivity() method looks up an activity factory and calls factory.createActivity(place, config) All I have to do is to

Re: how to avoid instanceof checks in ActivityMapper ? is DoubleDispatch used in Expenses sample ?

2011-01-03 Thread zixzigma
thank you for your suggestion. I was thinking of a similar approach, but couldn't come up with a way to populate the lookup table (initialize it for the first time with data). could you please explain how you register activities/places in the lookup table, so that they are available at run-time

how to avoid instanceof checks in ActivityMapper ? is DoubleDispatch used in Expenses sample ?

2011-01-02 Thread zixzigma
GWT MVP ActivityMappers have lots of instanceof checks [*] for mapping a given Place to the corresponding Activity (or to a more specific AcitivtityMapper). I was wondering if there is a way to avoid using instanceof checks, and instead use an elegant Object Oriented approach. I looked into a

Re: how to avoid instanceof checks in ActivityMapper ? is DoubleDispatch used in Expenses sample ?

2011-01-02 Thread Matthew Hill
You could use a generator, I think. -- 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-tool...@googlegroups.com. To unsubscribe from this group, send email to

Re: how to avoid instanceof checks in ActivityMapper ? is DoubleDispatch used in Expenses sample ?

2011-01-02 Thread zixzigma
if code generator generates the same instanceof checks, the problem still remains. how can we replace the instanceof checks with a new design (pattern) ? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to

Re: how to avoid instanceof checks in ActivityMapper ? is DoubleDispatch used in Expenses sample ?

2011-01-02 Thread Matthew Hill
Oh, I know, but at least you wouldn't have to write them. Sorry, I thought that was the issue at hand here. Ignore my answer; I misunderstood the question. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email