Binding (computer science)
From Free net encyclopedia
In computer science, binding refers to the creation of a simple reference to something which is larger and more complicated and used frequently. The simple reference can be used instead of having to repeat the larger thing.
Contents |
Types of binding
The following are commonly referred to as bindings.
Language binding
Template:Main Language binding provides access to a library from a language other than that in which the library was written.
Name binding
Template:Main Name binding is used in programming languages to refer to values by (previously specified) identifiers.
XML data binding
Command binding
Command bindings, commonly referred to as keyboard macros, or simply macros, are frequently built into professional quality computer applications. In most of these, bindings can be modified, added, but usually can not be removed (e.g. the keystroke combination cannot be unassociated with the function that it is associated with).
Examples of command bindings configured by default
Most applications on Mac OS bind the "Save" menu item to the Command-S keyboard shortcut, so that Command-S can be used to save a document instead of having to navigate to that menu item each time. The Emacs text editor binds the "save-buffers-kill-emacs" command to the Control-X Control-C keystrokes in sequence, so that the user does not have to type "save-buffers-kill-emacs" whenever he wants to save and quit. Often a computer application may allow the user to create a macro to do several common operations in sequence, and then bind a simple command to that macro to activate it.
Control binding
Control bindings in video games. A game might have a "shoot" control which can be bound to any available key. A game like Tribes with complicated in-game menus can bind specific sequences of keys as shortcuts to menu items.