Coding Conventions

From Devblocks Platform Wiki

Jump to: navigation, search

Contents

[edit] Environment

  • E_STRICT

[edit] Layers

  • Application, Platform (more)
  • (API, DAO, Extension, Model, etc.) (more)

[edit] File/Directory Structure

  • (more)

[edit] Plugins

  • core plugin
  • api
  • template paths
  • resources (Devblocks proxy)
  • (more)

[edit] Naming Conventions

  • java-esque (more)
  • class naming
  • variable naming
  • plugin naming
  • extension point naming

[edit] DAO

  • statics
  • CRUD
  • searchDAO
  • delete cleanup foreign keys
  • getOne, getList (sharing code)
  • (more)

[edit] PHP GET/POST/REQUEST

  • DevblocksPlatform::importGpc()
  • (more)

[edit] Database

  • sprintf
  • $db->qstr()
  • or die(__CLASS__ . ':' . $db->ErrorMsg());
  • (more)

[edit] Ajax

  • genericAjaxGet/Post
  • (more)