Solved

coding conventions

Posted on 2001-06-12
5
735 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 1

Expert Comment

by:hemlatha_rk
ID: 6184746
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
ID: 6184987
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
ID: 6185696
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
ID: 7061195
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
ID: 7084839
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

728 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