<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Interface-based_programming</id>
	<title>Interface-based programming - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Interface-based_programming"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Interface-based_programming&amp;action=history"/>
	<updated>2026-05-01T18:43:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Interface-based_programming&amp;diff=4207808&amp;oldid=prev</id>
		<title>100.1.85.75 at 23:19, 13 February 2024</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Interface-based_programming&amp;diff=4207808&amp;oldid=prev"/>
		<updated>2024-02-13T23:19:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{more footnotes needed|date=September 2016}}&lt;br /&gt;
{{more citations needed|date=May 2015}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- IMPORTANT: need reliable source that says that this is specifically about OOP. If not, and if a suitable OOP-specific name cannot be located, this article should probably be merged into [[component-based software engineering]], which is the same thing but not specific to OOP. --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Interface-based programming&amp;#039;&amp;#039;&amp;#039;, also known as &amp;#039;&amp;#039;&amp;#039;interface-based architecture&amp;#039;&amp;#039;&amp;#039;, is an [[architectural pattern]] for implementing [[modular programming]] at the [[software component|component]] level in an [[object-oriented programming]] language which does not have a module system. An example of such a language is [[Java (programming language)|Java]] prior to [[Java_version_history#Java_9|Java 9]], which lacked the [[Java Platform Module System]], a module system at the level of components introduced with [[Java_version_history#Java_9|Java 9]]. [[Java (programming language)|Java]] till [[Java_version_history#Java_8|Java 8]] merely had a &amp;#039;&amp;#039;package&amp;#039;&amp;#039; system, but Java software components typically consist of multiple [[Java package]]s{{spaced ndash}} and in any case, interface programming can provide advantages over merely using Java packages, even if a component only consists of a single Java package.&lt;br /&gt;
&lt;br /&gt;
Interface-based programming defines the application as a collection of components, in which [[Application Programming Interface]] (API) calls &amp;#039;&amp;#039;between&amp;#039;&amp;#039; components may only be made through abstract interfaces, not concrete classes. Instances of classes will generally be obtained through other interfaces using techniques such as the [[Factory pattern]].&lt;br /&gt;
&lt;br /&gt;
This is claimed to increase the &amp;#039;&amp;#039;modularity&amp;#039;&amp;#039; of the application and hence its [[maintainability]]. However, some caution is warranted{{spaced ndash}} merely splitting an application into arbitrary components communicating via interfaces does not &amp;#039;&amp;#039;in itself&amp;#039;&amp;#039; guarantee low [[coupling (computer programming)|coupling]] or high [[cohesion (computer science)|cohesion]], two other attributes that are commonly regarded as key for maintainability.&lt;br /&gt;
&lt;br /&gt;
An interface-based architecture can be used when third parties{{spaced ndash}} or indeed separate teams within the same organisation{{spaced ndash}} develop additional components or plugins for an established system. The codebase of the [[Eclipse IDE]] is an example of interface-based programming. Eclipse plugin vendors just have to develop components that satisfy the interface specified by the parent application vendor, the Eclipse Foundation. Indeed, in Eclipse, even the original components such as the Java Development Tools are &amp;#039;&amp;#039;themselves&amp;#039;&amp;#039; plugins. This is somewhat like a [[mobile phone]] manufacturer specifying a mobile charger interface (pin arrangement, expected [[Direct Currents|direct current]] voltage, etc.) and both the manufacturer and third parties making their own mobile phone chargers that comply with this standard interface specification.&lt;br /&gt;
&lt;br /&gt;
== Software evolution in interface-based programming==&lt;br /&gt;
The use of [[Interface (computing)|interfaces]] to allow disparate teams to collaborate raises the question of how interface changes happen in interface-based programming. The problem is that if an interface is changed, e.g. by adding a new method, old code written to implement the interface will no longer compile{{spaced ndash}} and in the case of dynamically loaded or linked plugins, will either fail to load or link, or crash at runtime. There are two basic approaches for dealing with this problem:&lt;br /&gt;
&lt;br /&gt;
# a new interface may be developed with additional functionality, which might inherit from the old interface&lt;br /&gt;
# a [[software versioning]] policy such as [http://semver.org semantic versioning 2.0] may be communicated to interface implementors, to allow forward-incompatible, or even backward-incompatible, changes in future &amp;quot;major&amp;quot; versions of the platform&lt;br /&gt;
&lt;br /&gt;
Both of these approaches have been used in the Java platform.&lt;br /&gt;
&lt;br /&gt;
== Design by contract ==&lt;br /&gt;
The publisher of the interfaces generally promises that they will not change the interface in new &amp;quot;minor&amp;quot; versions of the software, and the implementer, by implementing the interface, implies that they have implemented at least the required parts of the interface without any deviation. An interface can therefore be viewed as a &amp;quot;contractual agreement&amp;quot;{{spaced ndash}} between a provider and a consumer of the interface. If this contract is documented more formally as a software specification, this is an example of [[design by contract]]. However, design by contract &amp;#039;&amp;#039;per se&amp;#039;&amp;#039; does not mandate the use of interfaces for all components.&lt;br /&gt;
&lt;br /&gt;
== See also==&lt;br /&gt;
* [[Microservices]]&lt;br /&gt;
* [[Actor model]]&lt;br /&gt;
* [[CORBA]], an older component-based system for object-oriented software which is now rarely used, for various reasons&lt;br /&gt;
* [[Java Platform Module System]], a module system at component level for the [[Java (programming language)|Java]] programming language introduced with [[Java_version_history#Java_9|Java 9]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
* [http://www.c-sharpcorner.com/UploadFile/rmcochran/csharp_interrfaces03052006095933AM/csharp_interrfaces.aspx C# Interface Based Development], c-sharpcorner.com &lt;br /&gt;
* [https://archive.today/20130414134941/http://devmentor.org/references/uml/interface.php Interface Based Development – The Unified Modeling Language (UML)], devmentor.org &lt;br /&gt;
* [http://www.rhyous.com/2011/10/18/architecting-a-large-application-with-interface-based-architecture/ Architecting a large application with interface-based architecture], rhyous.com, 18 October 2011&lt;br /&gt;
* [http://msdn.microsoft.com/en-us/library/aa260635%28v=vs.60%29.aspx Understanding Interface-based Programming], [[Microsoft Developers Network]], accessed 16 September 2016&lt;br /&gt;
&lt;br /&gt;
[[Category:Architectural pattern (computer science)]]&lt;/div&gt;</summary>
		<author><name>100.1.85.75</name></author>
	</entry>
</feed>