Coding Conventions

From Devblocks Platform Wiki
Jump to: navigation, search

Contents

Environment

  • E_STRICT

Layers

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

File/Directory Structure

  • (more)

Plugins

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

Naming Conventions

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

DAO

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

PHP GET/POST/REQUEST

  • DevblocksPlatform::importGpc()
  • (more)

Database

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

Ajax

  • genericAjaxGet/Post
  • (more)
Personal tools