抽象和外观之间有什么区别? [英] What is the difference between an Abstraction and a Facade?

查看:98
本文介绍了抽象和外观之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

抽象"和外观"之间有什么区别?

What is the difference between an 'Abstraction' and a 'Facade'?

有什么区别吗?还是这些术语可以互换?

Is there a difference at all? Or are the terms interchangeable?

推荐答案

外观模式是与更大,可能更复杂的代码库的简化接口.代码库可以是单个类,也可以是更多类.外墙只是为您提供了一个简单的界面.

The facade pattern is an simplified interface to a larger, possibly more complex code base. The code base may be a single class, or more. The facade just gives you a simple interface to it.

抽象,用于表示一个概念,但并不局限于此任何特定的实例. (即:一个抽象类).这并不意味着要进行简化(就像立面样式一样),而是进行通用"的界面或表示.

Abstraction, is used to represent a concept, but not to be bound to any specific instance. (Ie: An abstract class). This doesn't imply simplifying (like the facade pattern does), but rather making a 'common' interface or representation.

这篇关于抽象和外观之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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