且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么在EJB中使用facade模式?

更新时间:2023-11-13 23:51:34

ul>

  • 避免客户端和

  • 减少细粒度的方法调用,导致通过网络最小化方法调用调用,为客户端提供粗粒度的访问。

  • 可以集中安全交易限制。

  • 更大的灵活性应付变更的能力。

  • 仅显示必要的&为客户提供更简单的界面,隐藏底层复杂性和内部细节,业务组件之间的相互依赖关系。

    • Avoiding tight coupling between the client & the business objects, increasing manageability.
    • Reducing fine-grained method invocations, leads to minimize method invocation calls over the network, providing coarse-grained access to clients.
    • Can have centralized security & transaction constraints.
    • Greater flexibility & ability to cope with changes.
    • Exposing only required & providing simpler interface to the clients, hiding the underlying complexity and inner details, interdependencies between business components.