The Gravy Framework

Class OObject

Direct Known Subclasses:
Map, Mutex, Transaction, Balance, Decode, Observer, Command, View, Account, Context

class OObject

the "abstract base class" OObject has no code, only a design pattern followed by convention; Two utility functions (Class,Extends) replace the "constructor" Javascript function with a wrapper function and also set up a proper inheritence mechanism; This mechanism allows the pretty source whereby "methods" are declared inline in the Javascript function, but the source code of those methods are not copied into every object instance as would otherwise be the case with simple Javascript;

The wrapper function also sets up the "constructor" to use GLOBALS.ValidateArgs() to insure that the required parameters are passed to the constructor and throw an exception if not.

The design pattern implemented by Class/Extends corrects several problems that occur with naive Class/Superclass mechanisms often used with Javascript;

  The required "interface" for "OObject":
  (1) the Object has its "class" declared via the utility
      function GLOBALS.Class()
  (2) the "superclass" (if any) is declared via the
      utility function GLOBALS.Extends()
  (3) the "constructor" logic for the class is placed
      in a "method" named "konstructor"
  (4) the konstructor method invokes the "super" constructor
      via its class name [rather than super()]

See:Defined in utils.js

Author: Bruce Wallace (
Version: 1.0

Constructor Summary
OObject ()

Constructor Detail



The Gravy Framework

Documentation generated by JSDoc on Fri Mar 17 06:40:21 2006