System supporting object-oriented constructs in ECMAScript
OwnerScott Shattuck, William J. Edney +1inventors
InventorsScott Shattuck, William J. Edney, James A. Bowery
Life of this patent
Estimating the term…
Loading patent…
OwnerScott Shattuck, William J. Edney +1inventors
InventorsScott Shattuck, William J. Edney, James A. Bowery
Estimating the term…
An internally consistent system implementing object-oriented programming constructs in ECMAScript is described. First, a function, rather than the ECMAScript new keyword, is used to initiate new instance creation. The instance creation function is assigned to a non-Function instance rather than an instance of Function as required for use of new. Instances with attached instance creation functions serve as “type proxy” objects and replace the Function instances normally used as types. Since the type proxies and prototype chains created and maintained by the invention are instances of normal objects, rather than instances of Function as required by standard ECMAScript, this approach allows native ECMAScript lookup semantics to be leveraged while supporting inheritance of both state and behavior for instances and types to any level desired. A set of functions known herein as property-definition functions are used by type proxies to assign properties as global, local, instance, or type properties rather than the standard ECMAScript approach of direct assignment. Where constraints exist such as “read-only”, “private”, etc. the physical storage of the property may be located away from the target object in a separate storage structure. Method definitions further place a “backstop” method on Object.prototype. Invocation of the backstop triggers a callback to the non-implementing receiver followed by a scan of guardians for multiple inheritance, followed by dynamic type conversion and method creation. The result is a highly enhanced system of polymorphic behavior.
A method for implementing type inheritance in ECMAScript consisting of type proxies which are instances of types other than Function where said type proxies are used to represent types rather than instances of Function and respond to an instance creation function rather than the “new” keyword for instance creation.
The use of instance-specific “local” programming to migrate behavior and state from ancestors directly onto a target instance to optimize lookup efficiency.
A method for controlling property creation and access in ECMAScript consisting of a function or functions known as a property-definition functions whose operation includes invocation of a method on incoming properties and assignment of the return value of said method as the property value.
The use of a function whose operation consists of dynamically generating a function which through creation of a closure binds a function to an object for purposes of ensuring internal “this” references on the function so bound reference said object regardless of the eventual calling context.
The use of a function to add function properties to a target object where said function's operation includes placing a function or other placeholder at the root of the method lookup chain to trap attempted invocation of the original function from types which do not implement it.
A method for inferring message solutions based on reflection data where such method includes determining a set of possible type conversions which result in conversion of the original message receiver into a type which can respond properly to the original method.
A method for capturing reflection data in ECMAScript consisting of functions part of whose operation includes capturing ownership of each attribute, method, constant or other property where ownership is defined by a unique object identifier.
Dependencies are inferred from the claim text.