The Gravey Framework and RATS RIA

Class GrvObject

Direct Known Subclasses:
MVCContext, Account, MVCDecode, Transaction, MVCMutex, MVCEditRule, MVCObserver, MVCMap, MVCView, Balance, MVCCommand

class GrvObject

This is the root class for all "classes" implemented via the GLOBALS.Class() function (ala Java "Object"). Class replaces the normal Javascript "constructor" function with a new wrapper function that implements a robust inheritence mechanism. This mechanism supports "pretty" source code whereby "methods" are declared inline, but the source code of those methods are not copied into every object instance as would otherwise be the case.

The wrapper function also sets up a real "constructor" that can use GLOBALS.grvValidateArgs() to insure that the required parameters are passed to it, throwing an exception if not.

The design pattern implemented by Class/Extends corrects several problems that occur with the naive inheritence mechanisms often used with Javascript.

  The required coding convention for "GrvObject":
  (1) the "class" is declared via the utility
      function GLOBALS.Class()
  (2) the "superclass" (if any) is declared via the
      .Extends method GLOBALS.grvExtends()
  (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 literally "super()"]

Version: 2.0

Author: Bruce Wallace (
See:Defined in grvClass.js

Constructor Summary
GrvObject ()
Method Summary
 Object souper()
           Invokes the "super" version of whatever method that is calling souper.

Constructor Detail



Method Detail


Object souper()

The Gravey Framework and RATS RIA

Documentation generated by JSDoc on Sat Dec 8 21:52:02 2007