Skip to content

Coding Standards

Sandesh Kota edited this page Dec 15, 2017 · 2 revisions

GENERAL

  • One Language per File. Ex: Do not include HTML content in Javascript and Javascript content into HTML file
  • SOLID : SRP, OCP, LSP, ISP, DIP
  • DRY : Don't Repeat Yourself
  • YAGNI : You Ain't Gonna Need It

C# CODE:

  • Variable name should be a Property of the object & Function name should be an action
  • Do not catch and eat an exception
  • Minimize throwing Generic Exception (to Zero)
  • Ensure that curly braces are added for if-else, foreach etc..
  • Use Enum / Constant wherever possible
  • Minimize logic in Constructor as the Dependency Injector creates object and calls the constructor.
  • Method name to start with Capital letter

SQL:

  • Remove un-used Constraints

Clone this wiki locally