MVC-ARS是否比经典MVC更适合防止重载? [英] Is MVC-ARS preferable to classic MVC to prevent overloading?

查看:77
本文介绍了MVC-ARS是否比经典MVC更适合防止重载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

流行的设计模式MVC(Model / View / Controller)具有扩展表亲MVC-ARS(动作/表示/状态)。所添加的组件都生活在数据库层内,而不是模型的一部分,它们被它调用。详情如下:


  1. 状态如状态机。这遵循经典的状态机模式。目前状态与事件匹配,导致持续或停止状态,也可能状态改变。


  2. 行动,如所有信息技术系统,对数据采取行动。这意味着我们的交易,数据库中的数据的CRUD(创建/读取/更新/删除)。这可能已被状态机阻止。


  3. 表示,就像我们发回的数据将成为模型。数据模型和MVC模型可能非常不同,例如关系与XML分层。没有任何错误,如果它是明确和理解。这是表示。


此扩展是否阻止模型或控制器通过分离来重载的状态控制,事务控制和数据快照?

解决方案

不要低估开发人员混淆您认为的任何保障措施的能力。虽然这些添加的分离可能允许额外的保护,它们是否使其更容易开发?它们使分离容易理解和使用吗?如果没有,开发商就不太可能将其纳入实践。



开发人员往往面向阻力最小。


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?

解决方案

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.

这篇关于MVC-ARS是否比经典MVC更适合防止重载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆