His contacts:: website: dotNetTips.com, email: dotNetDave@live.com, twitter: @realdonetdave
His tips for writing good code:
* Layer your code. Typical layers: Data, Business, Communications, UI
* Design for occasional internet connection. Why can't I post on Facebook when I don't have a connection?
* Make your app faster. Cache long running reports, use cloud based region data centers. Make "chunky not chatty" calls over the net. (Visual Studio 2015 will make performance issue better)
* Most of your code should be in portable dlls. Only code in client app loads data and interacts with the user.
* Check out IntelliTests in VS 2015.
* 3 Pillars of Object Oriented Programming: Encapsulation, Inheritance, Polymorphism
* Only application should log errors, not the dlls.
* Exceptions and Event Logging. His open source logging utility to fix the problems in .Net's trace logging: dotNetTips.Utility.Logging. Log Severity, Category, CLR version, free physical memory, virtual, OS.
* Internationalization string birthDate = p1.BirthDate.ToString(CultureInfo.CurrentCulture);
* Introduction to Localization and Globalization in .NET by Jeremy Clark on pluralsight.com
* Store format string in Properties.Resources.UserInfoFormat "birthday:{0}, name: {1}"
* Use Strong Naming to prevent spoofing
* David Recommends CodeItRight which finds and fixes errors.
* Use code obsfication, but not the free microsoft one, but buy a commercial obsficator.
* Stop the copy and paste nightmare
* Use code analysis e.g., FXCop
* Use application profiling for memory and performance
No comments:
Post a Comment