Data Binding
This topic applies to .NET version only
One common question we get from our users is:
Can I still take advantage of data aware control mechanisms with my objects?
The answer is quite simply yes. .NET data binding also works with plain
objects.
This is also to say that using db4o is completely orthogonal to the
use of data binding.
The usual pattern would be something like the
following:
-
the code asks db4o to retrieve the objects that must be
presented to the user
- the UI controls are bound to the objects (no
interaction with db4o here)
- the user interacts with the objects through
the controls (no interaction with db4o here)
- when the user is done
interacting with the objects or by his request, the application will ask db4o to
persist his changes
Let's take a very simple example that illustrates
the points above.
Our business class:
Code attachment not found: /Resources/Reference/Advanced_db4o_Techniques/bindingCS.zip
Code attachment not found: /Resources/Reference/Advanced_db4o_Techniques/bindingVB.zip
The Form class:
Code attachment not found: /Resources/Reference/Advanced_db4o_Techniques/bindingCS.zip
Code attachment not found: /Resources/Reference/Advanced_db4o_Techniques/bindingVB.zip