各种控制器类、实体和实体之间的导航可见性DAO 的
A quick search for the Boundary Control Entity Pattern gives this
(source: pearce at www.cs.sjsu.edu)
So I suppose Controllers can "talk" with other entities. But can controllers talk to each other? Or other DAO's? Is the below right?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
边界控制实体模式是 MVC 模式的变体。通常,在 MVC 模式中,控制器之间不进行通信。如果应重用某些代码,则应向应用程序添加额外的层,并应将共享逻辑放在那里。
虽然这个例子说控制器可以相互通信,但我认为这不是一个好主意:
http://epf.eclipse.org/wikis/abrd/core.tech.common.extend_supp/guidances/guidelines/entity_control_boundary_pattern_C4047897.html
我建议避免控制器到控制器的通信。
Boundary Control Entity Pattern is a variation of MVC pattern. Usually, in MVC pattern controllers do not communicate with each other. If some code should be reused, additional layer is added to the app and shared logic should be put there.
Although this example says that controllers could communicate with each other, I don't think this is a good idea:
http://epf.eclipse.org/wikis/abrd/core.tech.common.extend_supp/guidances/guidelines/entity_control_boundary_pattern_C4047897.html
I'd suggest to avoid controller-to-controller communication.