Coding Practices

The following list summaries the coding standards observed during the development of Commerce Server Business Desk.

  • Follow Hungarian naming conventions for variables.

  • Follow file naming conventions.

  • Provide clear and complete comments in the code.

  • Keep use of included files to a minimum.

  • Validate all HTML using an HTML validation tool.

  • Make sure all HTML element IDs are unique and are all in lowercase.

  • Establish some common page characteristics by including the file BDHeader.asp.

  • Specify "Option explicit" at the beginning of each client script block.

  • Use "Request.Querystring" and "Request.Form", as appropriate.

  • Specify ByRef and ByVal explicitly in VBScript function definitions.

  • Keep the number of queries per page to a minimum.

  • Use symbolic constants for clarity.

  • Specify the scripting language per page (ASP) and per element (DHTML).

  • Capitalize all HTML element names and attributes, and all constant names.

  • Use lowercase or mixed case for scripting code.

  • Use a main function for each page to keep use of page globals and script executed inline to a minimum.


All rights reserved.