- The Notion of State
- Online Commerce
- States Involved in a Transaction
- Modeling a State
- Getting into a State
- The eCommerce Engine: Bringing All the States Together
- Pattern Extensibility
- Conclusion
States Involved in a Transaction
The user in Figure 1 expects to see the following state transitions when using the ecommerce program:
- Startup in the initial state.
- Moving from the initial state into the purchase state.
- Moving from the purchase state into the exit state.
- Moving from the exit state to the end of the program or back to the initial state.
Figure 2 illustrates some of the possible state transitions.
Figure 2 State transitions in the eCommerce program.
As Figure 2 shows, the program starts in the initial state. Next, it moves into the purchase state and from there into the exit state. As we’ll see, you can make the state transitions as complex as you like. The engine ensures that state transitions are orderly. Also, you can add an arbitrary number of new states just by cloning the code for one of the above states. I’m getting a little ahead of myself here, but you get the picture!