@manhng

Welcome to my blog!

Naming Conventions

July 30, 2019 10:45

Naming Conventions (edit)

https://umbraco.com/products/umbraco-cms/umbraco-7/

https://our.umbraco.com/download/releases/7140

https://www.nuget.org/packages/UmbracoCms/7.14.0

https://www.hanselman.com/blog/HeadlessCMSAndDecoupledCMSInNETCore.aspx

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, in v7 the AngularJs project (Umbraco.Web.UI.Client) all file 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 "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.

Categories

Recent posts