[thelist] coding standards

Cory Preus cory_preus at cnt.com
Tue Mar 13 14:39:15 CST 2001


> I may not be understanding exactly what you're looking for -- but have you
> tried W3's site for outlining these standards?  http://www.w3.org/

Primarily, I'm looking for suggestions for defining what stylistic
conventions to use. For instance, Jay's suggested resource
http://www.phpbuilder.com/columns/tim20010101.php3 fits the bill and in ASP
(my little kludge for now) of how to name variables, where to declare them,
indentation, garbage collection, etc.

i.e. variables preceded by three chars denoting how it is cast
	int, str, obj, etc.

And a basic template:

<%@ Language=VBScript %>

<%
' 
  Option Explicit
  %> <!-- #include virtual = "adovbs.inc" --> <%

' Define Variables
  Dim strName, strTitle, intSalary, objRS, objConn

' Assign Database Connection
  objConn = Stuff
  objConn.Open

' Assign Requested Variables
  strName = Request.Form("frmName")
  strTitle = Request.Form("frmTitle")
  intSalary = Request.FOrm("frmSalary")

' Main
  ... 

' Functions
  ...

' Nuke the variables
  set objRS = nothing
  objConn.Close
  set objCOnn = nothing
%>




More information about the thelist mailing list