Dynamic | specification | Web page one, directory structure
The naming rules for directory structures are in English letters or phonetic abbreviations as directory names. Specify a Readme.doc Word file in each directory, stating the file under the directory, including file name, main description or purpose, modifier and time of modification.
1. The first layer discharge system Management directory, source directory, document directory, SQL script directory, public resource directory, source program backup directory, the source program directory to store dynamic script and homepage page, document directory to store project related documents, SQL script directory to store the project related SQL script, Public Resource directory to store the project-related PSD files, animation files of the public resources, the directory named:
System Management Directory: 00_system
SOURCE program Directory: 01_source
▲ Static Web page
▲ Dynamic Scripts
Common Script directory: 01_public
Graphics Catalog: 02_img
Subsystem Directory 1:03_XXXX
Subsystem Directory 2:04_XXXX
.
.
.
Document Catalog: 02_document
SQL Script directory: 03_sql
Common Resources directory: 04_resource
▲PSD file directory: 05_PSD
▲flash Animation Files directory: 02_fla
SOURCE program Backup directory: 05_bak
2. System Management Directory Storage System maintenance program source code and target codes;
3. The document directory (02_document) must contain the design of the site, research reports, the detailed design of dynamic Web pages, installation instructions, system maintenance program usage instructions, Web document organization description and related information, etc.
4. SOURCE program Backup directory: The source program directory structure to store the files that need to be backed up.
5. SOURCE program directory (01_source) directory structure divided into two large parts, static Web pages and dynamic pages stored separately, dynamic scripts as little as possible directly embedded in static Web pages, if necessary, as a function of the form of the organization of the script, in the static Web page to select the insertion point called the function. The static part of a dynamic web script can be stored in the form of an HTML file and included in a dynamic script.
6. Public script directory (01_public) some common scripting source code that holds dynamic scripts, such as connection database scripts, custom public functions, CSS files, and common JavaScript scripts. Each subsystem directory name is named in phonetic form.
7. Backup files: Transfer to the backup directory information such as dates that may be used in the comments in the future.
8. Delete useless documents in time;
9. Web page File organization Description: The organizational structure of the Web site file relationship.
II. Specification of documents
1. Common scripts create script files based on functional use, to prevent script files from being too large to affect the parsing speed of scripts, and to control the file size of scripts.
2. The headers in the script and the program headers of the custom functions, procedures, and so on are used to create comments that refer to the specifications of the appendix, including the purpose of the code, incoming parameters, outgoing parameters, and record changes.
3. Control names for HTML in dynamic scripts use the full name + control meaning of the space type.
4. The name of the variable is referenced in the Appendix specification.
5. The name of the function is referenced in the Appendix specification.
6. The script statement format space is 3 squares.
7. Applies a space around the operator symbol or = to differentiate the operation symbol or = from the variable or expression. For example: $STRTMP = $Text + $strTmp. except when writing links;
8. Enter the year, month, and date as the Drop-down box selection method.
9. The annotations in the script are specific to different development tools.
Appendix: Programming Specification
The overall page annotation for each page must be available, as shown in the following example:
// =================================================================
Code Description: Get query data from database, paging display
//
Entry parameters: None
//
Return Result: Query data
//
Modify Record: Name date content
//
// =================================================================
function
▲ Definition of Function name:
¨ global function: G_f_ + function name (meaning in English, if more words are separated by ' _ ', the first letter of each word should be capitalized).
¨ external function (Extend function): follows the original name.
¨ form function (Window function): W_f_ + function name (meaning in English, if more words are separated by ' _ ', the first letter of each word should be capitalized).
▲ parametric definition, follow script localized variable definition requirements.
Script
▲ Variable definition:
¨ global variable (global Variables): The first letter of the G_ + variable type (such as: string s) + variable name (meaning in English, if more words are separated by ' _ ', the first letter of each word should be capitalized).
¨ instance variable (Instance Variables): The first letter of the I_ + variable type (for example: String type s) + variable name (meaning in English, if more words are separated by ' _ ', the first letter of each word should be capitalized).
¨ Local Variables: Variable type (abbreviated) + variable name (use English to express meaning, if there are many words not ' _ ' separated, but the first letter of each word should be capitalized). For example: String type strtmp, Integer type Introwno.
▲ reserved words and SQL reserved words should be in the original writing method, the first letter capital principle (such as: if ...). Else .... End If).
▲ All embedded ASP scripts are all on the left side, with a blank line between the script and the embedded character.
HTML code HTML code HTML <% code HTML code
' Empty line
ASP statements ...
If Condition Then
ASP statements ...
End If
ASP statements ...
' Empty line
HTML code HTML code HTML code HTML code%>
▲ The program body of all conditional statements and circular statements should be indented.
▲ The last statement is not finished, with ' & ' continuation of the partial indentation.
▲ through the TAB key indentation, to eliminate the use of space indentation, so as to avoid in the tab number of different environment indentation disorder.
▲ Use a space around the operator symbol or = to differentiate the operation symbol or = from a variable or an expression. For example: strtmp = Edit_1.text + strtmp.
▲ in, add space after. For example: SELECT department_no, Department_name from .....
▲ comment on script statements, processes, functions, and classes to illustrate the function of the statement or process implementation.
Rest
▲ Follow the directory storage structure of program files.
▲ do not write triggers on the database side to automatically insert the sequence number, you can write code in the program script (try to save the event instead of the new event).
▲ all database views, processes, functions, etc. should be formed. SQL file, file name is the name of the object itself, such as rs_v_.../sb_p_.../yx_f_ ... Wait Attached views that are not used separately can be placed in the main view. SQL file.
▲ the trigger and serial number can be combined in the same. SQL statement to trigger the name of the child.
▲ The authorization of all databases should form a file in each subsystem named Grant.sql.
This specification is a trial specification, in accordance with the process, if the comments can be submitted to the project manager, for a small scope of the violation of the project manager may be approved in accordance with the actual situation, large-scale changes to the company, the company agreed to implement.
For the revision of the trial version, the company will notify the project team at the fastest speed.