Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Interface (computing)
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== 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.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)