Frames

Tables in Casbah have really three names: CaDicts, tables, or frames. Any name can be used interchangeably, and in order to help the reader's confusion, the writer of this document will slip every now and then and use any of these three terms.

Frames contain slots. Slots could also be called members, fields, or elements. Each slot is named with a CaString, and occurs in no particular order. (Although a Natroun driver or an Oriel driver may enforce an ordering of particular slots due to its implementation.) A frame may contain any number of slots, with any names. A driver (Natroun or Oriel) may allow only certain slots to exist in a frame. For instance, a Java object might contain the members "name" and "address". A JavaOriel driver may constrain a frame to only contain these members. More about this later in this document.

Frames in Casbah can be placed at any location in the CVN. The frame's location has nothing to do with its contents, it is only for user convience. Each frame is considered an instance of a prototype. There are no classes in Casbah, only prototypes. Prototypes define a set of defaults for an object instance. When a slot is not defined in a frame, the prototype is searched for the slot. Prototypes themselves are nothing more than a normal frame. Prototypes don't contain any special slots, they are prototypes merely by the fact that another frame points to it, asking it to become its prototype.

The Casbah Access Model utilizes a specially named slot in a frame in order to implement its functionality. This slot is named "__cb_proto_" (from "_proto" in NetwonScript). __cb_proto_ contains the name of a frame's prototype in a CaString. This path may either be an absolute CVN path (such as "/system/classes/Rectangle"), or a relative CVN path, which will be searched for (such as "Rectangle")