Hierachical Finite State Machines
In this post I talk about hierarchical state machines and present a simple implementation, based on the state pattern. It is by no means a comprehensive explanation, and I skim...
In this post I talk about hierarchical state machines and present a simple implementation, based on the state pattern. It is by no means a comprehensive explanation, and I skim...
In a previous article I wrote about the ubiquitous observer pattern, which is all about objects (called observers or listeners) that need to be notified when other objects in the...
The Strategy design pattern is a perfect example of the OOP tenet that says: “favor composition over inheritance”. Inheritance is indeed powerful when it comes to code reuse, or when...
Many systems wait continuously for the occurrence of some event, and they react to the event by performing computations or changing their state. Once the event is handled, they go...
According to the GoF book, the intent of the Composite pattern is to “compose objects into tree structures to represent part-whole hierarchies. Composite lets clients treat individual objects and compositions...
The Observer Pattern According to the GoF book the Observer pattern “defines a one to many dependency between objects so that when one object changes state, all its dependents are...
The Command Pattern The Gang of Four’s book gives the following definition of the command pattern: “The Command pattern encapsulates a request as an object, letting you parameterize clients with...