Suitable for Visual Basic developers of all levels, Visual Basic Design Patterns brings the powerful concept of reusable software patterns to the world's most popular programming language. While C++, Java, and Smalltalk programmers have long had recourse to hundreds of reusable object-oriented designs, this fascinating and very approachable text puts these powerful design concepts into reach for working VB programmers.One of the most important (and popular) computer titles in recent memory, Design Patterns: Elements of Reusable Object-Oriented Software, brought patterns to C++ and Smalltalk programmers in 1995. The goal of Visual Basic Design Patterns is to translate the 23 designs (or patterns) outlined in that influential text into a VB setting.First, Cooper establishes the object-oriented features in Visual Basic 6 and its support for classes and objects. Then it's on to Unified Modeling Language (UML) class diagrams for documenting the "shape" of each pattern. Next comes a tour of the new-and-improved object support in Visual Basic .NET. With the arrival of .NET in 2002, VB became a full-fledged object-oriented language. (Included here is an overview of .NET features and APIs needed to work with basic data types, collections, and files.)The author largely succeeds in making patterns approachable. Using creational patterns like factories and builders, you'll learn how to create objects more flexibly. Structural patterns, like the adapter and composite patterns, show off how classes can relate to one another beyond simple inheritance. Behavioral patterns like the chain of responsibility and interpreter patterns show off how to add more functionality to your VB projects. Illustrated with clear examples, many using built-in features of VB such as controls or other existing classes, Cooper shows that patterns are readily available for most any developer. Several examples make use of employee classes for modeling an organization, and this allows the author to connect some of the material between sections. For each pattern, you'll get VB 6 and VB .NET versions of code (though, of course, VB .NET makes it easier to model classes with inheritance where required).This timely volume arrives just as VB .NET brings Visual Basic to the first rank of object-oriented languages with "true" inheritance and other advanced class design features. Surprisingly enough, inheritance is just the tip of the iceberg when it comes to getting objects to work together. While C++ and Java programmers have made use of the library of patterns presented here to do more with classes, VB programmers can now benefit from the same expertise in a format that is definitely a lot more approachable than the original. If history is any cue, Visual Basic Design Patterns should become as indispensable to VB developers as the original software patterns book was to an earlier generation of developers in other languages. --Richard Dragan Topics covered: Introduction to software design patterns; basic UML diagrams (including inheritance and composition); classes and objects in Visual Basic and VB .NET; object-oriented programming basics; building custom VB user-interface controls; inheritance and interfaces; VB .NET quick start (data types and basic programming tutorial with simple objects); VB .NET APIs for arrays, collections, and file I/O; creational patterns: simple factories, abstract factories, singletons, builder, and prototype patterns; structural patterns: adapters (used with data grids), the bridge pattern, the composite pattern (an employee class hierarchy), the decorator pattern (with ActiveX controls), the façade pattern (used with databases), the flyweight and proxy patterns; behavioral patterns: chain of responsibility (used with a help system), the command pattern (implementing "undo"), the interpreter pattern (for a report language), the iterator pattern (and VB .NET collections), the mediator pattern (used with UI controls), the memento, observer, and state patterns, the strategy pattern (used with graphical plots), the template pattern, and the visitor pattern (used with employee classes).
Read More