Wednesday, December 29, 2010

Developer Golden Rules

Below are some golden rules for the developer based on my experience with .Net Framework:

· Avoid shared members

· Avoid public variables in classes, always use properties

· Avoid db queries within the loop, always use batch insert, update …

· Avoid raising event on web applications

· Avoid unhandled exceptions

· Avoid MORE handled exceptions with empty catch, it is morphine!

· Avoid imports namespace; try to use fully qualified namespace: system.Lib.Lab.object

· Avoid (or never use) queries in GUI layer, always use BLL for queries

· Respect naming convention for variables and methods, CamelCase for variables (ActiveVar) , and lowerCamelCase for GUI objects (txtUsername), and _VarName for property local variables

· Avoid using modules; it is always reserved for system Architect

· Avoid String manipulation “Bla” & “Foo” always use StringBuilder or String.Format

· Avoid String comparison without .ToLower, make sure the Str has value ( If Not String.IsEmptyOrNull() AndAlso S=”..”)

· Avoid using AJAX without handling OnFailure requests

· Avoid Plaintext with AJAX, always use JSON response for AJAX Requests.

· Avoid Using Stream.ReadToEnd, always read buffer/buffer

Avoid does not mean DO NOT USE: Standard = 98xStandard + 2xUnstandard

2 comments:

Anonymous said...

토토 토 토토 토 잜어토 토 토욌 188bet 188bet dafabet dafabet ミスティーノ ミスティーノ 12bet 12bet william hill william hill 메리트 카지노 주소 메리트 카지노 주소 67 All You Need To Know About 튀먹튀 검증 소 검증 먹튀 검증 소 검증 소 검증 소 검먹튀 검먹튀 검먹튀 검증 소 검먹튀 검먹튀 검먹튀 검먹튀

garetsabharwal said...

How to get to WynnBET via airport at this - JTA Hub
Directions to 안동 출장샵 WynnBET via airport at 남원 출장마사지 this time from JT Hub: 남원 출장샵 $0.50 per person (USD). Select the shuttle available (USD) and receive 충주 출장마사지 a 논산 출장샵