Code for Web Design

Source: Internet
Author: User
Tags format definition constant connect sql table name version root directory
Specification | design | Web page design  

General

This specification is not only a development specification, but also a scripting language reference, this specification is not a rigid must strictly abide by the provisions, under special circumstances to be flexible use, make certain modifications. However, please do not arbitrarily change the specification. If you have any questions, please communicate with the project leader in time.
  
There should be a help directory in the home directory, with a description file. The documentation includes:

Directory description
File List Description: storage location, file name, function and processing logic description, the related library table, call relationship.
Database Description: Database location, space allocation requirements, table design, relational design, view design, storage process design.

▲ Static Page Production considerations

First, the production of general requirements

L Main Page to write ' title ' (homepage to write the name of the enterprise in English)
L Main Page ' meta ' field is easy for search engines to find.
• Maximize the use of widely supported technologies. The most popular version of the browser is the standard, while taking care of the lower version of the browser.
L Do not use too small fonts do not use too large pictures, animations, sounds. Do not use too long scrolling
L Delete useless files in time to prevent unnecessary download speed slowing down
Due to the server's Linux system, the file case is strictly case-sensitive! All files are named in lowercase letters, including graphics files. Prohibit file names in Chinese.
L page to 800x600 screen set camp primarily (actual size is 778*434px), but should also pay attention to the 1024x800 screen settings browsing effect, that is, at 800x600 resolution should not appear in the browser horizontal flow bar;
L usually the page should be centered, if special requirements can be set top, left;

Ii. file naming rules and directory structure rules

L The first page must be a file named "Index.htm, Index.asp."
L HTML file extension file name is used. htm
L in the root directory should be in principle according to the column structure of the first page, for each column to open a directory, according to the need for each column in the directory to open an image of the subdirectory to put this column of proprietary pictures and multimedia files, if the content of this column is particularly large, and a lot of subordinate columns, Other catalogs can be opened accordingly.
L Unless there is a special case, the name of the directory, the file is all in lowercase letters, numbers, the combination of underline, which must not contain Chinese characters, spaces and special characters; the directory name should be in English, pinyin mainly. Try to use words that everyone can read. Make it easy for yourself and each member of the team to understand the meaning of each file.
L site CSS files to be placed under the root directory image, for other file calls, such as more sub columns can also be copy to their own directory, so that the unity of the website style.
L Common template files should be placed under the Templates folder in the root directory (this is the default path for Dreamweaver, such as with other software developers).

Third, VI standardization requirements
L Banner
Format: GIF size: 468X60 pixels size: <15k
L Logo
Format: GIF size: 88X31 size: <7k

Four, the page makes the rule
1. The table uses absolute pixel as far as possible, lest the browser resolution is not at the same time the table produces distortion. A webpage to try to avoid using a whole big table, all of the content is nested within this large table, because the browser in the interpretation of the elements of the page, is displayed in the form of a table, if a page is nested in a large table, then the most likely result is that when the viewer typed the URL, He had to face a blank space for a long time, and then all the Web content appeared simultaneously. If you have to, use the <tbody> tag to make this large table block out.

2.   CSS definition specification and CSS file format sample code:
<style type= "Text/css" >
<!-
P {text-indent:2em;}
Body {font-family: "XXFarEastFont-font-size:9pt"; color: #000000; margin-top:0px; margin-right:0px; margin-bottom:0px; Marg in-left:0px}
Table {font-family: "Arial"; font-size:9pt line-height:20px; color: #000000}
A:link {font-size:9p T Color: #FFFFFF; Text-decoration:none}
a:visited {font-size:9pt; color: #99FFFF; 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, the font size is recommended to use points pt and pixel px to define, PT generally use the Chinese song body of the 9pt and 11pt,px generally use the Chinese song Body 12px and 14.7px This is the optimized font size, bold text or italicized word bold, Generally choose the size of 11pt and 14.7px is more appropriate.

3. The picture uses GIF, JPG compression format to reduce the amount of page download data. Each picture should have the descriptive text of this picture (alt= ""), so that if the picture does not display correctly, you can also know what the image of the meaning of the representative. Mark to increase the width, height, so that the image can not be normal display, the page confusion phenomenon.
4. If the page uses animation active webpage, must avoid the animation to be too big, minimizes the user browsing wait time. Full page to Flash animation, to take into account the integration of flash and the unity of the page.
5. Each relatively independent column home page generally also required within 40K capacity, such as special requirements also must not exceed 60K; each page (except the homepage) must have back home and return to the superior icon or text link.
6. Returns the connection using a relative path, as far as possible without using an absolute path. Such as:.. /index.htm
7. Web page making fonts require the use of national simplified.

▲ Program Development Considerations

1. Sub-site system to connect to a database (SQL), so to connect to the database, but do not allow the establishment of ODBC data sources, not allowed to make a large number of connections, the entire system has only one, in order to change the database password in the future very convenient to change the system, at the same time,
The 2 header contains files to be made such as *.asp so that users do not find passwords and databases, and if there is a acess database, the extension must be changed to look like *.asp to protect the data.
3 All the modules, must have a readme.asp (Readme.txt----changed to àreadme.asp, nothing to display) file, inside detailed description of the book module used table, table structure, the meaning and size of each field, SQL table scripting language (SQL Tool export), the functionality of each program file.
4 Building a table to have a certain significance, its fields also have significance, such as class 4967 table students, table name: Table_4967_student field: Name, age table_4967_student_name,table_4967_student_age, and so on. At the same time, you need to have an extended field of 5 people to extend the functionality in the future.
5 to have comments in order to maintain. Delete the useless code at the time of the test to make the program clear.
6 to use relative path, resolutely prohibit the use of absolute path.
7 Admin program to be integrated into a page, and to have permissions, can only be a user with permission to log in before the system management.
8 do not create unnecessary session variables, so as not to waste resources, at the same time, can be used to solve the problem of SQL statements with SQL statements, to avoid multiple database retrieval, feedback, retrieval, etc., so as not to affect the speed, resulting in a large amount of time wasted in the network connection.
9 program development, do not use the site has been put into operation to test, please build their own environment or application environment.
10 to have error capture processing, remind the user how to cause errors.
11 Delete Information to have confirmation, after all, is deleted, confirm and then delete the line.
12 Each module should be clear, not chaos. Each module should have its own directory (placed in the home directory).
13 The use of JS verification is valid to verify, resolutely avoid the server side to verify, so as not to increase the burden on the server, at the same time, affect the speed of the Web page response.
14 programmers to test the program to use the boundary value, the legal value, the next boundary value for testing.
15 absolutely prohibit the use of triggers, stored procedures.
16 if the entire Web site system uses the same variable or constant, please follow the constant definition in C language to facilitate maintenance.
17 Display database information, should take into account the paragraph level, the normal display of punctuation marks, records more can be considered paging, to avoid too long page appearance.
18 after the internal testing of all modules and then contact the superior for testing and acceptance.
19 after the completion of all functions, to carry out integration testing, background management procedures to put together, but also to form a background management Web site, the purpose: simple and convenient operation.



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.