Difference between revisions of "Attribute (computing)"
Karl Jones (Talk | contribs) |
Karl Jones (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | In [[computing]], an '''attribute''' is a specification that defines a property of an [[Object (computer science)|object]], [[HTML element|element]], | + | In [[computing]], an '''attribute''' is a specification that defines a property of an [[Object (computer science)|object]], [[HTML element|element]], [[Computer file|file]], etc. |
It may also refer to or set the specific value for a given instance of such. | It may also refer to or set the specific value for a given instance of such. | ||
Line 5: | Line 5: | ||
== Description == | == Description == | ||
− | For clarity, attributes should more correctly be considered metadata. An attribute is frequently and generally a property of a property. | + | For clarity, attributes should more correctly be considered [[metadata]]. An attribute is frequently and generally a property of a property. |
However, in actual usage, the term attribute can and is often treated as equivalent to a property depending on the technology being discussed. | However, in actual usage, the term attribute can and is often treated as equivalent to a property depending on the technology being discussed. |
Latest revision as of 19:52, 23 August 2016
In computing, an attribute is a specification that defines a property of an object, element, file, etc.
It may also refer to or set the specific value for a given instance of such.
Description
For clarity, attributes should more correctly be considered metadata. An attribute is frequently and generally a property of a property.
However, in actual usage, the term attribute can and is often treated as equivalent to a property depending on the technology being discussed.
An attribute of an object usually consists of a name and a value; of an element, a type or class name; of a file, a name and extension.
Each named attribute has an associated set of rules called operations: one doesn't sum characters or manipulate and process an integer array as an image object— one doesn't process text as type floating point (decimal numbers).
It follows that an object definition can be extended by imposing data typing: a representation format, a default value, and legal operations (rules) and restrictions ("Division by zero is not to be tolerated!") are all potentially involved in defining an attribute, or conversely, may be spoken of as attributes of that object's type.
A JPEG file is not decoded by the same operations (however similar they may be—these are all graphics data formats) as a PNG or BMP file, nor is a floating point typed number operated upon by the rules applied to typed long integers.
For example, in computer graphics, line objects can have attributes such as thickness (with real values), color (with descriptive values such as brown or green or values defined in a certain color model, such as RGB), dashing attributes, etc. A circle object can be defined in similar attributes plus an origin and radius.
See also
- Attribute–value pair
- Extended file attributes
- Field (computer science)
- File attribute
- HTML attribute
- Java annotation
- Metadata
- Property (programming)
External links
- Attribute (computing) @ Wikipedia