Solved

oracle forms - naming conventions

Posted on 2001-08-10
8
1,091 Views
Last Modified: 2012-08-13
Where can I get a list of naming conventions for oracle forms.

M.
0
Comment
Question by:maryeb
8 Comments
 
LVL 4

Expert Comment

by:jtrifts
Comment Utility
what do you mean?
you can name program units, forms, blocks, items, windows, etc. whatever you want.

Can you be more specific in terms of what objects you are referring to?

JT
0
 

Expert Comment

by:dataliberator
Comment Utility
Generally, its 2 letters underscore, name......
eg,

List Item for course details would be:   li_course_details,
text item:  ti_xxxxxxx
etc, etc.... you get the jist.... I'll try and get you a proper list from Oracle though.......

~Liberator.
0
 

Expert Comment

by:stevelynn
Comment Utility
I used information from Oracle's internal development standards for Oracle Apps and it was pretty helpful.  If you have access to metalink, you can find the documentation at:

http://metalink.oracle.com/metalink/plsql/showdoc?db=NOT&id=66926.1&blackframe=0


You can also go directly to the Oracle Applications Developer?s Guide at:

http://metalink.oracle.com/cgi-bin/cr/getfile_cr.cgi?276482

Or, go to the Oracle Applications User Interface Standards
for Forms?Based Products at:

http://metalink.oracle.com/cgi-bin/cr/getfile_cr.cgi?276483

If nothing else, it will give you a behind the scenes look at how Oracle develops its apps.
0
 
LVL 4

Expert Comment

by:jtrifts
Comment Utility
Mr. Liberator,

As you're new here...just a little peice of friendly info...

THe general etiquette of E-E works like this:
You do NOT post answers, unless you are 100% sure that your answer provides a 100% top grade response and covers all relevant issues and aspects pertaining to the question.

Otherwise you post your input as a comment.  The reason is twofold (mainly):
1) It means that the question asker can evaluate all comments before selecting the best one as the "answer"; but more importantly,
2) it keeps the question open to all other experts.

Once an answer has been posted, whether a great answer or not, it locks the question until the answer is evaluated by the asker.  This way nobody ele contributes, and the asker must reject the answer if s/he wants anyone else to provide input.

Take a look at the general way in which the discussions for each question flow...notice that people (especially those who have been members of the site for a long time) only input comments...

Regards,

JT
0
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.

 
LVL 4

Expert Comment

by:jtrifts
Comment Utility
Please do one of the following:
1) request for more information
2) provide more information
3) accept a comment as an answer
4) delete the question
5) contact community support and ask them to delete the question
0
 

Author Comment

by:maryeb
Comment Utility
I am looking for a list of naming conventions for objects such as text item, data block, canvas etc.
0
 
LVL 4

Expert Comment

by:jtrifts
Comment Utility
Hi Mary,

I'd like a bit of clarification here...do you mean:
1) what does ORACLE use as default naming conventions when you create new forms, blocks, items, etc.; or
2) what is a good set of naming conventions for forms, blocks, items, etc. that people use when they develop using forms?

For 1) Oracle uses the following:
At the FORM level, Oracle defaults naming to MODULE1, MODULE2...MODULEnn.
At the BLOCK level, Oracle defaults to BLCOK2, BLOCK3...BLOCKnn.
At the ITEM level, the same convention applies: ITEM3, ITEM4...ITEMnn.

Typically you'll find that if you create a new form, it will be MODULE1, the first block you create is often BLOCK2, while the first manually created item is ITEM3, then the first canvas might be CANVAS4.

The same goes for most Oracle objects including record groups, LOVs, canvases, windows, etc.

However the naming conventions used in development projects are often set by the technical leads and specific to the project, company or individual.  They often depend on who and how the individuals have been taught(by).

For example, you'll see that Java developers might name a function GetContractId, whereas an Oracle developer is more likely to call the same function get_contract_id.

Naming conventions I use include:

FORM: First two letters indicate project, next three indicate the type of form or component, then 3 number values indicating the for number.  E.G. IFACC001 is the first accounting form developed for the "IF..." (a client of ours) software.

BLOCK: I usually name the block as the same name as the table or view you are referencing.  If it is a control block, then I use a meaningful name that follows the same naming convention format that would be used for nameing tables and or views.

ITEM: Again, I usually simply call an item the same name as the field it references on the database.  Again if it is in a control block, or a non-base table item, I typically appeand the suffux _nbt to the end of the name to indicate non-base-table.

TRIGGERS: are specifically named by ORACLE.  Do not change them.

Functions/Procedures: Again, a meaningful name is important.  Some people I work with like to prefix all functions wit "f_" and name procedures with a prefix of "p_".

Realistically, it is not the specific convention you use that is important, rather that you use one convention and everybody follows it.  That way it makes it easier to read the code, find particlar bits of code quickly, and generally makes maintenance easier.

To give you an real life example, I have now taken ownership of a package of code that is used for invoicing clients.  Then naming convention used does not follow our company standards, and in terms of "informative naming" it is abhorrent.  The developer used the variable "ref" in about 20 different contexts depending on the procedure or function he was in, and I'm still trying to figure out what v_intermediate_forward means!!!

Also, lots of people like to use the following:
- variables prefixed with v_
- cursor variables/cursor parameters prefixed with cv_
- cursors prefixed with c_
- exceptiions prefixed with e_

You should also have agreements at a project or company scale for naming where abbreviations are required.  For example when number is abbreviated, do you use _num or _no? Should you use _code, or _cd or _id?

From my point of view, the most important thing is that everybody follows the same standards (otherwise it isn't really a standard now is it?)

To follow from this, coding style is important too.
This includes naming conventions, order of declaration (e.g cursors first, then variables, then exception handlers), whether you use alpabetical order for decalring your variables...
...use of indentation, UPPERCASE, carriage returns.

...and the big one USE OF (INLINE/INCODE) COMMENTS!!!

These are the sorts of things you need to think about...and when it comes to initiating a project, this is NOT a trivial task, nor should developers take it lightly.  While everyone has their own style, this should be tempered with implemented standards that EVERYONE must follow.

HTH,

JT
0
 

Accepted Solution

by:
stevelynn earned 2 total points
Comment Utility
In the Oracle Applications Developer?s Guide at:

http://metalink.oracle.com/cgi-bin/cr/getfile_cr.cgi?276482

Oracle devotes chapter 31 to Naming Conventions.  As I said earlier, I found it helpful, and the chapter cannot be easily summarized here.

This authoritative manual is extremely helpful for Forms development standards.  Of course, it's only one organization's set of standards (Oracle's), but it's pretty thorough and logical.

Good Luck,
Steve Lynn
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

Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

772 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

14 Experts available now in Live!

Get 1:1 Help Now