Authenteo supports inheritance for versioning. Authenteo uses structural model inheritance in which the entire object graph of descendents of object are inherited and instances can modify proper descendents that are inherited without the orginial object graph being modified. In standard simple inheritance only first level properities of an instance, without modifying the inherited from object graph.
In order to accomplish this powerful inheritance, when a persistent object is returned from an access to a property of object A, and the property is inherited from object B, if C is a descendent of (pof discendent) of B, then version of instance of C is returned that is specific to abject A. This instance of C can be modified without modifying the original C, and the accesses to C that are accessed through A will have the appropriate modification. It is possible to determine of object C is a descendent of B by using the pjs.isDescendent function if it is not a descendent of B, the object A that inherits from B will not utilize an instance
version of C, but the original. This behavior holds true even if C is not a direct property of B, or A, but a property of one of its descendents. The instance of C that is specific to A can also be accessed by calling pjs.wrapper(A,C).
Java and JavaScript
both have inheritance capabilities. That is one entity will inherit
values and/or behavior from another entity. Authenteo also has
inheritance, but Authenteo provides a more robust technique for
inheritance. Java and JavaScript use simple Single-Entity Inheritance
which means that when an entity 1 inherits from entity 2 and entity 2
has a reference A to another entity 3, entity 1 will inherit the
reference A to entity 3, but entity 3 will be treated the same whether
referred to by entity 1 or entity 2. However with Structural Model
Inheritance, the entire data structure is inherited. Therefore when
accesses the A reference of entity it will not return the original
entity 3 that entity 2 refers to, but a version of entity 3 which
inherits from the original entity 3. Therefore, if entity 3 has a
field B, a modification can be made to the B field of A field of entity
1 without modifying the original entity 3 and hence possibly altering
the nature of entity 2.
|
Language |
Inheriter |
Is a kind of/ Inherits from: |
Inheritee |
Depth of inheritance |
|
Java |
Sub Class |
Inherits methods and fields from: |
Super Class |
Single Entity |
|
JavaScript |
Instance |
Inherits functions, fields, and values from: |
Prototype (accessed by .constructor.prototype) |
Single Entity |
|
Authenteo |
Version |
Inherits functions, fields, and values from: |
Basis |
Entire structural hierarchy |
Authenteo 1.1 is available.
Now with
Firebug integration
. Make changes to CSS and HTML with Firebug and save the changes
Check out press releases and the following articles on Authenteo: