views:

372

answers:

1

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:

  1. 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.

  2. 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.

  3. 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?

+2  A: 

Never underestimate the ability of a developer to bastardize whatever safeguards you think are in place. While these added separations may allow for additional protection, do they make it easier to develop? Do they make the separations easy to understand and use? If not, the developers are less likely to incorporate them into their practices.

Developers tend to work towards the least resistance.

Matt Brown