My use is small: 1. Each table is specified in Chinese, the title of this table, the contents of all fields in the table.
2. Windows, data windows, events, classes are also indicated. My PBL is based on the modular division to be involved, I personally think that it is suitable for my development style. :)
Others are released after each time the memory is used. (Such as: Datastore)
Open the PB, open Word, change your changes, you meet and solve the problem (code and document synchronization!)
In the beginning of each PBScript, you want to write annotations, functions, and functions.
PowerBuilder program development specification 1. Name Object Name Name Rule Window (WINDO) W_NAME Menu (MENU) m_name User Object (MENU) M_NAME User Object (Function) F_Name Data Window (DATA Window) Normal Data drop-window data window (for DropDwon Datawindow) d_name dddw_name pipe (pIPELINE) p_name two, window controls named command button control names naming convention (COMMANDBUTTON) cb_name graphic button (PICTUREBUTTON) pb_name box (cHECKBOX) cbx_name checkbox ( RADIOBOX) rb_name static text (STATICTEXT) st_name pictures (pICTURE) p_name group box (gROUPBOX) gb_name line (lINE) ln_name single-line edit box (SINGLELINEEDIT) sle_name format edit box (eDITMASK) em_name multi-line edit box (MULTILINEEDIT) mle_name RICHTEXTEDIT control ( RICHTEXTEDIT) rte_name horizontal scroll bar (HSCROLLBAR) hsb_name vertical scroll bar (VSCROLLBAR) vsb_name drop-down list box (DROPDOWNLISTBOX) ddlb_name drop-down list box graphics (DROPDOWNPICTURELISTBOX) ddplb_name list box (lISTBOX) lb_name graphic list box (PICTURELISTBOX) plb_name ListView control (LISTVIEW ) TREEVIEW, TV_NAME TAB control (T AB) TAB TAB_NAME TABPAGE_NAME Data Window Control (DataWindow) DW_NAME Graph Control (GRAPH) GR_NAME OLE Control OLE_NAME User Object Control (User Object) UO_NAME
Variable Name Variable Type Name Rules Boolean Variable (Boolean) XB_NAME Character Variable (CHAR) XC_NAME Date Variable (DATA) XD_NAME Date Time Variable (DATIME) XDT_NAME Different Variables (DECIMAL) XDEC_NAME Double Precision Floating Point Variables (Double) XDOU_NAME Entrematurity Variable (Long) XL_NAME Real Variable (REAL) XR_NAME Structure Variable (String) XSTR_NAME Strous Variable Variable (String) XS_NAME Timing Variable (TIME) XT_NAME Unsigned Integer Variable (UINT) XUI_NAME No Symbol Long Integer Variable (ULONG) XUL_NAME Description: For X global variables in the naming rules of variables (Global Var) X-use G-Replacement Variable (Shared Var) X-replacement local variable (Local var) X is replaced, for example: Defining a string variable global variable (GLOBAL VAR) GS_NAME instance variable (shared var) SS_NAME local variable (LOCAL VAR) LS_NAME definition Integer variable global variable (Global var) gi_name instance variable (shared var) si_name local variable (local var) LI_NAME III, other named name Naming rules User-defined events (User Event) UE_NAME window function (Window function) WF_NAME
My thoughts: more packages, write less code!
A person written code may only be read by himself!
l It is recommended to build the Rubbish directory on this unit, which is used to store something that is not used but it is possible. l Pay attention to the use of existing classes. Use it in inheritance. It is forbidden to see the existing classes, and you will do it again. L Share's objects should be registered to the version control system, such as Objectcycle, use the Checkin / Checkout mechanism while modifying the object, so that two / more people can jointly maintain the same group of objects without conflicts, the most important thing is to save any Version, easy to submit and recover. When new objects, you should first think of "inherit" instead of "new"! L PBL naming rules to identify heads with module as: JL_.
l Each PBL module should not be greater than 1.5MB, and it should be divided.
1. Introduction In order to standardize software development code and documentation, it is convenient for maintenance, and the software development specification is set. Second, documentation requirement requires each system requirements: demand analysis document, demand change document, database structure document, database change document, software development document. The document should be programmed first, that is, the corresponding document must be written before writing programs, and then program it according to documentation. Each window must have a document. The name, function, input, output parameter of the module is required, create, and modify the time. Third, the program style program must have a good indentation format. Take Power Builder as an Example: if Condition Then Something to do end if, each keyword letter is capitalized, the corresponding position has 3 space indent. 4. Variable Name Specification (Take Power Builder as an Example) 1. Object Name Powerbuilder, the object's naming is generally as the following prefix: prefix object --------------------- ---------------------- D_ DataWindows DDDW_DOPDOWNDATAWINOWINDOWS DDDW_ DROPDOWNDATAWINOWS F_ FUNCTIONS M_ MENUS P_ PIPELINES S_ STRUCTURES U_USEROBJECTS W_ WINDOWS 2, the control is named in the window of PowerBuilder, control Names usually use the following prefix:
Prefix Control ------------------------------------------------ --------------- cbx_ CheckBox cb_ CommandButton dw_ DataWindow ddlb_ DropDownListBox em_ EditMask gr_ Graph gb_ GroupBox hsb_ HScrollBar ln_ Line lb_ ListBox mle_ MultiLineEdit ole_ OLE 2 0 ocx_ OCX oval_ Oval p_ Picture pb_ PictureButton rb_ Radiobutton R_ Rectangle RR_ RoundRectangle SLE_ SINGLINEEDIT ST_ StaticText UO_ User Object VSB_ vscrollbar 3, Variable Name:
-------------------------------------------------- ------------- 1), the action domain name prefix scope --------------------------- --------------------------------- G_ Global S_ Shared i_ instance l_ local 2, variable type prefix Prefix DataType -------------------------------------------------- ------------- b_ Boolean blob_ Blob d_ Double date_ Date dec_ Decimal dt_ DateTime i_ Integer l_ Long s_ String t_ Time ui_ Undisgned Int ul_ Undisgned Long tr_ Transaction object do_ dragobject dwc_ DataWindowChild nvo_ NonVisulObject 4, Function name Prefix Scope ------------------------------------------------ --------------- GF_ GLOBAL FUNCTION WF_ WINDOW FUNCTION MF_ MENU Function UF_ USEROBJECT FUNCTION 5. Program annotation requires that each event, function, variable, etc. must be annotated. The ratio of the notes and code should be at least 1: 3. Event, function code opening annotation mode is: / *************************************************** ****************************************** function: parameters: returns: author: Create: 1999.09.21 Modification: 2000.09.21 *************************************************** ************************************************ /
// / // function: of_updatechecks // // access: protected ////rguments: // apo_control [] the array of object for which the checks need to be // performed. /// Returns: integer / / 1 = Updates WERE FOUND // 0 = no changes to update were found // -1 = accepttext error // -2 = updatespend Error Was encountered //-3 = validation error WAS ENCOUNTERED / / / DESCRIPTION: Perform AcceptText, Updatestpending and validation on // the objects. // The role of the code, logic, etc. in front of each program. Each variable requires its function. 6. Naming of objects and Remarks The functions and developers in each object note.
I think this is quite normal: 1. Variable specification 1, prefix (1), scope global: g sharing: S instance: i local (local): L (2), Type B boolean blob Blob d Double num Number date Date dec Decimal dt DateTime i Integer l Long s String t Time ui Undisgned Int ul Undisgned Long tr Transaction Object do dragObject ds DataStore dwc DataWindowChild nvo NonVisulObject tri TreeViewItem lvi 2, the ListViewItem _ English scope type format Significance or abbreviation
The initial copy of the first letter or all uppercase (abbreviation) Note: Cannot be free to define or change global variables
Second, PowerBuilder Object 1, Window W _ Submodule Pinya Code _ Function Or Use (English Significance) 2, Data Window (DataWindow) D_ Sub Module Pinya Code_Function Or Use (English Significance) q_ 模 码 _Function or Use (English significance) 4 Or use (English significance) 6, global function (GLOBAL FUNCTION) GF_ function or use (English meaning) 7, window function (Window function) WF_ function or use (English meaning) 8, menu function (Menu function) MF_ Function or use (English meaning) 9, user object function "UF_ function or use (English meaning) 10, menu (MENU) M_ submodule Pinyin code _ function or use (English meaning) 11, Structure STRU_ Submoduption Pinya Code_Function or Use (English Significance) 12. User Object U_ Submodules Pinya Code_Function Or Use (English Significance) 13, Controls CBX_ Checkbox CB_ CommandButton DW_DATAWINDOW DDLB_ DROPDOWNLISTBOX EM_ EditMask GR_GRAPH GB_GROUPBOX HSB_ HSCROLLBAR LN_LINE LB_LISTBOX MLE_ MULTILINEEDIT OLE_ OLE 2 0 OCX_ OCX OVAL_ OVAL P_ Picture PB_PICTUREBUTTON RB_ RADIOBUTTON R_ Rectangle RR_ RoundRectangle SLE_ SINGLINEEDIT ST_ StaticText UO_ User Object VSB_ vscrollbar
Special note: System fixed button name CB_YES [is (& y)] CB_NO [No (& n)] CB_IGNORE [ignore (& I)] CB_RETRY [Test (& A) CB_ABORT [Termination (& A) CB_OK [OK (& Y)] CB_CANCEL [Cancel (& C)] CB_RETURN [Return (& R)] CB_Close [Off (& X)] CB_PRINT [Print (& P)] CB_PrintPrev [Print Preview (& V)] CB_GEN [Generate (& G)] CB_Query [Query (& Q)] CB_COUNT [& T)] CB_ADD [Add (& A)] CB_INSERT [Insert (& I)] CB_DEL [Delete (& D)] CB_MODIFY [Modification (& M)] CB_SAVE [Save (& S)] CB_SEND [Send (& F)] CB_Audit [Audit (& T)] CB_ABandon [Welcome (& Z)] CB_First [first] or [9] Webdings font CB_NEXT [later one] or [8] webdings fonts CB_PREV [previous] or [7] webdings font CB_END [Total] or [:] WebDings font Third, the PowerBuilder library file contains up to 10 PBL files, including: 1. PowerBuilder Basic Objects (Windows, menus, etc.) used by the child module: Submodule Pinyin code serial number (00 - 09) .pbl - 10 2, the resource files (BMP, ICO, CUR, ANI files) used by the child modules Res. PBL - 1
Fourth, the word PowerBuilder reserved word pre-upper-write embedded SQL statement reserved word all uppercase custom function Note format: Name: Function: Parameters: Logic: Applicable: Programming: Created: 2002.01.01 Modify: 2002.02.01 Version: 1.0 Before the important or complex logic code, the note must be added, the format is as follows: // Comment content - programmer name ... code