Saturday, February 20, 2010

Cubi metadata naming convention

Before Cubi, Openbiz developers can name their metadata with any name. For example, an user list form can be named as
  • FM_UserList.xml
  • f_userlist.xml
In Cubi, metadata name follows the syntax as "NameType". For the user list form, Cubi will use
  • UserListForm.xml
The advantage of this name besides its clarity is that its custom form class can have the same name. To define a custom class, you just need to set
in the UserListForm.xml
Then add UserListForm.php in the same directory.

Sample metadata names from Cubi/modules/system directory
For DataObject metadata
/do/UserDO.xml
/do/RoleDO.xml

For Form metadata
/form/UserListForm.xml
/form/UserEditForm.xml
/form/UserNewForm.xml

For View metadata
/view/UserListView.xml
/view/UserEditView.xml
/view/UserNewView.xml

No comments:

Post a Comment