Link to home
Start Free TrialLog in
Avatar of maryeb
maryeb

asked on

oracle forms - naming conventions

Where can I get a list of naming conventions for oracle forms.

M.
Avatar of jtrifts
jtrifts
Flag of United Kingdom of Great Britain and Northern Ireland image

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
Avatar of dataliberator
dataliberator

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.
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.
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
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
Avatar of maryeb

ASKER

I am looking for a list of naming conventions for objects such as text item, data block, canvas etc.
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
ASKER CERTIFIED SOLUTION
Avatar of stevelynn
stevelynn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial