Talk about website development specifications

zhaozj2021-02-16  75

Talk about website development specifications

Source: Cool page Author: icefire

Any development agreement and rules need to be customized before any project or system development, which is conducive to the overall style of the project, code maintenance and expansion. Due to the dispersion, independence, integrated interaction of web projects, the custom set and rules are particularly important. This document will customize a series of conventions and rules, including component team, folder naming rules, file name naming rules, program code programming style, database design conventions, respectively. These rules and agreements need to be discussed with developers, designers and maintenance personnel, and will be developed in the future, and will be developed strictly in accordance with rules or agreed. Every team development should have its own set of specifications. A good feasible specification allows us to work and have a handful of hand, these norms are not the only standard does not exist, and maybe some places are currently used with your current habits. Many places have controversy. For example, many people are used to designing the database, while some people (people like me) are resolutely opposed, each has a more reason to explain their own point of view, so there is only the corresponding strategy based on the specific situation. ???? Very significantly in the development of the Web project development, the front desk development mainly refers to the non-programming part, the main responsibility is the website AI design, interface design, animation design, etc. The background development is mainly programmed and website operation platform construction, and its main responsibility is to design the implementation of website database and website function template. The following specification is mainly customized from these two aspects. These norms are a little experience in the summary of learning work in these years. This document is more suitable for small and medium-sized websites or Web project development specifications. 1. The first thing to form a development team after picking up items is to form a team. According to the size team of the project, there are dozens of people, and there can be a small team with only a few people. In the team division, there should be six roles in the team division, which is required, which is the project manager, planning, art, programmer. , Code integrators, testers. Maybe your team has no 6 people, there is no relationship with a number of characters, such as the project manager can also plan this role, such as the programmer can also contain code integration and test these 2 characters, if your project is big enough There are enough people to be divided into 6 groups, and each group is divided. Let's take a brief introduction to the specific responsibilities of these 6 characters. Project managers, overall design, development schedule customization and monitoring, customized development specifications, responsible for the review of all aspects, coordinating the development of each member (group). Planning, providing detailed planning solutions and needs analysis. Also included in the future website promotion. Art, design website AI, interface, logo, etc. based on planning and demand design. The programmer is designed to design the implementation of the database and function module based on the overall design of the project. The code integrator is responsible for integrating the programmer's code and interface, the code integrator can make the relevant page, tester, responsible for the test program. 2. Development Tools Web Development Tools are mainly divided into three parts. The first part is the website reception development tool. The second part is the website background development environment, and the third part is project management and auxiliary software. The following is briefly introduced to the software that these three parts need to be used. Website front desk development mainly refers to the web interface design. Including the overall framework of the website, common pictures, Flash animation design, etc. The main use software is: Adobe Illustrator, AdoDB Photoshop, Dreamweaver MX, Flash MX, etc. Website background development mainly refers to the website dynamic program development, database modeling, mainly used related software is: PowerDesigner, PowerDesigner is very powerful in database design, using it to quickly create database concepts and physical models, I am the most It is too convenient to like it to generate the database Report, and the design database is highly recommended to use it.

Rational Rose (program modeling), if your project function module is not especially complex, then save some time and development complexity, but I personally think that it is a big project or a small project should draw Rose illustration. Website project management mainly refers to the control of development progress and code versions. Development progress is developed by Microsoft Project, and the code version control uses Visual SourceSafe, and of course there are other options such as CVS and Rational Clearcase. Website test uses VS.NET with Tool Microsoft Application Center Test, which can be parallel, load tests, etc. Program documentation is written in Word, if you are very nostalgic to use WPS. 3. Website development process should have a work step before the project is implemented, the workflow is the workflow. It is the most important design and system test in project development, and the time to write code is not much, but there is The team is eager to develop code, first writing the program, did not pay attention to the review and testing these 2 links, resulting in rework, I have encountered many times in a relatively large company. Therefore, the project is not rushing to start writing code, and should slowly come slowly step by step, only walking slow can go to a far away. The development process of Figure 1 reflects the entire aspect of development. Figure 1-1 can see 2 main lines from Figure 1-1, which are front-end development and background development, respectively. The former background development has not cross each other in the early stage of project development. Of course, it is not absolutely no, the Web planning and demand analysis is related to each other. One is the planning form and style planning of the website. The other is the plan function plan, they are clothes and torso Relationship. In the late development, the interface and function module need to be combined to form a unified, which is the upcoming website. 4. Database development data file naming adopts system name _ file type, such as the system named Kupage, the database file is named kupage_database.mdf, some database files have multiple, such as SQL Server, one, one is a database file, The other is a log file, then their file name is kupage_database.mdf, kupage_log.log. All file names are written. Database table naming specification, the length of the table name cannot exceed 30 characters, the table name contains all the singular forms in the form, the word first write letter should be capitalized, and there is no connection symbol between multiple words. If there are multiple systems in the library, the table name uses the system name word or multiple words, the system name is the abbreviation of the development system, the system name is all lowercase English characters, such as BBSTITE, BBSForumType. If you only contain one system in the library, the table name is only used with a word or multiple words. Word selection can summarize one or more English words of the table, such as UserInfo, Usertype. The relational table name is RE_ table A_ Table B, RE is the abbreviation of the Revelive, such as: RE_USER_ARTICLETYPE, RE_USER_FORMTYPE. Database field naming specification, the database field name is all lowercase English words, and the word "_" is separated, the naming rule is the name word, such as user_name, user_pwd. The table name rules, if the table name is a word, the alias will take the first 4 letters of the word; if the table name is two words, the first two letters of the two words form four letters long alias; if the table The name consists of three words. You may wish to take one of the first words and then remove the two letters from the last word, and the result is an alias for 4 letters. The view name uses rule view_ table A_ table B_ table C, and the view represents the view.

This view is generated by several tables with "_" to connect several tables, if the table can be properly simplified, but must list all table names. Stored Procedure Name Rules P_ Table Name_Exact Process Name (abbreviation), such as p_user_del, p_articles. SQL statement writing rules, keywords must be capitalized, other written names, such as: select user_id, user_name from user where user_id = 'Tom'5. Folder file name naming specification folder is usually used in English, the length is generally not more than 20 characters, named lowercase letters. In addition to special circumstances, use Chinese Pinyin, some common folders named: Images (Store graphic file), Flash (store Flash file), STYLE (save the CSS file), Scripts, Scripts, INC (Store Include file) , LINK (Savory Friends Love Link), Media (Multimedia File), etc. The file name unified with lowercase English letters, numbers and underscores combinations. The guiding ideology of naming principles is that every member of yourself and the working group can easily understand the meaning of each file. Second, when we use the name "by name Orders" in the folder, the same category The file can be arranged together so that we look for, modify, replace, calculate loads, and the like. 1. The name of the naming of the picture is divided into two parts of the head, separated by underline, and the header represents the big-class nature of this picture, such as advertisements, signs, menus, buttons, etc.. Picture of rectangle placed on top of the page, decorative pattern, etc.: Banner iconic picture name: logo Logo is not fixed on the page and a small picture with links We have named Button on the page Picture of a link section of continuous appearance, the same link section we name: Menu Decorated Photo We name: PIC without links Show the title of the title Title We name: Title The following is a few samples: banner_sohu.gif, banner_sina.gif, Menu_aboutus.gif, menu_job.gif, title_news.gif, logo_police.gif, logo_national.gif, pic_people.jpg. 2, dynamic language file naming rules nature _ description, describe multiple words, separated by "_". Nature is generally the page summary, example: register_form.asp, register_post.asp, topic_lock.asp6. Program code programming specification A good program code is conducive to system maintenance, code is also easy to read. Only ASP programming style and conventions are discussed here. All variables in the ASP are weak variables without definition, they can be used directly, and the code is not case sensitive. But other languages ​​are generally defined, in order to develop good programming habits, write code must follow the rules. 1. Each variable name must be defined, and the statement <% OPTION Explicit%> in the ASP file is added to enforce each variable. 2, for the purpose of easy-to-read and consistency, use the following variable naming conventions in the code:

Subtype Prefix Example Boolean bln blnFound Byte byt bytRasterData Date (Time) dtm dtmStart Double dbl dblTolerance Error err errOrderNum Integer int intQuantity Long lng lngDistance Object obj objCurrent Single sng sngAverage String str strFirstName 3, code need indented indented using keyboard The Tab key does not use the space bar. And "=" or the link string requires left and right empty, as follows: <% strmessage = "Hello" strmessage = strmessage & "You bad"%> 4, the process prepared by the function process. Function or process naming adopts action noun, each function needs to give corresponding annotations, function functions, incoming variables, and authors and modify relevant information. The following function: <% '[Function] Returns the value of a parameter' [parameter] strParameterName parameter name '[of] icefire 2002/8/20 amFunction GetParameterValue (strParameterName) Dim objRS, strSQL, strParameterValuestrSQL = "SELECT ParameterValue FROM damsParameters WHERE ParameterName = '"& strparameterName &"' ". GetParameterValue = strparameterValueSet Objrs = Nothingend Function5, ASP built-in object is case sensitive. The following code snippet strusename = request.form ("username") set conn = server.createObject ("AdoDb.Connection") 6, the database can only have a database connection file, creating a database object is as possible as possible Open the database and close the database as early as possible. Creating a database object call Uniformly creates a function. As follows: Sub OpenConn (ByRef conn) Dim strDBPath, strDBConnectionstrDBPath = Server.MapPath ( "database / tax.mdb") strDBConnnection = "Driver = {Microsoft Access Driver (* .mdb)}; DBQ =" & strDBPathSet conn = Server. CreateObject ("AdoDb.Connection" Conn.open strdbconNnectionend Sub7, when an object is not in use, such as ObJFSO, OBJRS object, etc. Use unified function calls. The function is as follows: subcloseobj if isobject (obj) THENOBJ.CLOSESET OBJ = Nothingend IFEND SUB9, the time is saved in the form of a string to the database, which can be well saved in different databases. It is also convenient for database migration. The time is saved with 14-bit string, and the date is saved with an 8-bit string.

转载请注明原文地址:https://www.9cbs.com/read-15045.html

New Post(0)