[Reading notes] code neat Way (v)

Source: Internet
Author: User

Continue to organize the contents of this book: the 11th Chapter system

This chapter feels more emphasis on the Java language itself, so do not do too much summary, in short, for the system as a whole, you can use the appropriate pattern design, to ensure the flexibility of the system, quoting part of the original text of the summary language:

The system should be neat. At all levels of abstraction, intentions should be clearly discernible. Whether you're designing a system or a separate module, don't forget to use the simplest solution that probably works. The 12th chapter is iterated into

There are four tips to help us create well-designed software that makes the design more "simple":
1. Run all tests.
2. Do not repeat.
3. Express the programmer's intentions.
4. Minimize the number of classes and methods.
The first is the basis and assurance of the following three, only the testable system is reliable and deployable, and writing well-run tests will be the goal of the system more closely aligned with the object-oriented, low-coupling high cohesion.
Two to four can be seen as the process of code refactoring: eliminate duplication, ensure code expression and readability, and, in this context, reduce the number of classes and methods. (For knowledge of refactoring, you can refer to Martin Fowler's refactoring: improving the design of existing code, which provides a detailed overview of refactoring-related knowledge.) )

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.