SmartClient .NET - Coding Standards

The following coding standards should be applied for when contributing source to the project. 

  1. Try to always remain consistent with the .NET Framework guidelines in regards to:
  2. Keep code as simple as possible - avoid things like ternary operators.
  3. Folder heirarchies should match that of the namespace.
  4. Provide only one class per file.
  5. Always use {} even for a single line of code.
  6. Use default tabs for indenting (4 spaces in length.)
  7. In order to prevent a holy way (which I've seen this cause)... Use either the K&R or GNU style for {} formatting.  (I personally use the latter.)  We can always get a beautifier someday!
  8. Avoid magic numbers! Use enums or constants whenever possible.
  9. Namespaces should always begin with "SmartClient"
  10. Finally, always include the license header in every source file:

/* SmartClient.NET - A .NET application update framework
 * Copyright (C) 2002-2003 Kristofer Goss
 * The contents of this file are subject to the Mozilla Public License
 * Version 1.1 (the "License"); you may not use this file except in
 * compliance with the License. You may obtain a copy of the License
 * at
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
 * the License for the specificlanguage governing rights and limitations
 * under the License. 
 * Kristofer Goss (