ASP application design skills

Source: Internet
Author: User

1. Web application directory and file structure
The maximum purpose of directory classification storage is to facilitate the management of various file types in Web Applications
A. Start file of the virtual root directory (.htm).html or. asp) and Global. ASA (must be placed in the virtual root directory)
B. content directory
C. header file directory
D. multimedia file directory
E. component directory
F. Data Directory

2. asp file design practices
A. Transfer the HTTP header to add the header information to the ASP file. If no, IIS will automatically add this header information, which will consume additional processing time on the server.
B. Do not mix HTML with ASP script
C. @ the leading command to create an ASP page using DW will automatically add the @ leading command, including the code and language
D. Introduction file of ASP (include file)
E. Option explicit can save some trouble and help with program execution efficiency.
F. writing ASP programming is not only about writing program code that can be executed or executed with excellent efficiency, but also about communication between programs or personnel during team collaboration, and the costs required for future maintenance procedures.
I. Let the program code be concentrated within the region
Ii. Define the programs required for the ASP file. It is recommended to place all the programs (including functions and sub) used in the ASP file in a centralized manner. It is best to put the program at the end or at the beginning of the ASP file.

3. Tips for executing IIS and designing ASP programs
A. Before the average allocation, the back-end program should execute the load and the front-end should allocate work to each other. The work that can be executed by the front-end should not increase the burden on the back-end.
B. Select variable types-local variables in almost any programming language are more efficient than global variables.
C. Make good use of Variables
D. <Object> and server. the maximum difference between the application time of Createobject: <Object> only "Declaration" is allowed. Unless the declared component is actually called by the program code, the declared component is not created in the ASP execution environment; but server. createobject allows the ASP execution environment to create components immediately
E. Buffer
F. Partition .htm and. asp file functions: In iis5, the execution efficiency of the. asp file with no server end is the same as that of. html (Microsoft official statement)
G. Debug: Microsoft Script Debugger
H. Execution space of Web Applications
"Application protection" in iis5: Independent advantages: Web application errors do not affect IIS itself and its web applications; disadvantages: occupying more memory resources. Select between "Speed" and "stability. "In (shared)" indicates that the Web application belongs to the same set area (pool) as other related or unrelated web applications. If the set area fails for some reason, does not cause IIS to crash
I. use & to connect a string: the principle for compiling a program in VBScript is "+", which is used for numerical processing. Therefore, the principle of data conversion is to convert the program to a numerical value type, while "&" is used for string connection, therefore, the principle of data conversion is to convert data into strings.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.