Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
351 views
in Technique[技术] by (71.8m points)

model view controller - Is MVC-ARS preferable to classic MVC to prevent overloading?

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...