Effective Visual Basic: How to Improve Your VB/COM+ Applications / Edition 1

Effective Visual Basic: How to Improve Your VB/COM+ Applications / Edition 1

by Joe Hummel, Brian Randell, Ted Pattison, Jason Masterman
     
 

ISBN-10: 0201704765

ISBN-13: 9780201704761

Pub. Date: 06/01/2001

Publisher: Pearson Education

Featuring nearly fifty rules for best practice, Effective Visual Basic gives the working programmer concrete guidelines for designing better systems and writing better code. Whether the focus is COM, databases, or distributed systems using MTS and COM, this book offers proven, timeless solutions derived from the authors’ years of

Overview

Featuring nearly fifty rules for best practice, Effective Visual Basic gives the working programmer concrete guidelines for designing better systems and writing better code. Whether the focus is COM, databases, or distributed systems using MTS and COM, this book offers proven, timeless solutions derived from the authors’ years of experience consulting and training in the VB arena.

Effective Visual Basic addresses general practices, from defensive programming to error handling and object-oriented design. In addition, it covers the critical issues in working with COM: interfaces, compatibility, and class design. Rules for building multi-tier applications are followed by a section on best practices for programming the Web. This book also addresses databases and effective data access, among the most important uses of VB.

Highlights include:

  • Sound programming practices and object-oriented design principles, as applicable in VB.NET as in VB6
  • Writing code that runs correctly in both MTS and COM environments
  • Improving scalability by not necessarily configuring all your components
  • Using XML, IIS, and ASP in Web applications
  • Designing classes for efficient database access
The product of a wealth of practical experience, Effective Visual Basic enables readers to advance their skills and become more effective software developers.

Product Details

ISBN-13:
9780201704761
Publisher:
Pearson Education
Publication date:
06/01/2001
Series:
Developmentor Series
Pages:
320
Product dimensions:
7.40(w) x 9.40(h) x 0.82(d)

Table of Contents

1. Shifting from Liberal Arts to Software Engineering.
Maximize the Potential of VB's Compile-Time Type Checking.
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.
Think in Terms of Interfaces.
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.
Understand the Design of MTS and COM.
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.
Understand the IIS Architecture.
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.
Efficiency Basics: Roundtrips, SQL Statements, and Providers.
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).

Index.

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >