You are previewing Practical Standards for Microsoft® Visual Basic® .NET, Second Edition.
O'Reilly logo
Practical Standards for Microsoft® Visual Basic® .NET, Second Edition

Book Description

Create killer applications using best practices for Visual Basic .NET!

The same attributes that make Visual Basic .NET exceptionally productive and easy to use can also lead to unexpected problems, especially when you upgrade. Using standardized programming techniques can help you solve those problems so you can exploit all the power of rapid development—without creating hidden land mines in performance and maintainability. This book shows you proven practices to help you eliminate "voodoo" variables, create interfaces that make users more productive, write self-documenting code, simplify code modifications, and more. Each chapter illustrates common pitfalls and practical solutions with code samples—many from real-world projects. Whether you're writing just a few lines of code or working with a team to build an enterprise application, you'll learn how to use practical standards to develop better, more reliable code for every process.

Table of Contents

  1. Copyright
  2. Dedication
  3. Introduction
  4. Design
    1. Creating Object and Project Templates
      1. Using Object Templates
      2. Using Project Templates
      3. Directives
    2. Designing Modules and Procedures
      1. Create Modules That Have Strong Cohesion
      2. Create Loosely Coupled, Highly Specialized Procedures
      3. Directives
  5. Conventions
    1. Naming Conventions
      1. Hungarian Notation
      2. When Not to Use Hungarian Notation
      3. Denoting a Variable’s Data Type
      4. Denoting a Variable’s Scope
      5. Other Object Prefixes
    2. Using Constants and Enumerations
      1. Using Constants
      2. Using Enumerations
      3. Directives
    3. Variables
      1. Directives
  6. Coding Constructs
    1. Formatting Code
      1. Directives
    2. Commenting Code
      1. Directives
    3. Looping Structures
      1. Directives
    4. Controlling Code Flow
      1. Directives
    5. Exception Handling
      1. The Exception Object
      2. Types of Exception Handlers
      3. Writing an Exception Handler by Using Try...Catch...Finally
      4. Central Exception Handlers
      5. Directives
  7. Advanced Programming
    1. Programming Objects
      1. What Is an Object?
      2. Garbage Collection
      3. Directives
    2. File Operations
      1. System.IO
      2. System.IO.Path
      3. System.Environment
      4. Directives
    3. Debugging
      1. Visual Basic 6 to Visual Basic .NET
      2. Conditional Compilation
      3. Breakpoints
      4. The Visual Basic .NET Debugging Windows
      5. Directives
  8. User Interaction
    1. Interface Design
      1. The Necessity of Consistent Interface Design
      2. Directives
    2. User Input and Notification
      1. User Input
      2. Notifications
      3. Directives
    3. Distributing Solutions
      1. Preparing Your Project for Distribution
      2. Creating a Custom Setup Program
      3. Directives
  9. Team Projects
    1. Version Control
      1. Understanding Assemblies
      2. Directives
    2. Source Code Control
      1. Identifying the Challenges of Team Development
      2. Understanding Visual SourceSafe
      3. Setting Up Visual SourceSafe
      4. Visual Basic Projects and Visual SourceSafe
  10. About the Author