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. AS3-U3 My PBL is based on the modular division to be involved, I personally think that it is suitable for my development style. :) Other is released after processing each time it is used.
(, Such as: Datastore) Open the PB, open Word, record your changes, you meet and solve the problem (code and document synchronization!) To write annotations, functions, functions, etc. Note PowerBuilder Program Development Specification 1. Name Object Name Name Name Rules (Window) W_Name Menu (MENU) M_Name Object (MENU) UO_NAME Structure (FUNCTION) F_NAME Data Window (Data Window) Common data window drop down 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 radio box (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 controls (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 (TAB) TV_Name Tab Control (TAB) TAB TAB_NAME TABPAGE_NAME Data Window Control (DATAWINDOW) DW_NAME Graphic Control (GRAPH) GR_NAME OLE control OLE_NAME TEU TEL (User Object) UO_NAME Variable Named Variable Type Name Rules Boolean Variable (Boolean) XB_Name Character Variable (CHAR) XC_NAME Date Variable (DATA) XD_NAME Date Time Variable (DataTime) XDT_NAME Different Variables (DECIMAL) XDEC_NAME Double Precision Floating Point Variable (double)
XDOU_NAME Integer XI_Name Long Integer 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 No Symbol Integer Variable (UINT) XUI_NAME No Symbol Long Integer Variable (ULONG) XUL_NAME Description: For the X global variable in the naming rule of the variable (Global Var) x G replace the instance variable (shared var) X replace the local variable (Local var) x with L, 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 Type Variable Global Variable (Global Var) II_NAME Instance Variable (Local Var) LI_NAME 3, Other Name Name Name Rule User Custom Events UE_NAME Window Function (Window Function) WF_NAME My thoughts: multi-purpose package, 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, too large, should be divided, introducing the software development code and documentation, which is easy to maintain, and the software development specification is as follows. 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 generally 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 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 LO Ng TR_ Transaction Object Do_ DragObject DWC_ DataWindowChild NVO_ Nonvisulobject 4, Function Named Prefix Scope -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ----------------------------- GF_ GLOBAL FUNCTION WF_ WINDOW FUNCTION MF_ MENU Function UF_ USEROBJECT FUNCTION V. Program annotation requirements require each event , Functions, variables, etc. must be comments. 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 // // arguments: // apo_control [] the array of object for which the checks need to be // performed. /// Returns: integered. // 1 = Updates WERE FOUND / / 0 = No changes to update were found // -1 = AcceptText error // -2 = UpdatesPending 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), a global: g sharing: S instance: i Local: (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 ListViewItem 2, _ English meaning scope type format Or abbreviations the first letters uppercase uppercase or all uppercase (abbreviation) Note: Cannot define or change the global variable 2, PowerBuilder object 1, window (window) W _ submodule Pinyin code _ function or use (English meaning) 2, data Window (dataWindow) D_ submodule Pinyin code_Function or use (English meaning) 3, query (QUERY) Q_ submodule Pinyin code _ function or use (English meaning) 4, data pipeline P_ submodule Pinyin Code _ function or use (English meaning) 5, function (function) F_ submodule Pinyin code _ function or use (English meaning) 6, global function (global function) GF_ function or use (English meaning) 7, window functions (Window function) WF_ function or use (English significance) 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 significance) 11, structure (Structure) STRU_ sub-module Pinyin code _ function or use (English meaning) 12, user custom object (User Object) ) U_ submodule Pinyin code _ function or use (English meaning) 13, control (controls) CBX_ checkbox CB_ commandbutton dw_ datawindow ddlb_ dropdownloadListBox EM_ EditMask GR_g raph 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_ SingleLineEdit st_ StaticText uo_ User Object vsb_ VscrollBar particular: system fixed button name Cb_Yes [is (& Y )] CB_NO [No (& n)] CB_IGNORE [ignore (& I)] CB_RETRY [Test (& A)] CB_OK [Determine (& Y) CB_CANCEL [Cancel (& C)] CB_RETURN [Return (& R) ] CB_Close [Off (& X)] CB_Print [Print (& P)] CB_PrintPrev [Print Preview (& V)] CB_GEN [Generated (& G)] CB_QUERY [Query (& Q)] CB_COUNT [Statistics (& T)] CB_ADD [Add (& A )] CB_INSERT [Insert (& I)] CB_DEL [Delete (& D)] CB_MODIFY [Modify (& M)] CB_SAVE [Save (& S)] CB_SEND [Send (& "