I am currently using Delphi XE2, and heard about their new Live Binding with Automatic updates in XE3 (no need to call Notify() as in XE2).
in C# or in Delphi XE2 we have to implement INotifyPropertyChanged
(Notify();
in Delphi), and this approach really makes sense as we have full control over the contents to be updated and when to update it so we can fine tune the performance and implement virtualization easily.
But I just want to know how does it works, what kind of mechanism they have done in order to implement it, and i have no clue how they have did it, following are the assumptions may have used to implement Automatic updates.
Timer : A timer tick frequently and refreshes all the data
Very slow performance no virtualization
Compiler Level Feature : All the notify() events
related codes implemented by the compiler auto-magically
Lots of over heads
Somme other Approach:
Please help me to identified how they have implemented it.
I am currently using XE3 trial so i don't have access to the source code, your answers will help me decide whether to switch to new features or not.
I have a class(collection item) with 400 properties to bind(Not all of them all the time), so the performance really plays a major role in the stability of my application.
LiveBindings happen by binding any object with another object of interest based on some events. This happens by an observer pattern, when there is event trigger, the object inspector will be notified and the inspector will notify the already registered components to display the changes.
Hope this helps. There is lot of documentation for this if you want to dig around.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With