General

  1. All objects are grouped in classes
    1. Every object can be identified using class name and id
  2. Each class has corresponding table in database
  3. Class consists of
    1. Fields
    2. Methods
    3. Events
  4. All fields are described in metadictinary
    1. type
    2. default place on the generic form
    3. parameters for generic form
  5. All methods are described in metadictinary
    1. parameters
    2. type (change|select)
    3. code (C|JavaScript)
  6. Methods can be defined using C or JavaScript (script methods)
    1. Methods are inherited from parents
  7. All events are described in metadictinary
    1. Events can be on_userAction or on_methodCall
    2. Events on_methodCall can be before or after, pe: on_before_update
    3. Events can be handled ONLY by scripts
  8. Root class is Generic
    1. Object methods of Generic class:
      1. get - returns one object (type select)
      2. update - updates one object (type change)
      3. delete - soft deletes one object (type change)
      4. undelete (type change)
      5. purge - permanent delete (type change)
      6. getRelatedTableData -- returns all data related to this objects for given relation
    2. Group methods of Generic class:
      1. select - returns Recordset of objects (type select)
    3. Class methods of Generic class:
      1. getSchema -- returns schema or meta definisions for this class (type select)
      2. getRelatedTables -- returns names and foreign_column_names of related tables
    4. Genric class fields:
      1. id
      2. deleted -- 1 for deleted 0 for not deleted
      3. version -- current object version number, used for conflict detection during updates

Layers of the system:

W1 -- client layer (DOM+HTML)

W2 -- application server layer (Apache + shared objects)

W3 -- database (PostgreSQL)

Rules regarding W1:

  1. Generaly code is compatible with DOM2 (this is the goal) and is preliminarly tested on Mozilla
  2. All clients have to implement these Protocol methods:
    1. show_error(string)
    2. co_refresh(recordSet)
    3. co_delete(recordSet)
    4. co_insert(recordSet)
  3. recordSet is Object created this way:
    var o=new Object(); var o.class_name="class_name"; var