We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
实际上,UI 控制器和域控制器是最常用的模式。
UI 控制器以 MVC 模式协调对视图的访问。
域控制器协调对域的访问,它被称为服务层(Fowler,我更喜欢)或应用程序层(Evans)。
两者都是间接层(Façade Pattern),用于解耦子系统/层之间的类。它带来了模块化和更好的可维护性(您可以将域交换为远程服务或将视图从 HTML 交换为 Flex,只需更改间接层)
GRASP Controller 似乎是两者的混合体。我建议您仅使用该术语进行分析,而不是用于实施。
希望有帮助!
Actually there's UI Controller and Domain Controller as most used patterns.
UI Controller coordinates access to View, in an MVC pattern.
Domain Controller coordinates access to Domain, and it's called Service Layer (Fowler, which I prefer) or Application Layer (Evans).
Both are indirection layers (Façade Pattern), used to decouple classes between subsystems/layers. It brings modularity and better maintainability (you can swap domain for remote services or swap view from HTML to Flex, and just change the indirection layer)
GRASP Controller appears to be an hybrid of both. I recommend you to use this term only for analysis, not for implementation.
Hope it helps!