Coding Standards Overview

From BOARD18 Project WIKI
Jump to navigation Jump to search
Coding Standards Index edit

A general description of the usage style of the tools used to create BOARD18 is presented here.

JavaScript Coding Style

JavaScript is a scripting language that allows for procedural, object-oriented, and functional programming styles. BOARD18 is almost exclusivly coded using procedural JavaScript. This is mainly due to historical reasons. First, before ECMAScript 6 came out in 2015 JavaScript leaned toward being a procedural language. But, more importantly, when I started writing BOARD18, I was a crusty old semi-retired programmer who had no use for any new fangled fads like OOP.

That being said, BOARD18 does use 10 special purpose JavaScript objects. They are listed here.

The jQuery Library

BOARD18 uses the jQuery library extensively to format its pages. BOARD18 does not use any of the modern "frameworks" that have become popular lately.

PHP Coding Style

Before PHP5, PHP was a procedural scripting language. And that is how BOARD18 uses it for the most part. Lately a few class statements have made their way into some functions. They are mostly used to build structures that can be stringified using json_encode() and echoed back to the client as strings.

The mysqli Extension

BOARD18 uses the mysqli extension of PHP to access its database. The mysqli extension features a dual interface. It supports both procedural and object-oriented interfaces. BOARD18 uses the procedural mysqli interface.