Field

From HEWIKI
Jump to: navigation, search

A field represents the storage of data on a Node in the GOM. A field defined in the DOM and organized into a related collections with Classes. Each field has a name and specified data type.

The fields that exist on a Node are determined by the class or classes of that Node and any classes inherited from those classes and so on.

A field defined in the server-side DOM specifies a Write Strategy that informs the engine about when changed to the data of the field is written to the database.

It is important to note that in HeroEngine, a field of a given name has exactly one meaning wherever it is used. This is different than other programming languages.

For example, in C++, you might have one particular class that has a field "Job" that keeps track of a list of jobs to be performed and another class with a field also named "Job" that is a string that keeps track of what job someone has. They have the same identifier, but mean different things.

In HeroScript, a field named "Job" will have exactly one definition and, thus, meaning. And, in fact, no matter how many times a field appears in the hierarchy of classes a node is derived from, the data store of that named type exists only once on the node.

See also

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox