The popular design pattern MVC (Model/View/Controller) has an extended cousin MVC-ARS (Action/Representation/State). The added components all live within the database layer and while are not part of the model, they are invoked by it. Details are as follows:
State, as in state machine. This follows the classic state machine pattern. There is a current state which is matched with an event which results in a continue or stop condition and perhaps a state change.
Action, as in the objective of all information technology systems, act on the data. This means our transaction, the CRUD (Create/Read/Update/Delete) of data in the database. This may have been blocked by the state machine.
Representation, as in what data are we sending back that will become the model. The data model and the MVC model are likely very different, relational vs. XML hierarchical for instance. Nothing wrong with that if it is explicit and understood. This is the representation.
Doesn't this extension prevent overloading of the either the model or the controller by a separation of state control, transaction control, and data snapshot?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…