Code¶
RPInventory is written entirely in PHP using MySQL as the database back end.
To separate business logic from presentation logic, we use the Smarty Template Engine. This engine allows us to create "template" files that describe the layout of each page separate from the PHP files that retrieve the data.
RPInventory also uses the Prototype and jQuery JavaScript frameworks/libraries for dynamic content (AJAX)
Our code is version-controlled by git. To get a copy of our source, first install git. Then clone from our git repository with:git clone git://rpinventory.com/rpinventory.git
Coding Standard¶
- Opening brackets on the same line: while(foo) {
- Use two spaces for indentation
- camelCaseVariableNames
- CamelCaseFunctionNames - note the initial capital
- Use descriptive variable names
- NO global variables
- Comment your code with descriptive comments