Architect guidelines
MVC
http://msdn.microsoft.com/en-us/magazine/dd942822.aspx
Exception Handling
- Never do a "catch exception and do nothing."
- Do not write try-catch in all your methods
- Use it only if there is a possibility that a specific exception may occur. For example, if you are writing into a file, handle only FileIOException
- Do not write very large try-catch blocks
- If required, write a separate try-catch for each task you perform and enclose only the specific piece of code inside the try-catch. This will help you find which piece of code generated the exception and you can give specific error messages to the user.
Code standards
(ReSharper will help you with most of them)
- Use PascalCasing for class names
- Use PascalCasing for method names
- Use camelCasing for variables and method parameters
- Do not use abbreviations
- Do not use single character variable names
- Do not use underscores (_) in variable names
- File name should match with class name
- Use TAB for indentation
- Do not hardcode numbers. Use constants instead
- Do not hardcode strings. Use resource files
- Comments should be in the same level as the code.
- Curly braces ( {} ) should be in the same level as the code outside the braces
- Use one blank line to separate logical groups of code
- The curly braces should be on a separate line and not in the same line as if, for etc.
- Use a single space before and after each operator and brackets