Content deleted Content added
No edit summary Tag: Reverted |
No edit summary Tags: Visual edit Mobile edit Mobile web edit |
||
(49 intermediate revisions by 29 users not shown) | |||
Line 1:
{{
In computing, an '''interface''' is a shared boundary across which two or more separate components of a
| year = 2000
| title = IEEE 100 - The Authoritative Dictionary Of IEEE Standards Terms
| publisher = IEEE Press
| ___location = NYC, NY,
| isbn = 9780738126012
| pages = 574–575}}</ref>
== Hardware interfaces ==
[[File:RJ-45 Ethernet socket on Lenovo T410 Laptop.jpg|thumb|upright=1.4|Hardware interfaces of a [[
{{Main article|Hardware interface}}
Hardware interfaces exist in many components, such as the various [[Bus (computing)|buses]], [[Computer data storage|storage devices]], other [[I/O]] devices, etc. A hardware interface is described by the mechanical, electrical, and logical signals at the interface and the protocol for sequencing them (sometimes called signaling).<ref name="87Blaauw">
Line 45 ⟶ 44:
{{See also|Application binary interface|Application programming interface}}
A software interface may refer to a wide range of different types of
=== In practice ===
Line 69 ⟶ 68:
=== In object-oriented languages ===
{{Main article|Interface (object-oriented programming)|Concept (generic programming)}}
In some [[Object-oriented programming|object-oriented]] languages, especially those without full [[multiple inheritance]], the term ''interface'' is used to define an [[Abstract data type|abstract type]] that acts as an [[abstraction]] of a [[Class (computer science)|class]]. It contains no data, but defines behaviours as [[Method (computer science)|method]] signatures. A [[
An interface
Usually, a method defined in an interface contains no code and thus cannot itself be called; it must be implemented by non-abstract code to be run when it is invoked.{{citation needed|date=June 2018}} An interface called "<code>[[Stack (data structure)|Stack]]</code>" might define two methods: <code>push()</code> and <code>pop()</code>. It can be implemented in different ways, for example, <code>FastStack</code> and <code>GenericStack</code>—the first being fast, working with a data structure of fixed size, and the second using a data structure that can be resized, but at the cost of somewhat lower speed.
Though interfaces can contain many methods, they may contain only one or even none at all. For example, the [[Java (programming language)|Java]] language defines the interface {{Java|Readable}} that has the single {{Java|read()}} method; various implementations are used for different purposes, including {{Java|BufferedReader}}, {{Java|FileReader}}, {{Java|InputStreamReader}}, {{Java|PipedReader}}, and {{Java|StringReader}}. [[Marker interface pattern|Marker interfaces]] like {{Java|Serializable}} contain no methods at all and serve to provide run-time information to generic processing using [[Reflection (computer programming)|Reflection]].<ref>
{{cite web
|access-date = 2011-08-04
Line 105 ⟶ 104:
{{Main article|User interface}}
▲uter and humans; it includes any number of [[Modality (human–computer interaction)|modalities]] of [[human-computer interaction|interaction]] (such as graphics, sound, position, movement, etc.) where data is transferred between the user and the computer system.
== See also ==
Line 114 ⟶ 112:
* [[Business Interoperability Interface]]
* [[Computer bus]]
* [[Coupling (computer programming)]]
* [[Hard disk drive interface]]
* [[Implementation (computer science)]]
|