Exhibition-Workflow
Links
Workflow
We use the module "Users" as example
- Create a metadata description: lib/meta/users_meta.dart
import 'module_meta_data.dart';
class UserMeta extends ModuleMetaData {
static UserMeta instance = UserMeta.internal();
UserMeta.internal() : super('Users',
[
PropertyMetaData('id', DataType.reference, ':primary:', 'combo'),
PropertyMetaData('name', DataType.string, ':notnull:', '', size: 64),
PropertyMetaData('displayName', DataType.string, ':unique:notnull:', '', size: 32),
PropertyMetaData('email', DataType.string, ':unique:notnull:', '', size: 255),
PropertyMetaData('role', DataType.reference, ':notnull:', ''),
PropertyMetaData('created', DataType.datetime, '', ''),
PropertyMetaData('createdBy', DataType.string, '', '', size: 32),
PropertyMetaData('changed', DataType.datetime, '', ''),
PropertyMetaData('changedBy', DataType.string, '', '', size: 32),
],
tableName: 'loginusers',
);
factory UserMeta(){
return instance;
}
}
- Create some source files: (for example: the module "Users")
# precondition: the current directory is the base folder of the dev-app.
mkdir -p lib/meta/users
# The following call works without meta data. It works without recreation of the tool:
./Meta show-modules Users >lib/meta/modules.dart
# Now we need a new instance of the meta_tool (to realize the meta data changes):
./ReCreateMetaTool
./Meta show-data >lib/page/users/user_data.dar
# Show the SQL definition:
./Meta show-table Users
- Create all source files:
# precondition: the current directory is the base folder of the dev-app.
# The following call works without meta data. It works without recreation of the tool:
./Meta update-modules-names
# Now we need a new instance of the ./Meta (to realize the meta data changes):
./ReCreateMetaTool
./Meta update-modules-files
./Meta update-sql
Important Locations
- Application menu page: lib/setting/drawer_xxx.dart: Definition route + Icon
- Starting route: lib/page/start_page.dart: globalData.navigate(context, '/Users/list');
Typical Adaptions
- all *_custom.dart:
- buildFrame(): formular elements (widgets)
- build(): "rows = attendedPage.getRows(...)": column list, column adaptions (onColumnOfRecord)
- requestRecords(): parameters of the database query
- list_user_custom.dart:
- buildFrame(): table headers