Current location - Training Enrollment Network - Education and training - Java programming development specification and its skills?
Java programming development specification and its skills?
Before developing with Java, you must strictly abide by the Java development specification. Only in this way can your road to Java development be smoother. Mastering the corresponding Java development skills can make you get twice the result with half the effort. What are the development specifications and skills when writing code? Let me give you a detailed introduction to computer training.

1, code writing specification:

Code writing follows Java general development specification and necessary code development specification;

Each class and method should have reasonable comments, which should be maintained continuously;

Write unit test cases according to interface requirements, then write implementation classes to make unit tests pass, and so on to make all unit tests pass;

It is required that the number of lines of each Java method cannot exceed 100 lines;

Code writing is divided into functions, one interface is divided into multiple methods, and each method does one thing to make the thinking clear;

Interface design should be as compatible as possible to facilitate later development.

2. Database design and SQL specification

Instead of using MySQL database foreign key constraints, association constraints are realized by applying logic;

Establish an appropriate index, which is often used as a query condition, with high uniqueness, short length and not too many indexes. In general, the number of indexes in a table is less than 5;

The length of the table name cannot exceed 30 characters. It is best to choose a word for the table name, which can accurately and clearly express the entity meaning. If more than one word is needed, it should be separated by an underscore "_", and all letters of the word should be lowercase.