© Bipin Joshi 2016
Bipin JoshiBeginning SOLID Principles and Design Patterns for ASP.NET Developers10.1007/978-1-4842-1848-8_99. Behavioral Patterns: State, Strategy, Template Method, and Visitor
Bipin Joshi1
(1)301 Pitruchhaya, Thane, India
This chapter will cover the remaining behavioral patterns
, namely state, strategy, template method, and visitor.
The state pattern uses the internal state of an object to alter its behavior. The strategy and template method patterns deal with algorithms.
The strategy pattern allows you to work with a family of algorithms such that the algorithms can be used in an interchangeable manner. The template method defines a skeleton of an algorithm such that one or more steps can be altered.
The visitor pattern is used ...