Make Assumptions Explicit Via Debug.Assert.
Consider #If When Compile-Time Conditions Differ.
Raise Errors to Signal Exceptional Conditions.
Trap Locally, Act Globally: Effective Error Handling.
Know the Difference Between Type and Class.
Embrace Good Object-Oriented Design, Not Just VB.
Prefer UDTs Over Classes for Value Types.
Automate Mundane Tasks.
2. Designing, Building, and Working with COM-Based Components.
Use Custom Interfaces.
Define Custom Interfaces Separately, Preferably Using IDL.
Avoid the Limitations of Class-Based Events with Custom Call-Backs.
Be Deliberate about Maintaining Compatibility.
Choose the Right COM Activation Technique.
Beware of Class_Terminate.
Model in Terms of Scenarios Instead of Entities.
Avoid Activex EXEs Except for Simple, Small-Scale Needs.
3. MTS, COM, and VB—The Middle Tier.
Don't Use Singletons in MTS and COM.
Know When to Use New versus CreateObject versus GetObjectContext.CreateInstance.
Understand the Real Motivation for SetComplete.
Consider an Auto-Abort Style with Transactions.
Don't Reinvent the DBMS.
Don't Feel Obligated to Configure All Your Components.
Avoid Compiling Things into DLLs that You'll Later Regret.
Best Practices for Porting MTS Code into COM.
BestPractices for Writing Code that Runs on MTS and COM.
4. The Web and VB.
Manage Application State to Maximize Efficiency.
Manage Session State to Maximize Scalability.
Understand the Differences Between DCOM and HTTP.
Write COM Components for Scripting Environments (like ASP).
Understand How Your COM Objects Interact with ASP.
Use XML Instead of Proprietary Data Formats.
Be Deliberate about Presentation vs. Business Logic.
Use XSLT to Move from Data to Presentation.
5. Effective Data Access from VB.
Don't Over-Encapsulate Data Access.
Never Hold Database Connections as Data Members.
Deadlock is Common; Develop Defensively.
Use Firehose Cursors whenever Possible.
Make the Right Data Searching Decision (Avoid SelectSingleNode Abuse).