[go: nahoru, domu]

Jump to content

UI data binding: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m JavaScript: clean up, replaced: [[ReactJS → [[React (JavaScript library) using AWB
 
(17 intermediate revisions by 15 users not shown)
Line 3: Line 3:
'''UI data binding''' is a [[Design pattern (computer science)|software design pattern]] to simplify development of [[GUI]] applications. UI [[data binding]] binds UI elements to an application [[domain model]]. Most frameworks employ the [[Observer pattern]] as the underlying binding mechanism. To work efficiently, UI data binding has to address [[Data validation|input validation]] and data type mapping.
'''UI data binding''' is a [[Design pattern (computer science)|software design pattern]] to simplify development of [[GUI]] applications. UI [[data binding]] binds UI elements to an application [[domain model]]. Most frameworks employ the [[Observer pattern]] as the underlying binding mechanism. To work efficiently, UI data binding has to address [[Data validation|input validation]] and data type mapping.


A ''bound control'' is a [[GUI widget|widget]] whose value is tied or [[data binding|bound]] to a field in a [[recordset]] (i.e., a [[column (database)|column]] in a [[row (database)|row]] of a [[table (database)|table]]). Changes made to data within the control are automatically saved to the database when the control's exit [[event trigger]]s.
A ''bound control'' is a [[GUI widget|widget]] whose value is tied or [[data binding|bound]] to a field in a [[recordset]] (e.g., a [[column (database)|column]] in a [[row (database)|row]] of a [[table (database)|table]]). Changes made to data within the control are automatically saved to the database when the control's exit [[event trigger]]s.

== Example ==
<syntaxhighlight lang="xml">
<TextBlock Text="{Binding Username}" />
</syntaxhighlight>
<syntaxhighlight lang="csharp">
public class ExampleViewModel
{
public string Username { get; set; }
}
</syntaxhighlight>


== Data binding frameworks and tools ==
== Data binding frameworks and tools ==


=== [[Delphi (programming language)|Delphi]] ===
===Cocoa & Cocoa Touch===
* [[DSharp (data binding)|DSharp]] third-party data binding tool{{cn|date=December 2016}}
* [[Cocoa Bindings]]
* [[OpenWire (library)|OpenWire]] Visual Live Binding - third-party visual data binding tool
* [[ReactiveCocoa]]

=== [[Embarcadero Delphi|Delphi]] ===
* [[LiveBindings]]
* [[DSharp]] 3rd party Data Binding tool
* [[OpenWire (library)|OpenWire]] Visual Live Binding - 3rd party Visual Data Binding tool


=== Java ===
=== Java ===
* [[JSR-227]] A Standard Data Binding & Data Access Facility for J2EE
* [[JFace]] Data Binding
* [[JFace]] Data Binding
* [[JavaFX]] Property<ref>{{Cite web | url=https://docs.oracle.com/javafx/2/binding/jfxpub-binding.htm |title = Using JavaFX Properties and Binding &#124; JavaFX 2 Tutorials and Documentation}}</ref>
* [[JGoodies]] Binding
* [[Melasse]] ''glue'' framework.


=== .NET ===
=== .NET ===
* [[Windows Forms]] data binding overview
* [[Windows Forms]] data binding overview
* [[Windows Presentation Foundation|WPF]] data binding overview
* [[Windows Presentation Foundation|WPF]] data binding overview
* Unity 3D data binding framework (available in modifications for NGUI, iGUI and EZGUI libraries)
* Unity 3D data binding framework (available in modifications for NGUI, iGUI and EZGUI libraries){{cn|date=December 2016}}

=== Flex ===
* [[Flex data binding]]


=== JavaScript ===
=== JavaScript ===
* [[Angular_(web_framework)|Angular]]
* [[AngularJS]]
* [[AngularJS]]
* [[Backbone.js]]
* [[Backbone.js]]
* [[Ember.js]]
* [[Ember.js]]
* Datum.js<ref>{{cite web |url=http://datumjs.com|title=Datum.js|access-date=7 November 2016}}</ref>
* [[knockout.js]]
* [[knockout.js]]
* [[Meteor (web framework)|Meteor]], via its ''Blaze'' live update engine<ref>{{cite web|title=Meteor Blaze|url=https://www.meteor.com/blaze|quote=Meteor Blaze is a powerful library for creating live-updating user interfaces. Blaze fulfills the same purpose as Angular, Backbone, Ember, React, Polymer, or Knockout, but is much easier to use. We built it because we thought that other libraries made user interface programming unnecessarily difficult and confusing.}}</ref>
* [[Meteor (web framework)|Meteor]], via its ''Blaze'' live update engine<ref>{{cite web|title=Meteor Blaze|url=https://www.meteor.com/blaze|quote=Meteor Blaze is a powerful library for creating live-updating user interfaces. Blaze fulfills the same purpose as Angular, Backbone, Ember, React, Polymer, or Knockout, but is much easier to use. We built it because we thought that other libraries made user interface programming unnecessarily difficult and confusing.}}</ref>
* [[OpenUI5]]
* [[OpenUI5]]
* [[React (JavaScript library)|React]]
* [[React (JavaScript library)|React]]
* [[Vue.js]]


==See also==
==See also==
*[[Data binding]]
* [[Data binding]]


==References==
==References==

Latest revision as of 16:47, 20 September 2021

UI data binding is a software design pattern to simplify development of GUI applications. UI data binding binds UI elements to an application domain model. Most frameworks employ the Observer pattern as the underlying binding mechanism. To work efficiently, UI data binding has to address input validation and data type mapping.

A bound control is a widget whose value is tied or bound to a field in a recordset (e.g., a column in a row of a table). Changes made to data within the control are automatically saved to the database when the control's exit event triggers.

Example

[edit]
<TextBlock Text="{Binding Username}" />
public class ExampleViewModel
{
    public string Username { get; set; }
}

Data binding frameworks and tools

[edit]

Java

[edit]

.NET

[edit]
  • Windows Forms data binding overview
  • WPF data binding overview
  • Unity 3D data binding framework (available in modifications for NGUI, iGUI and EZGUI libraries)[citation needed]

JavaScript

[edit]

See also

[edit]

References

[edit]
  1. ^ "Using JavaFX Properties and Binding | JavaFX 2 Tutorials and Documentation".
  2. ^ "Datum.js". Retrieved 7 November 2016.
  3. ^ "Meteor Blaze". Meteor Blaze is a powerful library for creating live-updating user interfaces. Blaze fulfills the same purpose as Angular, Backbone, Ember, React, Polymer, or Knockout, but is much easier to use. We built it because we thought that other libraries made user interface programming unnecessarily difficult and confusing.