.Net - 会话外观和业务委托之间有什么区别?
目前我的理解是:
Business Delegate - 在表示层中,作为 ASP 组件,为 ASP 视图提供一个接口来访问业务组件,而无需公开其 API,因此减少了两者之间的耦合。
Session Facade - 在业务层,作为com+组件,封装业务对象,为视图访问业务组件提供进程接口。减少耦合,从视图中隐藏复杂的业务组件交互。
那么实际的区别是什么呢?他们看起来和我很相似。。
What I understand so far:
Business Delegate - In the presentation tier, as an ASP component, provides an interface for ASP views to access business components without exposing their API, therefore reducing coupling between the two.
Session Facade - In the business tier, as a com+ component, encapsulates business objects, provides a course grain interface for views to access business components. Reduces coupling, hides complex business component interaction from views.
So what is the actual difference? They seem pretty similar to me..
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
会话外观位于业务层。外观封装了参与工作流的业务对象之间的复杂交互,为客户端提供了粗粒度的服务接口,并处理事务边界。
业务代表驻留在表示层。它用于减少表示层和业务层之间的耦合,并隐藏客户端所有与网络调用相关的复杂性(定位和调用远程组件,处理异常等)。
因此,业务委托和会话外观是相关的并且一起使用(委托和外观之间通常存在一对一的映射),但它们是不同的并且具有不同的动机。
The Session Facade resides on the business-tier. A facade encapsulates complex interactions between business objects participating in a workflow, provides a coarse-grained service interface to clients and takes care of transaction boundaries.
The Business Delegate resides on the presentation-tier. It is used to reduce the coupling between the presentation-tier and the business tier and hides the clients from all the complexity related to network calls (locating and calling the remote component, handling exceptions, etc).
So Business Delegate and Session Facade are related and are used together (there is usually a one-to-one mapping between a delegate and a facade) but they are different and have different motivations.