官术网_书友最值得收藏!

Summary

In this chapter, we explored the fact that the main objective of the Business Delegate is to hide the details of service implementations from the presentation tier. We have also seen that, in some situations, its use has been replaced by CDI technology (this technology is responsible for injecting components into a typesafe way application, such as injecting an EJB component), but we believe that this is not enough. The Business Delegate is still widely used in the treatment of more technical exceptions—for example, when it has remote EJB calls. In addition, the delegate protects the presentation tier from possible changes in the service layer, and conversely, when there are types of clients other than a web browser, using a delegate makes it easier for these new clients to access services.

Session Fa?ade centralizes business logic without exposing complex interactions that involve business objects to the client side. In addition, Session Fa?ade encapsulates business-tier components and exposes coarse-grained services to both local and remote clients. Consequently, the clients access a Session Fa?ade instead of directly accessing the business components. Some services, such as transaction-control or security-management, are addressed using Session Fa?ade implementations, such as EJBs.

The business-object pattern must be used whenever an application presents a high level of complexity. This may include when the representation of real-world objects cannot be translated merely as a data-model object, and there is, therefore, a need for reusability and uniformity in business solutions. Aside from reusability, the immediate benefit of this includes efficient code maintenance and a rich cohesion between layers caused by the separation of responsibilities. This is because the business objects separate business logic and persistence from the rest of the application.

主站蜘蛛池模板: 南郑县| 鄂托克旗| 吕梁市| 宁晋县| 巨野县| 黄骅市| 高密市| 洛宁县| 平塘县| 雷波县| 宣恩县| 奎屯市| 高陵县| 甘谷县| 宜君县| 正阳县| 慈利县| 建平县| 三原县| 女性| 遂平县| 神木县| 顺义区| 巢湖市| 柳江县| 蓬安县| 星子县| 西峡县| 浪卡子县| 曲沃县| 康乐县| 任丘市| 区。| 乌拉特后旗| 南乐县| 扬中市| 卓资县| 根河市| 新建县| 黔东| 陕西省|