20180420 small notes

How to go from requirements to coding: 1 data flow 2 business logic 3 front-end display

1 Data flow: The data flow is the collection, processing, and storage of data in the entire requirement. Generally, the structure of the database table needs to be designed (for example: attribute table)

2 The business logic is the logic of the actual code, how to process the data.

3 Display: only care about what data is passed from the background, how to display it does not matter to the logic.

4 If the logic from the requirements to the coding implementation is particularly complex, try to simplify the database table first, then simplify the back-end logic, and finally simplify the front-end logic. It is best not to have any business relationship between the front-end and the back-end, and the only relationship between them is data. .


Permission design of two rdbc structure

1 User---Position---Role---Permission

    |           |         |

department department department

Users assign positions, positions assign roles, and role assignment permissions.

2 Table structure user---role---permission

The positions and roles are roles, and roles can contain roles. It's just that the department corresponding to the position is the entity department, and the role corresponding to the virtual department (only used to classify the role).

3 When choosing a position: Generally, it is

(1) departmentId finds the positions under all departments

(2) Filter according to optionalRole (default position) + perms (business rules)

4 Issue with pageoffice reviewer name:

(1) pageOffice opens the text, there are revision marks, and there is no reviewer when the mouse is moved
(2) Baidu knows the floating setting in the option of word
(3) The name of the reviewer: there is a place to set the login name in word

5 When debugging with F12 in the IE modal box, you can only copy the url and open a new window.

6 The columns that appear in the select list item must all appear after the group by (except for the aggregation function). The aggregation function does not filter the results, but only plays a role in calculation.

row_number() over() deduplication , the execution of grouping and sorting in over() is later than the execution of where group by order by.

partition by is used to group the result set. If it is not specified, it treats the entire result set as a group. It differs from the aggregation function in that it can return multiple records in a group, while the aggregation function generally has only one reflecting statistical value. record of.

8 In chrome, a window pops up before closing the window. I can't pop up the window, and then I removed the closed window and opened the window directly, and then I found that chrome prevented the window from popping up.


N other

1 When using the window object, if it is used in iframe or frame, pay attention to which frame the window object represents.

2 safari can only see one page when opening pdf, the reason is that it can only be done after ios8, open it with pdf.js

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324664585&siteId=291194637