I have an order management system with the following: Orders, and Items, so each order has a certain number of statues based on some conditions, and also the items have statuses based on some conditions. so the orders and the items statues are changed forward and under strict conditions moved backward to a certain status.
So I decided to use the state pattern to implement those statuses for the items and the orders.
Is my usage for the state pattern is correct? Also if there are too many statues above 12 status, will cause a performance issue, since all statuses should be loaded in the context class constructor?
or there are another approach for loading all statues in the context constructor?
Aucun commentaire:
Enregistrer un commentaire