facade 模式和gateway模式的区别
原文:http://stackoverflow.com/questions/4422211/what-is-the-difference-between-facade-and-gateway-design-patterns
Reviewing Facade in the GoF book and the link in another answer to Martin Fowler's Gateway, it appears that their focus is in opposite directions.
Facade provides a simple uniform view of complex internals to (one or more)external clients;
Gateway provides a simple uniform view of external resources to the internals of an application.
This distinction lets us focus on which is more important in a design :
With the Facade, the external system is our customer; it is better to add complexity facing inwards if it makes the external interface simpler.
With the Gateway, the internal system is our customer; give it all the help we can, even if the externals are more complex.
轉載于:https://www.cnblogs.com/davidwang456/p/4087829.html
總結
以上是生活随笔為你收集整理的facade 模式和gateway模式的区别的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java 并发编程第七章:取消和关闭
- 下一篇: spring mvc Dispatche