www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Data-binding infrastructure.

reply lurker <lurker mailinator.com> writes:
Do you think Phobos could benefit by adding data-binding interfaces? The
purpose is to provide the infrastructure necessary so that other libraries
(GUI Toolkits, Validation, ORMs, etc) can inter-operate seamlessly.

In .NET there's a whole set of interfaces for this purpose. They don't have a
great design but the fact that they are standard makes possible to create an
object that can be bound everywhere and performs validation everywhere
(everywhere been, windows client, web application or web service).

You can see all interfaces related to data-binding here:
http://msdn.microsoft.com/en-us/library/41e17s4b.aspx

But the more used are these three:

INotifyPropertyChanged
Provides an event to notify listeners that a property has changed.

IDataErrorInfo
Provides methods that allow validating and display corresponding GUI elements
to the user.

IBindingList
Provides notification when a collection has changed (elements added/removed,
clear, update, ...)

Thanks
Jun 28 2010
parent reply BLS <windevguy hotmail.de> writes:
On 28/06/2010 18:36, lurker wrote:
 Do you think Phobos could benefit by adding data-binding interfaces? The
 purpose is to provide the infrastructure necessary so that other libraries
 (GUI Toolkits, Validation, ORMs, etc) can inter-operate seamlessly.

 In .NET there's a whole set of interfaces for this purpose. They don't have a
 great design but the fact that they are standard makes possible to create an
 object that can be bound everywhere and performs validation everywhere
 (everywhere been, windows client, web application or web service).

 You can see all interfaces related to data-binding here:
 http://msdn.microsoft.com/en-us/library/41e17s4b.aspx

 But the more used are these three:

 INotifyPropertyChanged
 Provides an event to notify listeners that a property has changed.

 IDataErrorInfo
 Provides methods that allow validating and display corresponding GUI elements
 to the user.

 IBindingList
 Provides notification when a collection has changed (elements added/removed,
 clear, update, ...)

 Thanks

IMHO this could be done by porting and enhancing the Mono code, use Stevens dcollection lib, enhance dCollection with observable containers and you are nearly done. Due to the Mono license a phobos independent project is appropriate. my 2 cents, bjoern
Jun 29 2010
parent Jacob Carlborg <doob me.com> writes:
On 2010-06-29 12.36, BLS wrote:
 On 28/06/2010 18:36, lurker wrote:
 Do you think Phobos could benefit by adding data-binding interfaces? The
 purpose is to provide the infrastructure necessary so that other
 libraries
 (GUI Toolkits, Validation, ORMs, etc) can inter-operate seamlessly.

 In .NET there's a whole set of interfaces for this purpose. They don't
 have a
 great design but the fact that they are standard makes possible to
 create an
 object that can be bound everywhere and performs validation everywhere
 (everywhere been, windows client, web application or web service).

 You can see all interfaces related to data-binding here:
 http://msdn.microsoft.com/en-us/library/41e17s4b.aspx

 But the more used are these three:

 INotifyPropertyChanged
 Provides an event to notify listeners that a property has changed.

 IDataErrorInfo
 Provides methods that allow validating and display corresponding GUI
 elements
 to the user.

 IBindingList
 Provides notification when a collection has changed (elements
 added/removed,
 clear, update, ...)

 Thanks

IMHO this could be done by porting and enhancing the Mono code, use Stevens dcollection lib, enhance dCollection with observable containers and you are nearly done. Due to the Mono license a phobos independent project is appropriate. my 2 cents, bjoern

Why do we need to port the Mono code? This seems quite easy to implement. -- Jacob Carlborg
Jun 30 2010