annotate Tools/DocGen/Content/Doc/ComponentModel/ObjectBinder.htm @ 9:1e85f66cf767 default tip

update bltoolkit
author nickolay
date Thu, 05 Apr 2018 20:53:26 +0300
parents f990fcb411a9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
1 <p class="j">
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
2 The <b>ObjectBinder</b> component has been designed to simplify binding controls on a form to objects for FW 1.x.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
3 Since Microsoft has released FW 2.0 we can use the <b>BindingSource</b> component to bind controls to objects.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
4 However the <b>ObjectBinder</b> still can be useful as it supports a few features which are not available for the <b>BindingSource</b>.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
5 Those features are:
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
6 </p>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
7
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
8 <ul>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
9 <li><p class="j">Support for field binding along with property binding.</p></li>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
10 <li><p class="j">Support for inner class field and property binding such as <i>Order.Address.Line1</i>.</p></li>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
11 <li><p class="j">Support for the <i>ObjectView</i> feature which is available by assigning an object view type to the
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
12 <b>ObjectBinder.ObjectViewType</b> property. An object view is an object that implements the <b>IObjectView</b> interface.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
13 This interface includes only one property - <i>object <b>Object</b> { get; set; }</i>.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
14 An object view can implement additional properties based on the assosiated object.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
15 The <b>ObjectBinder</b> will combine all of these properties with main object properties and create a single <b>PropertyDescriptor</b> collection.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
16 This feature can be used to separate UI presentation logic from business model objects and to keep them clean.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
17 ObjectView should be a stateless, lightweight object as its single instance can be assigned to many assosiated objects.</p></li>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
18 <li><p class="j">The <b>ObjectBinder</b> is optimized for high performance applications such real-time multithreaded message processing and
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
19 distribution banking systems. So it does not use reflection to access objects.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
20 The standard way (which is used by the <b>BindingSource</b>) is to call the <b>TypeDescriptor.GetProperties</b> method
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
21 to get a <b>PropertyDescriptor</b> collection. This method creates property descriptors that access object properties by reflection.
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
22 The <b>ObjectBinder</b> has its own mechanism to avoid unnessasy reflection and boxing/unboxing operations.</p></li>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
23 </ul>
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
24
f990fcb411a9 Копия текущей версии из github
cin
parents:
diff changeset
25 <p class="j">The dev version of BLToolkit contains a demo project (Demo\WinForms) showing the use of the <b>ObjectBinder</b>.</p>