Debian package updates by Jochen Kunkel
[openxpki.git] / www.openxpki.org / trunk / src / htdocs / docs / naming_conventions.html
blob2dd7ca5a5144e2031b619aea030db002ac64f3d7
1 <%attr>
2 title => 'Naming conventions'
3 </%attr>
6 <h1>Naming conventions</h1>
8 <p>
9 OpenXPKI employs a few naming conventions in its code and configuration files:
10 </p>
11 <ul>
12 <li><i>Methods</i> are usually in lower case and separated by an underscore, i.e. <tt>get_chain</tt>.</li>
13 <li><i>Internationalization identifiers</i> always start with <tt>I18N_OPENXPKI</tt> and are all caps seperated by underscores. They indicate the path to the module in which they are used, i.e. if you have an exception in <tt>OpenXPKI::Crypto::Toolkit</tt>, the identifier should start with <tt>I18N_OPENXPKI_CRYPTO_TOOLKIT_</tt>.</li>
14 <li><i>Workflow</i> configuration files only use internationalization identifiers in the type and description, workflow states are short words in capitals, seperated by underscores. Examples are <tt>INITIAL</tt> or <tt>CSR_EXTRACTED</tt>. Workflow activities (which are called actions in the configuration) are short words (usually verbs) in lowercase, such as <tt>extract_csr</tt> or <tt>null</tt>. Workflow conditions and validators use similar conventions. Conditions which have to do with ACLs use the prefix <tt>ACL::</tt> to distinguish them from normal conditions.
15 </ul>
16 </p>
18 Of course, these rules are not set in stone, but make working together a bit easier.