PB Object Naming specification

Source: Internet
Author: User
Tags naming convention

Author: Xingda Computer technology company (www.study01job.com) Guo Baoli

Objects here are objects that can appear in the PB library, and the relevant specifications for the controls are described later.

First, naming convention

A. The part name can be up to 40 characters and is composed of a_b.

The B.A section represents a prefix that represents the type of the part.

C. followed by an underscore "_".

The D.B section describes the name of this part. The composition of B can be determined according to the circumstances. It is recommended to decompose part B into two parts: Functional code _ Functional description.

E. Write a note behind an important variable to indicate the purpose of this variable.

For example, several commonly used object names are

Name of the window: W_ function Code _ function description.

Name of Data window control: Dw_ Function Code _ function description.

Name of Data Window object: D_ Function Code _ function description.

Menu naming: m_ function Code _ function description.

User object: Uo_ function Code _ function description.

Second, the specific naming rules

1. Naming rules for functions

function names = ' functions applicable to the scope code ' + ' F ' + ' _ ' + ' function description ', where the scope of the function code and meaning is as follows:

G global function;

w window function;

M menu function;

U user Object function.

Example: The global user function that checks the results of the SQL statement execution is named as follows: Gf_checksql ().

2. Application

The name of the application should use the English alphabet associated with the meaning of the application, for example, App_si represents the Social security application system.

3. PBL Library

The quality of the PBL library organization is very important, it will affect the ease of application development and maintenance and the performance of the application. The organization of the library should adhere to the following principles:

A. The size of the library. PowerBuilder is not limited to the size of the library, but it is best to make it less than 1 mb,library too large, powerbuilder to spend more time to open and store objects, which can affect the efficiency of development.

B. Number of library. Try to use the fewest number of library. You should find a balance between the number of the library and the number of objects in each library, and if the number of library is too large and the number of objects in each library is too small, the search path will be too long, affecting operational efficiency.

C. Library optimization. To optimize the library frequently in the library brush. Over time, the library will be segmented, which will make the library's storage become discontinuous, affecting operational efficiency.

D. The classification organization of the library. The PBL library can be organized according to subsystem or function, and general application includes public PBL library. Each PBL library file name should be associated with the file action, such as the report PBL library file named REPORT.PBL. Each PBL library file should contain detailed comments that list which objects the PBL file contains, which subsystem it corresponds to, and other information about the PBL (call) relationship.

In order to effectively team development, to achieve the management of PB source code, requirements based on the various factors (such as the application of the implementation of code efficiency and storage space) and maintenance of comprehensive consideration of the PB source code to implement the principle of classification.

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.