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

Benefits of business-object pattern usage

Here is a summary of the benefits of the business-object pattern:

  • BOs are responsible for managing their business rules and persistence. This leads to a more reusable code. Clients access BOs that are fully responsible for the behavior of the application. In our example, ProfessorBO can be called from several points. As well as being reusable, there is a uniformity of behavior. As a consequence, another benefit is faster and more efficient maintenance.
  • BOs are responsible for separating the business logic from the rest of the application, which increases the cohesion of the code (separation of responsibilities).
  • BOs help separate business logic from data persistence.

The following is the class diagram for the business-object pattern:

For more complex applications, we typically have a Session Fa?ade that represents a set of related use cases. As we have already seen, the Session Fa?ade offers high-level methods for clients. For its part, the Session Fa?ade can manage and combine BOs that act as real agents or representatives of real-world objects.

The following is the Business Object sequence diagram:

主站蜘蛛池模板: 涡阳县| 定安县| 德州市| 赫章县| 安图县| 丰都县| 岐山县| 顺义区| 望江县| 高陵县| 万年县| 九龙城区| 安阳县| 揭阳市| 甘洛县| 沿河| 陇南市| 株洲市| 清新县| 南乐县| 金溪县| 黑龙江省| 汶上县| 临澧县| 黑河市| 和平区| 昌都县| 沅陵县| 吴桥县| 龙州县| 仙游县| 赞皇县| 崇礼县| 华蓥市| 苏州市| 弥渡县| 鹤壁市| 沙田区| 道孚县| 确山县| 美姑县|