Network page design rule
General Theory
This specification is not only a development specification, but also a reference for a scripting language. It is not a static provision that must be strictly observed. In special circumstances, it must be used flexibly and made some changes. However, do not change the specifications at will. If you have any questions, please contact the project owner in a timely manner.
There should be a help directory in the main directory to store the instruction file. Description files include:
Directory description
Description of the file list: storage location, file name, function and processing logic description, involved database tables, and call relationships.
Database Description: database location, space allocation requirements, table design, relationship design, view design, and stored procedure design.
▲Considerations for creating static pages
I. Requirements for routine production
L 'title' should be written on the main page (the enterprise name in Chinese and English should be written on the home page)
L The 'meta' field on the main page is convenient for search engines.
L use widely supported technologies as much as possible. It is based on the most popular version of the most popular browser and takes care of Low-version browsers.
L do not use excessively small fonts, or excessively large images, animations, or sounds. Do not use excessively long scrolling screens.
L Delete useless files in time to prevent unnecessary download speeds from slowing down
L due to the Linux System of server, files are case sensitive! All files are named in lowercase letters, including graphic files. Do not use Chinese as file names.
L The page is dominated by 800x600 screen setting camp (the actual size is 778 * 434px), but you should also pay attention to the browsing effect set on the 1024x800 screen; that is, horizontal flow entries should not appear in the browser at the resolution;
L generally, the page should be centered. If you have special requirements, you can set the top and left of the page;
Ii. Configure the document naming rules and Contents
L files on the first page named after "index.htm" and "index. asp.
L. htm is used for all extension file names of HTML files.
L in principle, you should create a directory for each topic based on the topic structure of the homepage, open an image sub-directory in the directory of each topic as needed to store the proprietary images and multimedia files of this topic. If the content of this topic is very large, there are many sub-topics, you can open other directories accordingly.
L Unless otherwise specified, the names of directories and files must be in combination with lowercase letters, numbers, and underscores (_), and cannot contain Chinese characters, spaces, or special characters; the directory name should be in English or pinyin. Try to use words that everyone can understand. This allows you and each member of the Working Group to easily understand the meaning of each document.
L The CSS file of the website should be placed under the root directory image for other files to be called. For example, if there are many subtopics, you can copy them to your own directory to unify the website style.
L The shared template file should be placed in the Templates folder in the root directory (this is the default path of Dreamweaver. Other software developers also need to follow this rule ).
Iii. Requirements for VI Standardization
L banner
Format: GIF: 468x60 pixels size: <15 K
L logo
Format: GIF size: 88X31 size: <7 K
4. Page Planning
1. Use absolute pixels as much as possible to avoid deformation of the table at different browser resolutions. A webpage should try to avoid using the entire large table. All content is nested in this big table, because the browser displays the elements of the page one by one in units of tables when interpreting the page, if a webpage is nested in a large table, the possible consequence is that when a visitor clicks the website, he must first face a blank area for a long time, then all the webpage content appears at the same time. If this is required, use the <tbody> flag to display the large table in blocks.
2. Sample Code of CSS definition specifications and CSS file format:
<Style type = "text/CSS">
<! -
P {text-indent: 2em ;}
Body {font-family: ""; font-size: 9pt; color: #000000; margin-top: 0px; margin-Right: 0px; margin-bottom: 0px; margin-left: 0px}
Table {font-family: ""; font-size: 9pt; line-Height: 20px; color: #000000}
A: link {font-size: 9pt; color: # ffffff; text-Decoration: None}
A: visited {font-size: 9pt; color: #99 FFFF; text-Decoration: None}
A: hover {font-size: 9pt; color: # ff9900; text-Decoration: None}
A: active {font-size: 9pt; color: # ff9900; text-Decoration: None}
-->
</Style>
To ensure that the font size of different browsers is consistent, we recommend that you define the font size using the PT and pixel PX. PT generally uses the 9pt and 11pt of the Chinese, PX is generally used in Chinese 121212px and 14.7px. This is the optimized font size. When the bold characters are in black or simplified Chinese, the font size of 11pt and 14.7px is generally used.
3. images are compressed in GIF and jpg formats to reduce the volume of page download data. Each image must contain the explanatory text (ALT = "") of this image, so that if the image cannot be displayed normally, you can also know what it means. to add width and height to the tag to avoid page confusion when the image cannot be properly displayed.
4. If the page uses an animated active webpage, avoid excessive animation and minimize the waiting time for users to browse. Flash animation should be used on the whole page, and the integration of flash and page should be taken into account.
5. the homepage of each relatively independent topic is generally within 40 kb, and the special requirements cannot exceed 60 kb. Each webpage (except the homepage of this website) both the home page and the icon or text link at the upper level must be returned.
6. Return the relative path of the connection, and try not to use the absolute path. For example: ../index.htm
7. the font of the webpage must be simplified by the State.
▲Precautions for Program Development
1. the website system needs to connect to a database (SQL). Therefore, you need to connect to the database. However, you are not allowed to create ODBC data sources. You are not allowed to create multiple headers and include connections. The entire system has only one database, in this way, you can easily change the database password in the future. At the same time, porting is also very convenient.
The two headers contain files such as *. asp, so that the user will not find the password and database. If there is an Acess database, the extension must be changed to the format of *. asp to protect data.
3. All the sub-databases must have a readme.asp(readme.txt ---- changed to a readme. ASP, nothing to display) file, which describes in detail the table, table structure, meaning and size of each field used by the submodule, SQL table creation script language (exported using SQL tools ), functions of each program file.
4 Table creation must be meaningful, and its fields must also be meaningful. For example, for table students in class 4967, the table name: table_4967_student field: name, age table_4967_student_name, table_4967_student_age, and so on. At the same time, there must be 5 extended fields for future extended functions.
5. Annotations are required for maintenance. Delete useless code during the test to make the program clear.
6. Use relative paths and never use absolute paths.
7. The background management program must be integrated into a page, and must have permissions. Only authorized users can log on to the system for system management.
8. Do not set unnecessary session variables to avoid wasting resources. At the same time, use SQL statements to solve all the problems that can be solved with SQL statements at one time to avoid multiple database searches and feedback, re-retrieval and so on, so as not to affect the speed, resulting in a large amount of time waste on network connections.
9 During program development, do not use a running website for testing. Please build your own environment or apply for an environment.
10 there must be error capture and handling to remind users of how to operate and cause errors.
11 When deleting information, you must confirm the deletion. After all, you must confirm the deletion before deleting the information.
12 there should be clear regulations between various modules, and there should be no confusion. Each module must have its own directory (put in the main directory ).
13 if Javascript verification is valid, verification should be performed on the server side, so as not to increase the burden on the server and affect the speed of webpage response.
14 when testing a program, programmers should test the program with a value outside the upper boundary, a valid value, and a value outside the lower boundary.
15. Trigger and stored procedure are absolutely prohibited.
16 if the entire website system uses the same variable or constant, please follow the constant definition in C language to facilitate maintenance.
17 when displaying database information, we should take into account the section level and normal display of punctuation marks. If there are many records, we can consider paging to avoid the appearance of too long pages.
18 after all modules pass internal tests, they will contact their superiors for testing and acceptance.
19. After all the functions are completed, you need to perform integrated testing. The background management program should be put together to form a background management website. Objective: Simple and Convenient operations.
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.