-
Notifications
You must be signed in to change notification settings - Fork 2
The Meta Model
Johan Filipsson edited this page Mar 31, 2021
·
15 revisions
The meta model is built up from a few classes used to describes different kind of objects, such as database objects or GUI components. Three properties is common for all classes
- MetaType = Describes what kind of meta object this is.
- MetaCode = Identifies one meta object, unique within an application
- ParentMetaCode = Can be either ROOT if the object is on the application level or pointing to another MetaCode if the meta object is a child of anoter object.
- Used to describe applications
- Example
new ApplicationItem() { Id = 1, Description = "An app for managing customers", MetaCode = "CUSTOMER", Title "Customer", DbName = "Customer" }
- Used to describe database tables and columns used in one application
- Example
new DatabaseItem() { AppMetaCode = "CUSTOMER", MetaType = "DATAVALUE", MetaCode = "CUSTOMERID", DbName = "CustomerId", ParentMetaCode = "ROOT", DataType = "STRING", Mandatory = true }
Valid MetaTypes
- DATACOLUMN
- DATATABLE
Valid DataTypes
- STRING
- TEXT
- INTEGER
- BOOLEAN
- 1DECIMAL
- 2DECIMAL
- 3DECIMAL
Note: DATATABLE is used for applications with sub tables, for example in the Order, Order Line pattern
, where the Order Line table should be defined as a sub table. There's no need to define the Order table as a DATATABLE since one main table is always created for every application.
- Used to describe UI in applications
- Example: Create an emailbox in the Customer application
client.InsertEntity(new UserInterfaceItem() { AppMetaCode = "CUSTOMER", MetaType = "EMAILBOX", MetaCode = "TBCUSTMAIL", DataColumn1MetaCode = "CUSTOMEREMAIL", Title = "Email", TitleLocalizationKey = "CUSTOMEREMAIL", ParentMetaCode = "CUSTPNL2", RowOrder = 1, ColumnOrder = 2 });
Valid MetaTypes
- PANEL
- TEXTBOX
- EMAILBOX
- NUMBOX
- TEXTAREA
- COMBOBOX
- DATEPICKER
- CHECKBOX
- LOOKUP
- IMAGEBOX
- IMAGE
- LABEL
- TEXTBLOCK
- STATICHTML
- SEARCHBOX
Note the attribute DataColumn1MetaCode which connects the UI component to a DatabaseItem