Skip to content

Latest commit

 

History

History
30 lines (22 loc) · 1.48 KB

naming-conventions.md

File metadata and controls

30 lines (22 loc) · 1.48 KB
versionFrom meta.Title meta.Description
7.0.0
Naming Conventions in Umbraco CMS codebase
A guide to coding naming conventions in Umbraco.

Naming conventions

HTML & CSS

  • CSS class names will be .lowercase-hyphenated-names
  • HTML IDs will be camelCasedNames

JavaScript

  • Namespaces: ProperCase/PascalCase
  • Class names: camelCase
  • Method names: camelCase
  • Property names: camelCase
  • Private property names: _camelCase

File names

  • All file names throughout the solution will be ProperCase/PascalCase - this is extremely important for Visual Studio so that the generated class names follow the correct C# naming conventions
  • However, there is one exception to this rule and in v7 the AngularJs project (Umbraco.Web.UI.Client) all files names need to follow the convention for that project which is that all file names are lowercased

C#

When developing new Class Libraries we will be adhering as closely as possible to the official guidelines as proposed by Microsoft https://msdn.microsoft.com/en-us/library/ms229042.aspx

Another good reference is the Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries book by Krzysztof Cwalina and Brad Abrams.

Resharper settings are included with the solution, so developers can cleanup code in a consistent manner.