Each plugin must be placed as subdirectory in the plugin directory. The name of the plugin must carefully be chosen, it is also used for dynamic page forwarding etc.
Each plugin directory must have a 'i18n
' subdirectory which on its
turn must contain a 'dictionary_en.php
' file.
More on handling of i18n later.
Each plugin must have a 'configuration
' subdirectory which contains the configuration
hookup file which determines how the plugin is used in the framework
Brim is based on a MVC design pattern. The controller handles all communication between the view (i.e. the webpages) and the model (a generic layer that knows about the objects being handled and how to communicate with the database)
Typically all view related files are located in the plugins 'view
' subdirectory, all model related files are located in the 'model
' subdirectory.
Some more conventions:
a directory sql
contains database related code (typically the file with sql code that can be executed if the installation script doesn't work as well as the file that contains the database queries which are used by the model)
Test files (not the unit-test scripts!!!) go into the 'myplugin/test
' subdirectory, documentation in the 'doc
' directory and utility files in the 'util
' directory.
Unit tests go into a test subdirectory of the files that you want to test.
This might lead to the following structure/files