Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [riena-dev] Binding of Ridgets: Ridget-Setters obsolete?

Existing code should be no problem when it comes to the DefaultBindingManager, because it is created as a default by the framework. The InjectAllAtOnceBindingManager can be created by a View to override the default so this class should be kept as deprecated. Why not keep the InjectAllAtOnceBindingManager as it is? I think it is somewhat inaccurately named: it does not inject all ridgets at once but rather calls addRidget(..) repeatedly.

Carsten

-----Ursprüngliche Nachricht-----
Von: riena-dev-bounces@xxxxxxxxxxx [mailto:riena-dev-bounces@xxxxxxxxxxx] Im Auftrag von Christian Campo
Gesendet: Montag, 16. Juni 2008 10:26
An: Riena Developers list
Betreff: Re: [riena-dev] Binding of Ridgets: Ridget-Setters obsolete?

+1 in general....

however what is the strategy for existing code. Do they get a compile  
or runtime error (not so nice) or
can we rather deprecate the DefaultBindingManager (maybe display a  
message in the console that you
are using a deprecated thing) and make the  
InjectAllAtOnceBindingManager the default. Is it necessary
to call it DefaultBindingManager for that ?

christian
Am 16.06.2008 um 09:40 schrieb Alexander Ziegler:

> +1
>
> Alexander
>
>
> Am 13.06.08 16:26 schrieb "Carsten Drossel" unter
> <Carsten.Drossel@xxxxxxxxxxxx>:
>
>> Hi there!
>>
>> When a View is bound to a ViewController for the first time, a  
>> Ridget is
>> created for each UI widget and injected into the ViewController. The
>> injection strategy is defined by an implementation of the interface
>> IBindingManager. Currently there are 2 implementations:
>>
>> DefaultBindingManager
>> - calls the method addRidget of the IRidgetContainer  
>> (IViewController)
>> for each Ridget
>> - calls a setter (it gets via reflection using the name property of  
>> the
>> UI widget) for each Ridget
>>
>> InjectAllAtOnceBindingManager
>> - calls the method addRidget of the IRidgetContainer  
>> (IViewController)
>> for each Ridget
>> - after all Ridgets are injected it calls the method  
>> configureRidgets()
>> (of the interface IInjectAllRidgetsAtOnce which the IRidgetContainer
>> must implement) to notify that all Ridgets were added
>>
>> The method addRidget was added later and appears to make the  
>> invokation
>> of the setters in the DefaultBindingManager obsolete. The setters  
>> are a
>> pretty good place for the individual initialization of a Ridget. But
>> their invokation is error-prone since it depends on the matching of a
>> String and a method name which cannot be checked by the compiler.
>>
>> I would suggest to keep only the InjectAllAtOnceBindingManager and to
>> rename it to DefaultBindingManager. The interface
>> IInjectAllRidgetsAtOnce should be removed and its method
>> configureRidgets() moved to IRidgetContainer.
>>
>> Are there any objections? Otherwise I would open a bugzilla entry...
>>
>> Greetings,
>> Carsten
>>
>> _______________________________________________
>> riena-dev mailing list
>> riena-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/riena-dev
>
> _______________________________________________
> riena-dev mailing list
> riena-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/riena-dev

_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev


Back to the top