我是靠谱客的博主 高高大树,最近开发中收集的这篇文章主要介绍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模式的区别的全部内容,希望文章能够帮你解决facade 模式和gateway模式的区别所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(53)

评论列表共有 0 条评论

立即
投稿
返回
顶部