Skip to Content
Architectural Patterns
book

Architectural Patterns

by Anupama Murali, Pethuru Raj, Harihara Subramanian J, Pethuru Raj Chelliah
December 2017
Intermediate to advanced
468 pages
13h 12m
English
Packt Publishing
Content preview from Architectural Patterns

Visitor

The visitor pattern represents an operation performed on the objects. It lets us define a new operation without changing the class elements on which it operates. In simple words, we use the visitor class to alter the execution of an algorithm as and when the visitor varies.

>

Here are the benefits:

  • Adding new operations over an object structure is straightforward and easy (by adding a new visitor)
  • Visitor separates unrelated operations and gathers related operations

Impacts are as follows:

  • The visitor class hierarchy can be difficult to maintain when a new concrete element class gets added
  • Implementation often forces to provide public ...
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

Software Architecture Patterns

Software Architecture Patterns

Mark Richards
Design It!

Design It!

Michael Keeling

Publisher Resources

ISBN: 9781787287495Other