Showing posts with label Coding Guidlines. Show all posts
Showing posts with label Coding Guidlines. Show all posts

Programming Guidelines

Sunday, September 20, 2009

Following are the standard programming coding guidelines one should follow while developing the application.
Architecture Guidelines

- We should try to use the multi tier architecture which helps in developing application more feasible.
- We should have database class layer which communicates to the database and helps in support and migration of the DB easily.
- We should use the try-catch block to handle all the database exceptions and we can throw the exception into another layer of the application and do take the proper action.
- We should have group all the utility classes into the separate class assemblies.
ASP.NET Session Guidelines
- We should use session variable only within classes only using System.Web.HttpContext.CurrentSession.
- We should store large object in session which might take more memory if number of users are very high on the application.
- We should use the style sheet for standard look and feel of the web pages.It will be help in consistent look of the application.

Coding Guidlines - Naming Convention

Monday, September 14, 2009

Following are naming conventions one should follow as best practice during the development of the application.
- We should use Pascal case for giving name to Classes. E.g. public class EmployeeDetails
- We should use Pascal case for method names E.g. int EmployeeSalary(int empId) { }
- We should use Camel case for declaring the variables. E.g. int totalSalary = 0;
- We should add the prefix “I” for giving name to interface with Camel Case E.g IEmployeeEntity
- We should not use Hungarian notation for declaring the variables instead we should use came casing. We should not use abbreviations also. E.g. string address and not string add
- We should avoid giving single character name for variable. E.g. i, n.
- We should avoid adding underscore for local or temporary variables.

 
 
 
Your Ad Here