|
|
(2 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
| | {{Obsolete}} |
| | <center> |
| | {| border="1" |
| | |- |
| | !colspan="3" | [[Dark Brotherhood]] Coding Standards |
| | |- |
| | |align="center" colspan="3" | [[Coding Standards and Practices]] |
| | |- |
| | | [[ASP Coding Standards]] |
| | | [[CSS Coding Standards]] |
| | | [[Database Standards]] |
| | |- |
| | | [[HTML Coding Standards]] |
| | | [[JavaScript Coding Standards]] |
| | | [[PHP Coding Standards]] |
|
| |
|
| <center>
| | |}</center> |
| <table border="1">
| |
| <tr><th colspan="3"> [[Dark Brotherhood]] Coding Standards
| |
| </th></tr>
| |
| <tr><td colspan="3" align="center"> [[Coding Standards and Practices]]
| |
| </td></tr>
| |
| <tr>
| |
| <td> [[ASP Coding Standards]]
| |
| </td>
| |
| <td> [[CSS Coding Standards]]
| |
| </td>
| |
| <td> [[Database Standards]]
| |
| </td>
| |
| </tr>
| |
| <tr>
| |
| <td> [[HTML Coding Standards]]
| |
| </td>
| |
| <td> [[JavaScript Coding Standards]]
| |
| </td>
| |
| <td> [[PHP Coding Standards]]
| |
| </td>
| |
| </tr>
| |
| </table>
| |
| </center> | |
|
| |
|
| == Variable Declaration, Naming and Type Notation == | | == Variable Declaration, Naming and Type Notation == |
Line 39: |
Line 31: |
|
| |
|
|
| |
|
| <table border="1">
| | {| border="1" |
| <tr>
| | |- |
| <th>Type </th>
| | !Type |
| <th> Prefix </th>
| | |
| <th> Example
| | ! Prefix |
| </th>
| | |
| </tr>
| | ! Example |
| <tr>
| | |- |
| <td>[http://en.wikipedia.org/wiki/String_(computer_science) String] </td>
| | |[http://en.wikipedia.org/wiki/String_(computer_science) String] |
| <td> str </td>
| | | str |
| <td> strName
| | | strName |
| </td>
| | |- |
| </tr>
| | |[http://en.wikipedia.org/wiki/Integer Integer] |
| <tr>
| | | Int |
| <td>[http://en.wikipedia.org/wiki/Integer Integer] </td>
| | | intUserId |
| <td> Int </td>
| | |- |
| <td> intUserId
| | |Double, [http://en.wikipedia.org/wiki/Floating-point Float] |
| </td>
| | | dbl |
| </tr>
| | | dblDollarValue |
| <tr>
| | |- |
| <td>Double, [http://en.wikipedia.org/wiki/Floating-point Float] </td>
| | |[http://en.wikipedia.org/wiki/Boolean_data_type Boolean] |
| <td> dbl </td>
| | | bln |
| <td> dblDollarValue
| | | blnIsBlank |
| </td>
| | |- |
| </tr>
| | |[http://en.wikipedia.org/wiki/Recordset Recordset] |
| <tr>
| | | rs |
| <td>[http://en.wikipedia.org/wiki/Boolean_data_type Boolean] </td>
| | | rsMembers |
| <td> bln </td>
| | |
| <td> blnIsBlank
| | |} |
| </td>
| |
| </tr>
| |
| <tr>
| |
| <td>[http://en.wikipedia.org/wiki/Recordset Recordset] </td>
| |
| <td> rs </td>
| |
| <td> rsMembers
| |
| </td>
| |
| </tr>
| |
| </table>
| |
| ;RULE | | ;RULE |
| :Use the Hungarian notation for [http://en.wikipedia.org/wiki/Form_(web) form] fields to make forms clearer | | :Use the Hungarian notation for [http://en.wikipedia.org/wiki/Form_(web) form] fields to make forms clearer |
Line 84: |
Line 67: |
|
| |
|
|
| |
|
| <table border="1">
| | {| border="1" |
| <tr>
| | |- |
| <th> Form Component </th>
| | ! Form Component |
| <th> Prefix
| | |
| </th>
| | ! Prefix |
| </tr>
| | |- |
| <tr>
| | |[http://en.wikipedia.org/wiki/Text_box Input Box] |
| <td>[http://en.wikipedia.org/wiki/Text_box Input Box] </td>
| | | txtUserName |
| <td> txtUserName
| | |- |
| </td>
| | |[http://en.wikipedia.org/wiki/Check_box Check Box] |
| </tr>
| | | chkOrder |
| <tr>
| | |- |
| <td>[http://en.wikipedia.org/wiki/Check_box Check Box] </td>
| | |[http://en.wikipedia.org/wiki/Button_(computing) Button] |
| <td> chkOrder
| | | btnSubmit |
| </td>
| | |- |
| </tr>
| | |Hidden Field |
| <tr>
| | | hdnUserId |
| <td>[http://en.wikipedia.org/wiki/Button_(computing) Button] </td>
| | |
| <td> btnSubmit
| | |} |
| </td>
| |
| </tr>
| |
| <tr>
| |
| <td>Hidden Field </td>
| |
| <td> hdnUserId
| |
| </td>
| |
| </tr>
| |
| </table>
| |
| ;RULE | | ;RULE |
| :Use all uppercase when declaring a [http://en.wikipedia.org/wiki/Constant_%28programming%29 const] variable | | :Use all uppercase when declaring a [http://en.wikipedia.org/wiki/Constant_%28programming%29 const] variable |
Line 126: |
Line 101: |
|
| |
|
|
| |
|
| <table border="1">
| | {| border="1" |
| <tr>
| | |- |
| <th> Good </th>
| | ! Good |
| <th> Bad
| | |
| </th>
| | ! Bad |
| </tr>
| | |- |
| <tr>
| | |strUserName |
| <td>strUserName </td>
| | | N |
| <td> N
| | |- |
| </td>
| | |intUserId |
| </tr>
| | | uid |
| <tr>
| | |
| <td>intUserId </td>
| | |} |
| <td> uid
| |
| </td>
| |
| </tr>
| |
| </table>
| |
| == Code Documentation == | | == Code Documentation == |
|
| |
|
Line 224: |
Line 195: |
|
| |
|
| == Common Names and Customs == | | == Common Names and Customs == |
| [[Category:DJB Info]] [[Category:Coding Standards]]
| | [[Category:Coding Standards]] |