Content deleted Content added
Reverted to original state Tags: Reverted references removed Visual edit Mobile edit Mobile web edit |
Restored revision 1141784361 by CodeTalker (talk) |
||
Line 2:
{{Refimprove|date=May 2010}}
In computing, an '''interface''' is a shared boundary across which two or more separate components of a [[computer system]] exchange information. The exchange can be between [[software]], [[computer hardware]], [[peripheral]] devices, [[User interface|humans]], and combinations of these.<ref name="HookwayInterface14">{{cite book |url=https://books.google.com/books?id=BQM_AwAAQBAJ |chapter=Chapter 1: The Subject of the Interface |title=Interface |author=Hookway, B. |publisher=MIT Press |pages=1–58 |year=2014 |isbn=9780262525503}}</ref> Some computer hardware devices, such as a [[touchscreen]], can both send and receive data through the interface, while others such as a mouse or microphone may only provide an interface to send data to a given system.<ref>{{cite encyclopedia
| year = 2000
| title = IEEE 100 - The Authoritative Dictionary Of IEEE Standards Terms
| publisher = IEEE Press
| ___location = NYC, NY, USA
| isbn = 9780738126012
| pages = 574–575}}</ref>
== Hardware interfaces ==
Line 80 ⟶ 85:
|archive-url = https://web.archive.org/web/20110824150046/http://www.precisejava.com/javaperf/j2se/Serialization.htm
|archive-date = 2011-08-24}}</ref>
=== Programming to the interface ===
The use of interfaces allows for a programming style called ''programming to the interface''. The idea behind this approach is to base programming logic on the interfaces of the objects used, rather than on internal implementation details. Programming to the interface reduces dependency on implementation specifics and makes code more reusable.<ref>{{cite book
| last1 = Gamma
| last2 = Helm
| last3 = Johnson
| last4 = Vlissides
| year = 1995
| title = Design Patterns: Elements of Reusable Object-Oriented Software
| url = https://archive.org/details/designpatternsel00gamm
| url-access = registration
| publisher = Addison Wesley
| pages = [https://archive.org/details/designpatternsel00gamm/page/17 17–18]| isbn = 9780201633610
}}</ref>
Pushing this idea to the extreme, [[inversion of control]] leaves the ''context'' to inject the code with the specific implementations of the interface that will be used to perform the work.
== User interfaces ==
|