关于立面层 [英] Regarding Facade Layer

查看:86
本文介绍了关于立面层的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我们正在遵循具有表示,外观,业务和数据访问层的分层体系结构.

最初,我们的业务层是一个单独的dll,而外观层(还是1个dll)充当表示层的接口.

由于业务层具有许多相关和不相关的组件,因此我们决定将业务层拆分为4个不同的dll.

我的问题是:

1.在业务层中具有多个dll时,可以具有单个立面层(dll).
2.我们是否应该为每个业务dll都有一个Facade dll(layer).
3.这两种情况对性能都有什么影响.

关于

Hi,

We are following a layered architecture with presentation,facade,business and data access layer.

Initially our busisness layer was one single dll and facade layer(again 1 dll) was acting as an interface for presentation layer.

As business layer had many related and unrelated components , we decided to break business layer to 4 different dll''s.

My Question is :

1.With having multiple dll in business layer is it ok to have a single facade layer(dll).
2.Should we have a facade dll(layer) for each of the business dll''s.
3.What is the effect on the performance in both the cases.

Regards

推荐答案

外观模式非常适合希望简化一个代码块与另一个代码块一起使用的情况.在这种情况下,您的表示层和您的业务逻辑.

除了库中的潜在的小的几乎无法察觉的打击外,当库在同一台计算机上运行并执行相同的任务时,应该没有任何区别.

干杯.
The facade pattern is ideal for situations where you want to make it easier for one block of code to work with another block of code. In this case, your presentation layer and your business logic.

Other than potentially a small almost imperceivable hit on load, there should be no difference when the libraries are running on the same machine and performing the same tasks.

Cheers.


这篇关于关于立面层的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆