Graphical design component

r2 - 01 Apr 2007 - 14:51:53 - TimSuttonYou are here: TWiki >  Geospatial Web > GeoAppInter > CodingConventions

Basics


/** @defgroup Foo    // or @ingroup Foo  
  * This is a foo class  */
class FooBar {

   private var $fooVar;
   private var $barVar;
   
   /** This is a foo function.
    * @returns a bar object.
    */
   function FooBar ( $_fooVar, $_barVar ) {
      $var = "foo";
   }
}

This would be saved to a file based on the class name FooBar?.php

Documenting

We are using doxygen to document all code. We require only the class description and 'ingroup' tags as mandatory, other in class docs are optional. If you refer to another class in the /** */ comments doxygen will hyperlink so make sure to spell correctly.

Paging

To avoid dealing with paging we will limit all search results to 500

Naming

  • Name class names with CamelCase?, leading capital letter.
  • Name class files with ClassName?.php
  • Name functions with fooFunction (camel case, leading lower case letter)

-- TimSutton - 31 Mar 2007

Edit | Attach | Printable | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
 
Back to TDWG Homepage TDWG Wiki > Geospatial
This site is powered by the TWiki collaboration platform

Valid XHTML 1.0 Transitional
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback