什么是界面膨胀?
有人可以向我解释一下 OOP 中的接口膨胀是什么(最好有一个例子)。
Can someone explain to me what interface bloat in OOP is (preferably with an example).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
有人可以向我解释一下 OOP 中的接口膨胀是什么(最好有一个例子)。
Can someone explain to me what interface bloat in OOP is (preferably with an example).
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(7)
天哪,
假设您指的是 API 而不是 GUI,对我来说,I/F 膨胀可能会以多种方式发生。
为了帮助解决这个问题,您可以:
华泰
G'day,
Assuming you mean API and not GUI, for me I/F bloat can happen in several ways.
To help with this you can:
HTH
想象一下 OO 语言,其中所有方法都在 Object 中定义,即使它们仅对某些子类有意义。这将是最极端的例子。
Think of an OO language where all methods are defined in Object, even though they are only meaningful for some subclasses. That would be the most extreme example.
大多数微软产品?
界面膨胀是指屏幕上同时显示太多内容,特别是很少使用或功能混乱的元素。描述界面膨胀的一个更简单的方法可能是查看没有它的东西,尝试 37signals 的 Basecamp。标题中只有几个选项卡和几个链接。
界面膨胀可以通过可折叠窗格(例如使用 JavaScript)或隐藏不常用选项直到需要时的向下钻取菜单来解决。
Most Microsoft products?
Interface bloat is having too much on the screen at once, particularly elements that are little used, or are confusing in their function. Probably an easier way to describe interface bloat is to look at something that does not have it, try Basecamp from 37signals. There are only a few tabs, and a few links in the header.
Interface bloat can be remedied by collapsable panes (using Javascript, for example), or drill-down menus that hide less-often used choices until they are needed.
界面膨胀是指逐渐添加元素,将原本简单、优雅的界面变成布满按钮、菜单、选项等的界面,破坏了应用程序原有的凝聚力。我想到的一个例子是 iTunes。在它的早期版本中,它非常简单,但随着时间的推移,添加了很多可能被认为是臃肿的功能(iTunes DJ、Coverflow、Genius)。
Interface bloat is the gradual addition of elements that turn what may been a simple, elegant interface into one littered with buttons, menus, options, etc. all over the place that ruin the original cohesive feel of the application. One example that comes to mind for me is iTunes. In it's early renditions, it was quite simple, but has, over time, added quite a lot of features that might qualify as bloat (iTunes DJ, Coverflow, Genius).
界面膨胀有时是由于试图一键点击所有功能而导致的,如这个幽默的示例所示:
工具栏按钮太多
(虽然很有趣,但这个例子对 Firefox 不公平,因为在这个例子中用户添加了所有这些工具栏)
一种称为“渐进式披露”的 UI 设计技术是一种方法以减少界面膨胀。仅将最常用的功能公开为顶级点击。如果您有一些不太常用的功能,但仍然有价值,可以包含在您的应用程序中,请以逻辑方式将它们分组,例如放在下拉菜单或其他导航元素后面。
Interface bloat is sometimes caused by trying to have every feature one click away, as in this humorous example:
Too many toolbar buttons
(Although funny, this example isn't fair to Firefox because in this example the user added all those toolbars)
A UI design technique called "progressive disclosure" is one way to reduce interface bloat. Only expose the most frequently-used features as a top-level click. If you have less-frequently-used features that are still valuable enough to include in your app, group them in a logical way, e.g. behind a dropdown menu or other navigation element.
通过示例学习:
http://img46.imageshack.us/img46/5127/ofilematrix.png
Learning by example:
http://img46.imageshack.us/img46/5127/ofilematrix.png
大多数 C++ 程序员都熟悉的接口膨胀的一个极端例子是
std: :basic_string
。成员函数的向上翻页和向下翻页只有很小的变化,这些函数中的大多数不必是成员函数,而可以是字符串实用程序库中的自由函数。An extreme example of interface bloat that most C++ programmers will be familiar with is
std::basic_string
. Page up and page down of member functions with only small variations, most of these functions wouldn't have had to be member functions but could have been free functions in a string utility library.