Book description
Design patterns provide programmers with a convenient way to reuse object-oriented code across projects and between programmers, offering easy, time-saving solutions to commonly recurring problems in software design. A practical guide to writing Visual Basic (VB6 and VB.NET) programs using some of the most common design patterns, Visual Basic Design Patterns is a tutorial for people who want to learn about design patterns and how to use them in their work. This book also provides a convenient way for VB6 programmers to migrate to VB.NET and use its more powerful object-oriented features.
Written from a Visual Basic perspective, this book intends to make you comfortable with using design patterns by laying out the concept of patterns in a practical fashion. Organized as a series of short chapters that each describe a design pattern, Visual Basic Design Patterns provides one or more complete working visual examples of programs using that pattern, along with UML diagrams illustrating how the classes interact. Each example is a visual program that you can run and study on the companion CD making the pattern as concrete as possible. Programmers using this book will see significant improvement in their work by employing the following key concepts:
Applying "tried-and-true" object-oriented design patterns in Visual Basic applications.
Helping advance programming skills with the power of patterns.
Understanding the interactions between classes through the use of UML diagrams.
Getting comfortable using design patterns effectively and start using them in day-to-day Visual Basic programming.
The idea behind design patterns is simple: it's a catalogue of common interactions between objects that programmers have found useful, enabling them to quickly and easily employ them in their programs. Visual Basic Design Patterns provides practical advice on how to use these patterns in everyday programming.
0201702657B07122001
Table of contents
- Copyright
- PREFACE
- ACKNOWLEDGMENTS
-
1. Object-Oriented Programming in VB
- 1. What Are Design Patterns?
- 2. UML Diagrams
-
3. Using Classes and Objects in VB
- A Simple Temperature Conversion Program
- Building a Temperature Class
- Putting the Decisions into the Temperature Class
- Using Classes for Format and Value Conversion
- A String Tokenizer Class
- Classes as Objects
- Class Initialization
- Classes and Properties
- Another Interface Example—The Voltmeter
- A vbFile Class
- Programming Style in Visual Basic
- Summary
- 4. Object-Oriented Programming
- 5. Building Your Own VB Control
- 6. Inheritance and Interfaces
-
7. Introduction to VB.NET
- Syntax Differences in VB.NET
- Variable Declarations and Scoping
- Compiler Options
- Properties in VB6 and VB.NET
- Shorthand Equals Syntax
- Managed Languages and Garbage Collection
- Classes in VB.NET
- Building a VB7 Application
- The Simplest Window Program in VB.NET
- Inheritance
- Constructors
- Drawing and Graphics in VB.NET
- Tooltips and Cursors
- Overloading
- Inheritance
- Namespaces
- Public, Private, and Protected
- Overriding Methods in Derived Classes
- Overloading and Shadowing
- Overriding Windows Controls
- Interfaces
- Summary
- Programs on the CD-ROM
- 8. Arrays, Files, and Exceptions in VB.Net
-
2. Creational Patterns
- 9. The Simple Factory Pattern
- 10. The Factory Method
- 11. The Abstract Factory Pattern
- 12. The Singleton Pattern
- 13. The Builder Pattern
- 14. The Prototype Pattern
-
3. Structural Patterns
- 15. The Adapter Pattern
- 16. The Bridge Pattern
-
17. The Composite Pattern
- An Implementation of a Composite
- Computing Salaries
- The Employee Classes
- The Subords Class
- The Boss Class
- Building the Employee Tree
- Self-Promotion
- Doubly Linked Lists
- Consequences of the Composite Pattern
- A Simple Composite
- Composites in VB
- The Composite in VB.NET
- Other Implementation Issues
- Programs on the CD-ROM
- 18. The Decorator Pattern
-
19. The Façade Pattern
- What Is a Database?
- Getting Data Out of Databases
- Kinds of Databases
- ODBC
- Microsoft Database Connection Strategies
- Database Structure
- Building the Façade Classes
- Building the Stores and Foods Tables
- Building the Price Table
- Summary of the Façade Pattern
- ADO Database Access in VB6
- The ADO DBase Class
- Database Access in VB.NET
- Using ADO.NET
- Adding Rows to Database Tables Using ADO.NET
- Making the VB.NET ADO Façade
- Creating Classes for Each Table
- Storing the Prices
- Loading the Database Tables
- The Final Application
- What Constitutes the Façade?
- Consequences of the Façade
- Programs on the CD-ROM
- 20. The Flyweight Pattern
- 21. The Proxy Pattern
-
4. Behavioral Patterns
- 22. Chain of Responsibility
- 23. The Command Pattern
- 24. The Interpreter Pattern
- 25. The Iterator Pattern
- 26. The Mediator Pattern
- 27. The Memento Pattern
- 28. The Observer Pattern
- 29. The State Pattern
- 30. The Strategy Pattern
- 31. The Template Method Pattern
-
32. The Visitor Pattern
- Motivation
- When to Use the Visitor Pattern
- Sample Code
- Visiting the Classes
- Visiting Several Classes
- Bosses Are Employees, Too
- Catch-All Operations with Visitors
- Double Dispatching
- Why Are We Doing This?
- Traversing a Series of Classes
- Writing a Visitor in VB6
- Consequences of the Visitor Pattern
- Programs on the CD-ROM
- BIBLIOGRAPHY
Product information
- Title: Visual Basic Design Patterns: VB 6.0 and VB.NET
- Author(s):
- Release date: November 2001
- Publisher(s): Addison-Wesley Professional
- ISBN: 9780201702651
You might also like
book
Programming Visual Basic .NET
Programming Visual Basic .NET is the complete guide to application development using Visual Basic .NET. Targeted …
book
Visual Basic Graphics Programming
This Wrox Blox shows you how to add graphics to Visual Basic 2008 applications by explaining …
book
Visual Basic Quickstart Guide
Master software development with Visual Basic, from core concepts to real-world applications, with this comprehensive guide …
book
Migrating to .NET: A Pragmatic Path to Visual Basic .NET, Visual C++ .NET, and ASP.NET
Find out how to migrate your legacy software to the powerful Microsoft .NET framework Provides for …