Should I use multiple state machines for a layered protocol?
When implementing a layered communications protocol are layers commonly implemented as state machines?
Should I use the State Design pattern for only two states? Also, what if one object’s state is affected by another state?
If you only have two states for an object, is it worth it to still use the State Design pattern?
Pattern / Architecture to implement State Machine with “steps” between states
I’m looking for some guidance implementing the following problem:
How to return a result from an active object state machine
I frequently use the concept of Active Objects (https://www.state-machine.com/active-object) combined with state machines when designing code. The key idea behind these is that only “events” are fed into (and out of) an object and state machines “react to” these events. This leads to a very different type of design from a sequential program. Whereas a sequential program is designed in a “do this, then this returning some results, then do something with those results, …” an active object/event-based design is “when event A happens do this and emit event B.”
Identifying states when using state machine to validate a form field
Scenario is simple, a password field with few validation rules.