实体控制边界(ECB)与模型视图控制器(MVC)(Entity Control Boundary (ECB) vs Model View Controller (MVC))

我不确定我是否有正确的概念。

人们告诉我的是

边界=视图

实体=模型

控制=控制器

但是基于我对MVC的了解。 (胖模型,瘦控制器)

不是Boundary = Controller,Control = Model(商业逻辑)和Entity = Model(orm类或类似的实体类,只做crud)。

我可能错了,请指导我!

I'm not sure if i got the right concept.

I was told by people that

Boundary = View

Entity = Model

Control = Controller

however based on my knowledge of MVC. (fat model, thin controller)

Isn't the Boundary = Controller, Control = Model (the busienss logic) and Entity = Model (The orm classes or similar entity classes which does only crud ).

I may be wrong, please guide me!

最满意答案

实际上你的第一个定义是正确的。 词语的含义有时令人困惑。 以下链接确认并总结了这两种模式(将ECB命名为MVC的变体): 实体控制边界模式

Actually your first definition is simply correct. The meaning of words is sometimes confusing. The following link confirms and summarizes both patterns (naming ECB a variant of MVC): The Entity-Control-Boundary Pattern

更多推荐