Quality of program development and standardization of management in Chinese universities ' work-study websites

Source: Internet
Author: User
Tags object iis sql naming convention net variables variable access
Standard | Procedure this standardized document is mainly aimed at the existing technology and development direction of Chinese University Work-Study website (hereinafter referred to as Zhong Qin online), and makes a detailed specification for the development of the website background program, which is only for the reference learning of the online programmers.
This document is divided into two parts, the first, the standardization of the development of procedures, the significance of the programmer in the completion of the work of the process of all operational standards; second, the Standardization of program management, the meaning of the standard Programmer's management, assessment, training, rewards and punishments.

"Standardization of process development quality"
1. Development environment
At present, the specific development/commissioning/operation Environment of the Deloitte online is basically:
Program: ASP 3.0
Platform: Win2K Server + IIS 5.0
Database: Access 2000/xp
With the development of the website, this development/commissioning/running environment is no longer suitable for the technical requirements of a large-scale educational website. The program language exposes security not enough, expansibility is poor, transplant is poor, code is confused and so on phenomenon. Making it almost impossible for developers to modify and update past programs, not to mention cross-platform applications; the Win2K and IIS 5.0 Web platforms are not stable enough to have a "machine" phenomenon that is too frequent; the Access database appears to be slow in retrieving large amounts of data. and data backup operation cumbersome, not conducive to the future implementation of multiple servers data synchronization problem.
In order to improve the technical content of the online service, keep up with the pace of international mainstream web site development, the current site is facing major reforms, abandoned the past process development of the road (using a program-oriented language), timely and international mainstream (using object-oriented programming language), we have two development environment to choose development:
First, the use of linux+resin/apache+jsp (Java) +ORACLE/SQL Server Environment Programme;
Second, the use of Win2k+iis (including the. Net framework) +asp.net (c#,vb.net) +sql server/oracle Environment Programme;
Abroad, the first set of programs has become the mainstream, widely used in the field of E-commerce, development and stability; the second set of programs launched in Microsoft. NET plan, the development of a bright future.
First of all, according to the China-Deloitte online since the establishment of detailed statistical analysis of the developer, the online background program developers 90% for the non-computer professional undergraduate students, 10% for computer majors and graduate students, but because of its nature, the development of a professional for the vast number of society's portal site is very unlikely, Its developers may have been limited to students, especially non-computer majors with a strong interest in web development. So its development team may always have weaknesses that are not solidly grounded. To be flexible with Java programming in Linux, most developers are accustomed to the development of programs in the Windows environment, and for ASP developers with some experience, Learning asp.net faster than learning Java, the key lies in the transformation from the concept of program-oriented to the object-oriented concept, which is the first reason why the second set of programs should be selected by the Deloitte online.
Second, the site at the beginning of the development of the medium-term Program development language for ASP, the current ASP difficult to migrate to the Linux environment, to the existing columns into the JSP program and then linked to the Linux system is a vast project, its workload not to redevelopment a set of perfect system. Then look at the second set of options, Its ASP and asp.net can coexist in a new development environment, so that this site can not affect the normal development and operation of the conditions, at the same time to upgrade the original ASP program to the new ASP.net program, step-by-step to improve the efficiency of the program execution and the overall site technology content, really do development and operation of two, this is the middle ground online should be selected The second reason for choosing a second set of options.
To sum up, the China-Qin online should choose the second set of development environment, towards the direction of object-oriented development, and gradually realize the transformation and improvement of technology.

2. High efficiency principle
As a programmer, no matter which area of the development of the program, should strive to pursue the efficiency of the program, please all of you in the online programmer attention, remember the following sentence:
"Do not think that the CPU speed of all the problems are pushed to do, the programmer should optimize the code and then optimize, we can do in no way to let the CPU to do, because the CPU is for the user Service, not for our programmers to serve!" ”
For the web development of the Deloitte online, we instantiate this statement:
• Avoid using global variables as much as possible and delete unwanted variables;
• Use the session variable as little as possible;
• Use stored procedure paging as much as possible when data volume is large;
• Minimize the use of "Select *", even if you need all the fields should be as far as possible in accordance with the order of the use of the list, ordered by should be used as early as possible to establish the index or primary key fields;
• When using the Request object, the QueryString method or form method is used to write the name for the specific case;
• All database and file objects should be close as soon as possible after use, while assigning nothing
· ASP.net in the development, as far as possible use of large resource-consuming system control, and try to use codebehind technology, the Code and page separate, and compile dynamic link library files;
Use SQL Server database as much as possible;

3, coding Agreement
At present, the China-Deloitte online has been in normal operation for more than three years, programmers from the 97 level of undergraduate students to continue to the current level 02, the various grades of programmers coding familiarity and the way the coding is inconsistent, so that the program code a variety of, strictly speaking, from the current online Web site background program coding overall view, The Deloitte online also stays on the level of personal websites, do not see a large education site should be the standard, therefore, our programmers must be unified coding method, one of the reasons, can reflect the integrity of the entire site; second, can improve the readability of the program to facilitate the next phase of the programmer to modify the update program. The following are the specific contents:
1, the variable first defined after use;
2, the first word capital, try to use English description, not to use phonetic description;
3, the variable naming basic Hungarian naming law;
The basic principles of Hungarian nomenclature are:
Variable name = attribute + Type + Object description
That is, a variable name consists of three parts of information, so that the programmer can easily understand the type of variable, use, and easy to remember.
Below are some examples of rules that I recommend to use (see the Hungarian naming convention for detailed naming rules):
• Attributes section
Global variables: g_
Constants: C_
• Type part
Pointer: p_
Handle: H_
Integral type: I_
Floating-point type: f_
Date Type: D_
Boolean type: B_
Character Type: S_
Array type: Ary_
• Description section
Initialization: Init
Temp variable: TMP
Some of these rules take into account the C # variable naming rules for future. NET developments, which are not considered in ASP.
Reference example: C_i_initbordercolor, G_s_tmpnewstitle, G_i_ary_votenum, programmers can make changes according to the actual situation, but must follow the Hungarian naming law, It can make other programmers look at the variable name and know the meaning of the key identifiers such as type and attribute.
4. The property values of all controls should be enclosed in double quotes or single quotes;
5, the control's naming rules:
Button:btn
Form:frm
Select:sel
Textarea:txt
Input:ipt
Hidden:hid
6, the main use of control rules:
img Control
ALT: All display class pictures should have a text description that briefly describes the content of the picture.
· Input control
MaxLength: All input controls need to develop the MaxLength property, which defaults to the length of the corresponding field in the database.
ReadOnly: The ReadOnly attribute is used for all information that cannot be changed.
· Form Control
Action: All form must specify action, if submitted to itself, specify action= ""
Method: Use post as much as possible
OnSubmit: All form must specify the check procedure required before submitting.
All form must have a corresponding reset button.
· Button control
The button used for submission in Onclick:form does not allow this method to be used, and all data checks are activated through the onsubmit of the form.
Head Property
All pages must have a head attribute that is not empty.
• All Chinese pages should be added with the following statement:
<meta http-equiv= "Content-language" content= "ZH-CN" >
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">

4. Database design

[1] [2] Next page



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.