Friday, March 13, 2009

Web application reviewer need to concentrate

While reviewing the code... Some of the points we need to have it in mind, which I have listed below.

1. Checking for un-used reference
2. Removing unused namespace
3. Have logged all the errors
4. Error page for web application
5. If there is any static variable, note the purpose of it
6. If you find replicated code, try to move it to a separate function
7. Coding-Standard (Camel case – Pascal case)
8. Not to have multiple class in a single file
9. Use built-in C# data type (avoid using System.String instead of string)
10. NameSpace need to be as the Project folder structure
11. Better to implement the design pattern as much as possible
12. Code alignment
13. Covered test case
14. Commented wherever there is some complexity logic
15. Avoid in-line style (use only css classes)
16. Avoid specifying the javascript in the page level, instead of that use js (javascript) file

Some tools to check coding standard and test case.
1. StyleCop (To check the coding standard in the Microsoft standard)
2. Re-sharper (Not free-ware. There is a trail version)
3. N-Unit or MSTest for checking unit test cases
4. FX-Cop for coding standard

Some tools which are all useful for web application:
1. Fiddler (HTTP debugging)
2. FireBug (Analyze a web-page)
3. Codesmith (Not free-ware) – to generate database code automatically with the table schema and also database script.