实体控制边界和 CEC 模式
我读过这篇文章 http://www. oracle.com/technetwork/issue-archive/2011/11-jan/o11java-195110.html
其中提到了实体控制边界和 CEC 模式。
AFAIK,边界是外观模式,其中 CDI 在某些情况下比 ejb 更好,但 ejb 对于其他情况就足够了。
我读过它,但没有完全理解它。
我知道使用JPA的实体bean(POJO)是模型,视图是jsf/jsp,控制器是servlet。
请求(动作)或组件基础 mvc 的实现是否影响了这种设计模式?
因此,有人能用类和序列图解释每个类的目的/功能吗?
谢谢。
i have reading this article http://www.oracle.com/technetwork/issue-archive/2011/11-jan/o11java-195110.html
which mentioned about Entity Control Boundary and CEC patterns.
AFAIK, the boundary is a facade pattern where CDI is better than ejb in some situation but ejb is enough for other situation.
I have read it and not fully understand it.
I understand that the entity bean(POJO) using JPA is model, view is jsf/jsp , controller is servlet.
Do the implementation of request (action) or component base mvc affected this design pattern ?
Therefore, anyone kind enough to explain the purpose/functionality of each class with class and sequence diagram?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
实体类管理持久数据,例如数据库。
边界类为用户或外部系统提供接口。例如,它可能会显示一个对话框,请求用户提供信息。
控制类封装了用例或用例的一部分的主要逻辑。
边界对象可以产生控制对象,例如处理用户刚刚输入的信息。或者控制对象可以生成边界对象,也许是为了请求信息。但为了便于重用,实体对象不应生成边界或控制对象。
An entity class manages persistent data, for example a database.
A boundary class provides an interface to a user or an external system. For example, it might display a dialog requesting information from a user.
A control class encapsulates the main logic for a use case or part of a use case.
A boundary object could spawn a control object, e.g. to process information that a user has just entered. Or a control object could spawn a boundary object, perhaps to request information. But to ease reuse an entity object should not spawn boundary or control objects.