From cc2a2e4bbca786ccdcafd98e0d78a502b7d2cedf Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Fri, 21 Aug 2015 20:13:31 -0700 Subject: [PATCH] chore: add NAMING.md Closes #3787 --- NAMING.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 NAMING.md diff --git a/NAMING.md b/NAMING.md new file mode 100644 index 00000000000..2b70717d587 --- /dev/null +++ b/NAMING.md @@ -0,0 +1,31 @@ +Naming Conventions in Angular2 +--- + +In general Angular2 should follow Java naming conventions. + + +Classes: + - Example: `Compiler`, `ApplicationMetadata` + - Camel case with first letter upper-case + - In general prefer single words. (This is so that when appending `Proto` or `Factory` the class + is still reasonable to work with.) + - Should not end with `Impl` or any other word which describes a specific implemenation of an + interface. + + +Interfaces: + - Follow the same rules as Classes + - Should not have `I` or `Interface` in the name or any other way of identifing it as an interface. + + +Methods and functions: + - Example: `bootstrap`, `ngProbe` + - Should be camel case with first lower case + + +Constants + - Example: `CORE_DIRECTIVES` + - Should be all uppercase with SNAKE_CASE + + +