A survey report of enhancements to the visitor software design pattern
Article first published online: 7 DEC 2012
Copyright © 2012 John Wiley & Sons, Ltd.
Software: Practice and Experience
How to Cite
Pati, T. and Hill, J. H. (2012), A survey report of enhancements to the visitor software design pattern. Softw: Pract. Exper.. doi: 10.1002/spe.2167
- Article first published online: 7 DEC 2012
- Manuscript Accepted: 27 OCT 2012
- Manuscript Revised: 12 OCT 2012
- Manuscript Received: 25 OCT 2011
- design patterns;
- Visitor pattern;
- extended Visitor patterns;
- alternative Visitor patterns
The Visitor pattern is a behavioral software design pattern where different objects represent an operation to be performed on elements of an object structure. Despite the benefits of the Visitor pattern, its rigid structure has limitations. Owing to the Visitor pattern's usefulness and importance to software design, many researchers have extended and modified the original Visitor pattern to overcome its limitations. Researchers have even replaced the Visitor pattern with more refined design patterns (e.g., Reflective Visitor pattern, Java Walkabout Class, and Dynamic Dispatcher) that bear minimal resemblance to the original Visitor pattern's structure while retaining its major advantages (e.g., ability to add new operations to an object structure without changing the classes of objects, localizing related behavior, and accumulating state). This article therefore provides a comprehensive survey of the Visitor pattern for software practitioners. Within the survey, we focus on major enhancements that have been made to the original Visitor pattern to overcome its limitations. On the basis of our survey results, we found that variations of the Visitor pattern can be separated into two categories: extended Visitor patterns where the original Visitor pattern structure stays intact and alternative Visitor patterns where the structure of the original Visitor pattern is altered. Copyright © 2012 John Wiley & Sons, Ltd.