And object-oriented software engineering - team work 3

A, coding standards and coding principles

Naming conventions

(1)   Method name: We use a full English description, the first letter lowercase first letter of each word in the English capital, the rest lowercase letters, property access is to use setX , getX , returns a Boolean value type of method is to use isX , cases The following naming:   queryStaffById , isCodeExists () , the getValue ;

(2)  Attribute names: Use a full English description, the first letter lowercase first letter of each word in the English capital, and the remaining letters in lowercase, to ensure that our property and method names will never be repeated;

(3)  Constant name: We all the words of the first letter is capitalized and with "_" separated.

(4)  Component Name : all component type results, such as: StaffService , OrgService ;

(5) the number of database name :

Table: " module name _ the table name " ,

Field: BOOL type with "Is" , "Can" , "Has" etc., indicate that; must contain the date type named "a Date" ; type time must be contained "Time" .

Stored Procedures: Use "proc_" prefix.

View: "view_" prefix.

Trigger: Use "trig_" prefix.

(6)  named properties and methods generally not more than 15 letters;

(7)  the media queries on the relevant rules nearby. We do not have them packed in a single style file or on the bottom of the document.

(8)  All statements are statements that end with a semicolon. The last sentence of the statement behind the semicolon though is optional, but if you omit the semicolon, the code may be more error-prone , so we do not unified omitted.

(9)  we are not in the RGB () , RGBA () , HSL () , HSLA () or RECT () back inside the insertion space values separate. Such benefits from a plurality of attribute values (both plus spaces comma) distinguishing a plurality of color values (only comma, no spaces).

(10)  double quotes the selector attributes, e.g., INPUT [type = "text"] . Only in certain circumstances it is optional, but, for consistency of code, we are adding the double quotes.

(11)  we avoided the to 0 value specified unit, e.g., a margin: 0; instead of margin: 0px;

(12)  for the attribute value of the comma-separated, we each comma is inserted up a space (e.g., Box-Shadow ).

(13)  our CSS color is lowercase, and all abbreviations , such as #fff ;.

(14)  various operators specifications:

(1) commas, semicolons, behind only spaces.

(2) comparison operators , assignment operator , "=" , "+ =" , arithmetic operators "+" , "%" , the logical operator "&" , "&" , bit field operators "<<" , "^" before and after the other of a binary operator spaces.

"!" (3) , "-" , "+" , "-" , "&" no longitudinal spaces (address operator) unary operators and the like.

(4) "->" , "." Before and after no space.

(5) if , for , the while , Switch and so on and behind the brackets should be between spaces, so if more prominent, and obvious keywords.

(15)  our CSS declaration order the following requirements:

1.Positioning location attributes , such as position / top / right / bottom / left / float / display / overflow like.

2.Box model box model properties, such as border / margin / padding / width / height and the like.

3.Typographic text related attributes, such as font / line-height / text- align / word-wrap and the like.

Notes Specification

(1)    internal function (internal block) Notes:

Each row ten lines of code are present The comment is placed in the top or the right statement; Notes and remarks are indented with the statement; Notes and above code separated by a blank line, of if / switch / case / while / do while adding a comment; modify the code also add a comment; comments explicit content, but also the use of the words easy to understand.

(2)  function of the external (or inter-module) Notes:

  Each module can be a comment, such as bags, files, classes, interfaces, class attributes, methods and the like annotations .

(3)  codes in a single line or multi-line comment:

// This is a single line comment    

/ * This is a multiline comment * /

(4)  For longer comment, be sure to write a complete sentence; for general comment, you can write simple phrases.

Typesetting specifications

(1)  block indented . 4 spaces bits , without using TAB , to avoid a different editor for TAB process different.

(2) "{" , "}" on a separate line, in the same column.

(3)  longer statements, expressions, parameter writing the multiple lines.

(4) line write only a single statement.

(5)  Select statement, a loop statement, keywords branch statement as if ...... else / switch / do ...... while etc., are separate line.

(6)  between the relatively independent operations statement block, the variable declaration will add a blank line.

 (7)  class attributes and methods not placed crosswise, or attributes of different access methods range not far placed crosswise.

 

Second, an array of library design

Third, the project ER diagram

 

Fourth, functional flow

① users to choose their own preferences.

② query dishes in line with user preferences from the background data in the dishes according to the preferences set by the user.

③ will recommend dishes and goods available to the user, the user can choose to eat or cook yourself on the recommendation of the raw material and the cooking process on the recommendation of nearby restaurants.

④ When the user is not interested in the recommended recipe can also be randomly Click to view the recommended daily recommended dishes.

Fifth, the division of labor

Shen Fengqi

Small micro-channel is mainly responsible for project management program

Chen Long

It is mainly responsible for the development of small programs

Su Pengfei

Mainly responsible for data collection

Flying Tiger Party

Responsible for video production

 

Sixth, the contribution points

A total of four people in this group, a total of 40 points

Team members

贡献分

沈凤岐

10分

陈朗

10分

苏鹏飞

10分

党虎飞

10分

 

Guess you like

Origin www.cnblogs.com/1C11/p/10961758.html