Anatomy of a Package

Created by: spiderr, Last modification: 06 May 2009 (19:07 UTC) by Daniel Sutcliffe
The following files make up a bitweaver package. Your packages is free to do and act however it pleases. However, the following files are standardized and the core packages may look for these files in your packages.
Anatomy of a bitweaver Package
File Description
pkg/bit_setup_inc.phpThis is the only file required for a package. It registers information about the package during initial setup.
If your package has any database information, the information is defined in this file. It will be scanned during install, and a few administration pages
Administration page for the package, picked up by kernel/admin/index.php?page=pkg.
pkg/admin/upgrades/This directory contains files named with the form version.php that describe package versions and any code needed to upgrade data and tables when that version upgrade occurs.
pkg/modules/This directory contains the interfaces blocks that can be arranged in various layouts
pkg/templates/This directory contains the Smarty templates for the package pages
Administration template for the package, picked up by kernel/admin/index.php?page=pkg.
template for the package administration menu.
template for the package menu. Usually specified in pkg/bit_setup_inc.php.

The filenames specified in grey are my thoughts are what the file names could be migrated to with the aim of improving consistency and ease of understanding. The ideas being; that there is no point in package name repetition/redundancy in the file names and it is already discouraged in the CodingGuidelines, and that introducing a prefix of 'bit_' to files that are loaded just because of their names and location in a package would help indicate them as such files.