Small improvements in coding

Source: Internet
Author: User

IF

+
Further clarify responsibilities to avoid void type
A (ret =
Others

1. The purpose of encapsulation is to isolate changes, such as database operations, as much as possible.

2. Programming the interface. For example, in database operations, we directly use the sequence class SqlHelper of a database, which is too expensive in the era of database switching. If only SQL databases are supported currently, you can also use the factory to return interfaces for the application layer.

3. For the purpose of making products, programmers aim to provide better products and cannot catch up with the progress.

4. Try to use incremental release for the project. When you need to add a function, you can directly copy some files to avoid reinstalling the site or overwriting the site as a whole, which may cause unexpected problems and lead to high risks.

5. Use file records for debugging logs. This reduces the cost in the future. If necessary, clear the logs separately. It is better to carry a notebook and debug it in a single step than there is a problem at the site.

6. When using MVC for development, it is best to analyze the Business Code clearly and directly use the test tool to test the interface. Backend development ensures the rationality and Stability of the backend interface, while the front-end page is assumed to be changeable.

Related Article

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.