Notes on development standards

Drupal coding standards for syntax and documentation; Coder module standards. Patches must pass Coder.*

Using proper file includes in the menu system: pages.inc, admin.inc, theme.inc

Standardize on CCK module structure / subdirectories: includes, theme (include templates and CSS), help (Advanced Help files), tests

Using more drupal_alter() stuff.

Name functions: [module] object verb.

SimpleTest - everything should be SimpleTested; embrace test-driven development. Bug fixes come w/ a test. Before a feature is ever committed, it comes with a test. Unit testing for the core APIs.

Dependencies and supported modules - Core fields API, Views, see how ctools (possible dependency) and Panels (possible supporter) develop.

Proper usage of the Forms API; use an internal module API!

If it contains HTML, it must be in a theme function. The style attribute is not allowed. Use module based template files more regularly as the amount of HTML increases. Where and how should we use theme functions?

Should there be a separation between Ubercore and Ubercore UI? UI division between configuration and store management?

Should Ubercart have its own variable storage system?

No more settings to change text messages on things.

Permissions: use more. It's probably better to have too many that not enough.

*: Except for false positives, which still happen sometimes.

Ryan Szrama
Posted: Oct 15, 2009


jody on October 15, 2009

Development Standards
Simpletests / test-driven development / Hudson or testbot
bug fixes come with tests
Drupal coding standards, use of coder
Use of menu includes
module_object_verb function names
Use of API behind things like submit handlers
Theme functions out of .module files, use of tpls by default
Performance: node_load_multiple, statics in uc_order_load etc
Directory structure
follow cck pattern (includes, help, tests, theme etc.)