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

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:

主站蜘蛛池模板: 宁蒗| 格尔木市| 睢宁县| 嘉兴市| 宿松县| 萍乡市| 永定县| 沧源| 桂林市| 彭州市| 砀山县| 巴楚县| 龙井市| 彭阳县| 云浮市| 嘉善县| 新巴尔虎左旗| 拉萨市| 集安市| 福鼎市| 郑州市| 漾濞| 松江区| 新野县| 琼海市| 卢龙县| 南昌县| 光山县| 东明县| 五华县| 永昌县| 郎溪县| 政和县| 儋州市| 德保县| 禹城市| 泾川县| 怀柔区| 页游| 汉沽区| 广东省|