Tag Archive: Design Patterns

Jan 19 2009

Implementing a Generic Iterator with Function Pointers

  Abstract This article describes a powerful technique that exploits my previously outlined innovation – Function Pointers in VB Script – to build a generic mechanism having the capacity of executing components repeatedly: the generic iterator.   Introduction Executing processes repeatedly is a common theme in software development, one that is at the core of …

Continue reading »

Dec 20 2008

Implementing a GUI Layer with Classes

This article describes a powerful technique that exploits Object Oriented Design Patterns, QTP descriptive programming (DP) and the Dictionary object to pack together GUI objects with their corresponding business oriented functions. The article includes a valuable bonus: a highly effective tip that enables to exit a test smoothly, preventing QTP from getting stuck when it fails to identify GUI objects during runtime.

Apr 01 2008

Factory Pattern

This article refers to design patterns, pointers and objects (discussed in the background section of this article), and classes. Make sure you’re familiar with these issues before reading on. It would also be prudent to brush up on the Singleton Pattern. We continue our tour of Design Patterns with another basic pattern – the Factory …

Continue reading »

Apr 01 2008

Singleton Pattern

This article refers to design patterns, pointers and objects (discussed in the background section of this article), and classes. Make sure you’re familiar with these issues before reading on. We begin our exploration of the world of Design Patterns with one of the simplest patterns – the Singleton. The Gang of Four eloquently summarize the …

Continue reading »

Mar 29 2008

Introduction to Design Patterns

This section relays heavily on your familiarity with basic code design concepts and approach. Make sure you read the introduction to code design before proceeding. Parts of the following introduction are rewrites (more accurately downgrades) of the preface to the groundbreaking book Design Patterns: Elements of Reusable Object-Oriented Software, written by the “Gang of four”. …

Continue reading »

Oct 22 2007

Function Pointers in VB Script

Function pointers are used in C and C++ to enable callbacks and as a result, more generic and parsimonious coding. This article shows how to implement function pointers in VB Script using the Scripting.Dictionary object and the Command Wrapper design pattern. It is also shown how to implement “constructor” functions, callbacks and event handlers.