Developers/Concepts/DataTypeDefinitions

From Tine 2.0 - Wiki

< Developers
STATUS: DRAFT
DATE: 2011/09/05

Data Type Definitions

Goal

A Data Type Definition (DTD) to be used on Server and Client side. Clients should be able to retrieve a DTD from the server to "understand" the data structures used in the APIs.

The DTD must contain the 'Data Type Definition' itself and should contain validation Information for. It also could contain descriptive Information like label, and description and may also have uiconfig to help the client to auto create interfaces.

Supported Date Types

Data types are evaluated lowercase


  • string
  • int
  • integer synonym of int
  • bool
  • boolean synonym of bool
  • float
  • dateTime
  • date
  • time
  • array numbered collection with entries of same data type.
    • options
      • type recursive?
  • object named property -> value map
  • record single record of given model
    • options
      • recordModel
  • recordSet set of records of same model
    • options
      • recordModel
  • keyField string id of a keyField defined by a keyFieldConfig
    • options
      • recordModel


Discussion:

  1. do we need the "options" namespace
  2. shall the recordModel be part of the "options" namespace or be separate
  3. do we need the types record/recordSet/keyField ... or are this all objects of some class?
  4. How to reference a recordModel? "Tine.Admin.Model.Group" is very javascript specific, where Admin_Model_Group is PHP centric. Maybe: appName = Admin, modelName = Group?