Solved

coding conventions

Posted on 2001-06-12
5
729 Views
Last Modified: 2008-03-06
dear frineds
Hi!I am sorry  to all of u as i wam writing a question related to dveloper 2000. Can any one help me
as i want the coding conventions for d2k. I am tored of searching through site. ]
u can directly send me on
papsia2000@yahoo.com
thanks
0
Comment
Question by:pushpak
5 Comments
 
LVL 1

Expert Comment

by:hemlatha_rk
Comment Utility
Here is some portion of what we had followed :

Object name      Prefix
--------------------------------
Block            BLK_description
push button      PBT_desciption
text_item        TXT_description
radio button     RBT_description
list item        LST_description
form name        FRM_description
canvas name      CAN_description
window name      WIN_description
LOV              LOV_description
Record group     RGP_description
procedures       SP_description
functions        SF_description
packages         PKG_description

Hope this helps. Best wishes.

0
 

Author Comment

by:pushpak
Comment Utility
dear friend
hi! This coding convention for the controls i will be dropping on the form. I want to name the control thoroughly so as whether it is bin variable or not .
from the name  i should know what are the values the control can take like integer,float,date or varchar etc.
Will it be possible for u to give me a elaborated  codibng convention .
Also the global variable and its scope.

thanks
0
 
LVL 1

Accepted Solution

by:
hemlatha_rk earned 50 total points
Comment Utility
Ok here goes , hope its of help.
Best wishes.

----------------------------------

Variables shall be prefixed with :

lvar_       : local varchar2
lint_       : local integer
lflt_       : local float
ldat_       : local date
lbul_       : local boolean

gvar_       : global varchar2
gint_       : global integer
gflt_       : global float
gdat_       : global date
gbul_       : global boolean

ivar_       : input parameter varchar2
iint_       : input parameter integer
iflt_       : input parameter float
idat_       : input parameter date
ibul_       : input parameter boolean

ovar_       : output parameter varchar2
oint_       : output parameter integer
oflt_       : output parameter float
odat_       : output parameter date
obul_       : output parameter boolean

iovar_       : input output parameter varchar2
ioint_       : input output parameter integer
ioflt_       : input output parameter float
iodat_       : input output parameter date
iobul_       : input output parameter boolean

C_           : cursors

excp_        : user defined exceptions

pltab_       : pl/sql table
rec_         : record type

sp_          : stored procedures
sf_          : stored functions
pkg_         : packages

syn_         : synonyms
vw_          : views
tab_         : tables
seq_         : sequences

For Oracle Forms 4.5  :                                                                                                                                                    
-----------------------                                                                                                                                                    

Base Table Blocks                                                                                                                                    
The block name should be the short name or abbreviations of the base table it uses, followed by an underscore and  'BLK'.                            
When more than 1 block has same table name use sequence number along with the abbreviated table name followed by 'BLK'.                              
Example                                                                                                                                              
 Block with base table 'emp' should be named as 'EMP_BLK'                                                                                            
                                                                                                                                                     
 If there are 2 blocks with same base table Emp then the first block will have the name 'EMP_BLK1' followed by  'EMP_BLK2'.                          
                                                                                                                                                     
Control Blocks                                                                                                                                      
The Control block should always have the name 'CTRL_BLK'.  If there are more than one control block then use a sequence number along with 'CTRL_BLK'
                                                                                                                                                     
Example:                                                                                                                                            
The first control block will have name 'CTRL_BLK1' followed by       'CTRL_BLK2' and so on                                                                
                                                                                                                                                     
                                                                                                                                                     
Base Table Block Fields                                                                                                                              
Fields of base table block will have the same names as table column names.                                                                          
                                                                                                                                                     
Control Block Fields                                                                                                                                
Fields should be prefixed with the field type along with object type followed by '_'.                                                                
                                                                                                                                                     
The field types are as follows:                                                                                                                      
      D       :  For display fields                                                                                                                
      H       :  For hidden fields                                                                                                                
      E      :  For entry fields                                                                                                                  
      L      :  For local variables                                                                                                              
                                                                                                                                                     
Example:   A field MONTH_NO, which is an entry field on a Control Block, should be named as E_MONTH_NO.    


Push button      
Shall be prefixed with  PBT_ in Uppercase and followed by the name.    
 
Text_item      
Shall be prefixed with  TXT_ in Uppercase and followed by the datatype and then by the name.  EG : TXT_VAR_NAME , a text item taking in names in varchar2
the others shall be : TXT_INT_ for integers,TXT_FLT_ for floats,TXT_DAT_ for dates , TXT_CHR_  for characters

Radio button    
Shall be prefixed with  RBT_ in Uppercase and followed by the name.          

List item        
Shall be prefixed with  LST_ in Uppercase and followed by the name.          

Form name        
Shall be prefixed with  FRM_ in Uppercase and followed by the name.          
                                         
                                                                                                                                                     
Visual Attributes                                                                                                                                    
Visual attributes must be prefixed with  'VA_' in Uppercase and followed by the name.                                                                
                                                                                                                                                     
Property Classes                                                                                                                                    
Property Classes must be prefixed with  'PC_' in Uppercase and followed by the name.                                                                
                                                                                                                                                     
Record Groups                                                                                                                                        
Record groups must be prefixed with  'RG_' in Uppercase and followed by the name.                                                                    
                                                                                                                                                     
Canvas-views                                                                                                                                        
Canvas-Views must be prefixed with  'CV_' in Uppercase and followed by the name.                                                                    
                                                                                                                                                     
Windows                                                                                                                                              
Windows must be suffixed with '_WIN' in Uppercase.    


Oracle Reports 2.5

Boilerplate must be prefixed with B_      
Field must be prefixed with F_ and followed by the source item name
Frame must be prefixed with M_      
Repeating Frame      must be prefixed with R_
Formula Column      must be prefixed with CF_      
Group      must be prefixed with G_      
Placeholder Column must be prefixed with CP_      
Query must be prefixed with Q_      
Summary Column must be prefixed with CS_      
User Parameter must be prefixed with RP_      and followed by the column name with which it is associated.
                                                                                               
0
 
LVL 49

Expert Comment

by:DanRollins
Comment Utility
Hi pushpak,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days.  I will suggest to:

    Accept hemlatha_rk's comment(s) as an answer.

pushpak, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will followup.

Please do not accept this comment as an answer!

EXPERTS: Your input for closing recommendations are REQUESTED.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 6

Expert Comment

by:Mindphaser
Comment Utility
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now