How to implement the state architectural pattern

Define and maintain a state machine within an object-oriented software system.

By Allen Holub
February 28, 2017
Washing machine Washing machine (source: Kratol)

The State pattern is a convenient way to implement a state machine that’s more maintainable than a typical switch-statements-in-multiple-places implementation. In this video segment, Allen Holub explains how the individual methods of objects will change behavior based on the specific state that an object is in.

Learn more from Allen Holub in-person by attending his Designing Modular Architecture two-day training course at the O’Reilly Software Architecture Conference in New York.

Learn faster. Dig deeper. See farther.

Join the O'Reilly online learning platform. Get a free trial today and find answers on the fly, or master something new and useful.

Learn more
Post topics: Software Architecture
Share: