Skip to Content
Visual Basic Design Patterns: VB 6.0 and VB.NET
book

Visual Basic Design Patterns: VB 6.0 and VB.NET

by James W. Cooper
November 2001
Intermediate to advanced
512 pages
9h 10m
English
Addison-Wesley Professional
Content preview from Visual Basic Design Patterns: VB 6.0 and VB.NET

Chapter 31. The Template Method Pattern

The Template Method pattern is a very simple pattern that you will find yourself using frequently. Whenever you write a parent class where you leave one or more of the methods to be implemented by derived classes, you are in essence using the Template pattern. The Template pattern formalizes the idea of defining an algorithm in a class but leaving some of the details to be implemented in subclasses. In other words, if your base class is an abstract class, as often happens in these design patterns, you are using a simple form of the Template pattern.

Since inheritance is a critical part of this pattern, we will develop our Template Method example exclusively in VB7.

Motivation

Templates are so fundamental, you ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming Visual Basic 2008

Programming Visual Basic 2008

Tim Patrick
Visual Basic 2015 Unleashed

Visual Basic 2015 Unleashed

Alessandro Del Sole

Publisher Resources

ISBN: 0201702657Purchase book