Java file naming conventions1. Class namingAbstract classes start with abstract or base.The exception class ends with exception.Enum classes use enum as a suffix.The interface that describes the ability uses able as a suffix.The implementation class differs from the interface with the suffix impl.Data
Category: Cake Tags: cake chinese document 4,312 people browse
Cake's naming conventions are quite important, and follow the naming conventions of the cake framework to get the various features built into the framework. After the release of CakePHP2, the naming convention do
inline function is shorter, it is placed directly in the. h. If your code is long, you can put it in a file that ends in-inl.h. For classes that contain a large number of inline code, there can be three files: url_table.h // The class declaration.url_table.cc // The class definition.url_table-inl.h // Inline functions that include lots of code.??3. Type namingType name each word starts with an upper
preferred instead. The new code should use the constant style as preferentially as possible. But the old code doesn't have to switch to a constant style unless the macro style does produce a compile-time problem.6.9. Macro namingTipYou're not going to: Ref: Use macro , right? If you must use, name it like this: MY_MACRO_THAT_SCARES_SMALL_CHILDREN .Reference: Ref: preprocessing macros ; Macros should not normally be used. If it has to be used, its name is all capitalized as the enumeration name,
the word "on". For example: "_ontimer ()", "OnExit ()"Third, variableVariables are the most frequently used identifiers in a program, and the naming conventions of variables are the most important part of a set of C + + naming conventions:1. Name: The variable name consists of the scope prefix + type prefix + one or m
), popo (pop), icon, note, btn, txt, iblock, window (win), tips, etc.The shorter the name of ID and class, the better, as long as it is sufficient to express its meaning. This helps both understanding and code efficiency.
/* Not recommended */# navigation {}. Recognition {}
/* Recommended */# nav {}. author {}
The Type selector avoids the use of tags, IDs, and classes as the positioning element selector. In terms of performance, the hierarchy of t
word should be capitalized such as Testpage, and if the class name contains a word abbreviation, each letter of the word should be capitalized, such as: Xmlexample, One more naming technique is that because a class is designed to represent an object, you should choose a noun when you name the class.Example: Graphics,myfirstclassName of the method (lowercase firs
The Hungarian nomenclature is a naming convention when programming. The basic principle is: variable name = attribute + Type + object description. Each object's name requires a clear meaning and can take the full name of the object or part of the name. Naming is based on the principle that easy memory is easy to understand. The naming
Reference, to be viewed
Naming Conventions for. Net/C # ProjectsMartin Zahn, akadia AG, 2018.3.2003
The original of this document was developed by the Microsoft Special Interest Group. We made some Addons.
This document explains the naming conventions that shoshould be used with. Net pr
equals (Object obj) {if (this = = obj)return true;if (! (obj instanceof channelbinding))return false;Channelbinding cb = (channelbinding) obj;Return Arrays.equals (AppData, cb.appdata);}}Iv. Other written specifications4.1 Code for writing JSP page names1. All use lowercase English characters and "_" composition.2. The whole takes the form of module name + operation. such as: user_view.jsp3. The JSP page corresponds to the action's meaning as much as possible, such as the userlistaction counter
context;2.4 Method naming rules1. Use a word or word combination that matches the meaning of the problem domain. The first word is lowercase, each subsequent word is capitalized in the first letter, and the rest is lowercase (except for special words such as URLs), no special reason to use underscores as separators2. Naming attribute methods in Java follows the JavaBean standard:1) Getter method: get+ attr
letter is lowercase, for example, string myaddress; is not public.
Pascal naming: Also called Pascal naming. Naming rules for uppercase letters. For example, string myaddress;
. Net naming rules:
In. NET programming, the combination of camel and Pascal naming method is ge
: Xmlexample, One more naming technique is that because a class is designed to represent an object, you should choose a noun when you name the class.For example: GraphicsName of Method (first letter lowercase, letter start uppercase)The first word of the name of the method should begin with a lowercase letter, and the following words begin with a capital letter.Example: DrawImageName of the constant (all up
addition, there are some agreed idiomatic English word abbreviations, such as internationalization->i18n;
Do not use abbreviations in the program, unless the abbreviation is customary.
Naming conventions:
Package (packages): Use the anti-domain naming rules, all using lowercase letters. The first level of the package name is the top-level domain nam
Naming conventionsThe most important consistency rule is naming management. The naming style quickly learns what the name represents: type? Variable? Function? Constant? Macro...? You don't even need to find a type declaration. The pattern matching engine in our brains can handle these naming
long names (less than 15 letters for normal selection)
6, avoid the use of similar names, or just the case of different names
7. Avoid using underscores (except static constants, etc.)
2. Identifier type description1. Naming of packages (package)The package name should be in full English descriptors, which are made up of a lowercase word. And the prefix of the package name is always a top-level domain,Usually com, edu, gov, mil, net, org
Java Naming conventions: some details
any language is used to communicate, has its own set of writing standards, Java is no exception. There are several benefits to focusing on these details:
A good naming convention makes it easier for people to understand and maintain a written program. Of course it's easy to understand, so you can expand later.
: Xmlexample, One more naming technique is that because a class is designed to represent an object, you should choose a noun when you name the class.For example: GraphicsName of method (first letter lowercase, letter start uppercase)The first word of the name of the method should begin with a lowercase letter, and the following words begin with a capital letter.Example: DrawImageName of the constant (all up
: Xmlexample, One more naming technique is that because a class is designed to represent an object, you should choose a noun when you name the class.For example: GraphicsName of method (first letter lowercase, letter start uppercase)The first word of the name of the method should begin with a lowercase letter, and the following words begin with a capital letter.Example: DrawImageName of the constant (all up
: Xmlexample, One more naming technique is that because a class is designed to represent an object, you should choose a noun when you name the class.For example: GraphicsName of method (first letter lowercase, letter start uppercase)The first word of the name of the method should begin with a lowercase letter, and the following words begin with a capital letter.Example: DrawImageName of the constant (all up
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.