Common Java Development specifications and java specifications

Source: Internet
Author: User

Common Java Development specifications and java specifications
1. Background

As a member of the programmer's army, I work in Shenyang shutong changlian Software Technology Co., Ltd. On the first day of my career, I heard the leaders emphasize the importance of development specifications. But I still want to know why development specifications are the most important. Shouldn't it be a great deal to achieve functions?

Over time, I have also gone through several software projects and become more and more aware of the importance of development specifications. Today, I will summarize what I have heard, learned, and personally shared with you, hoping to help you.

2 purpose and significance

In the case of collaborative development, a clear set of programming styles allows collaborators, successors, and themselves to clearly understand the program structure and understand the design ideas in a short time. Improve code readability, reusability, program robustness, portability, and maintainability. The purpose of developing specifications is to improve the efficiency of software development and the maintainability of the developed software and improve the quality of the software. Through the development of standardized constraints to enhance their own logical thinking capabilities, but also enhance the personal coding capabilities and level.

3 Development specifications

As a software project developer, the primary requirement for functional code is that the Code must be correct to ensure that the function can run and meet the customer's needs. The second requirement is that the Code must be clear and easy to understand, so that other programmers can easily understand the principle of the Code, enhance code readability, and ensure a consistent programming style of the Code. Below we will clarify the development specifications through the format, naming, permissions, performance, and other aspects.

3.1 unified format
  • Overall Style
  • Method Definition
  • Nested relationship
3.2 naming rules
  • Package name Definition

Model)Layer operations:It is generally defined in com. agileai. wm. user. module. service, where user is the module name.

Controller)Layer operations:It is generally defined in com. agileai. wm. user. module. handler.

View)Layer operations:It is generally defined that the file path is consistent with the corresponding registration.

  • Class Name Definition

Model)Layer operations:It is generally defined as an interface class: ForumProvider. java interface implementation class: ForumProviderImpl. java.

Controller)Layer operations:It is generally defined as XXXHandler, for example, ForumPostLocatorHandler.

View)Layer operations:It is generally defined as XXX. jsp, for example, ForumUserEdit. jsp.

  • Method Name
  • Variable name
3.3 permission Definition 4 Code Encapsulation

JAVA, an object-oriented language, has three basic features: encapsulation, inheritance, and polymorphism. Encapsulation is the basis of inheritance and polymorphism. Encapsulation can not only make the code logic clearer, but also realize the minimum adjustment to achieve global adjustment. Code encapsulation can also improve the reuse rate and reduce code redundancy. The following describes common scenarios that need to be encapsulated, such as class reuse and multi-class calls.

4.1 class reuse 4.2 class calls 4.3 code reconstruction 5 Advantages 5.1 cost reduction
  • Good Development specifications can reduce the maintenance cost of a software as much as possible. Although it seems a waste of time to comply with the development specifications during the development process, however, from the perspective of software code maintenance in the long run, the clearer code logic saves time for handover and maintenance. Reduces Project/product maintenance costs.
  • Good Development specifications can enhance the readability of software code. Good Programming specifications can realize code self-comments, so that subsequent developers of products/projects can intuitively and clearly understand the code logic, this greatly reduces the difficulty of work handover caused by code logic confusion, and further affects the entire project/product development (O & M) cycle. Reduce manpower input by shortening the cycle to reduce project/product personnel costs.
5.2 improve efficiency

Good Development specifications can maximize the efficiency of team development. Good Development specifications can ensure the consistency of code styles and ensure that the development styles of the entire project/product are consistent, even personnel maintenance changes or troubleshooting can reduce the time waste caused by inconsistent programming styles.

5.3 Capability Improvement

Long-term normative coding also promotes developers to develop good programming habits. The logic of code also reflects the logic thinking of developers, continuously improving the development standardization can also improve the personal logical thinking ability.

6 Summary

As a technician of shutong changlian Software Technology Co., Ltd., I have been involved in the work of my personal incomprehension of the company's forcible requirements for development specifications. So far, I am deeply aware of the importance of the development specifications. In the family of shutong changlian, I learned common java Development specifications every day, such as naming, permissions, and formats. Through adjustment and cognitive improvement, the personal coding capability is gradually improved.

The author believes that a good coding habit not only reflects the individual's ability level, but also reflects its environment and the overall ethos of the team. We hope that everyone will be able to develop their own coding habits so that the rigid requirements in development specifications will become their subconscious habits.

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.