<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://www.vigyanwiki.in/index.php?action=history&amp;feed=atom&amp;title=Method_stub</id>
	<title>Method stub - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.vigyanwiki.in/index.php?action=history&amp;feed=atom&amp;title=Method_stub"/>
	<link rel="alternate" type="text/html" href="https://www.vigyanwiki.in/index.php?title=Method_stub&amp;action=history"/>
	<updated>2026-04-05T08:07:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.3</generator>
	<entry>
		<id>https://www.vigyanwiki.in/index.php?title=Method_stub&amp;diff=224596&amp;oldid=prev</id>
		<title>Manidh: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://www.vigyanwiki.in/index.php?title=Method_stub&amp;diff=224596&amp;oldid=prev"/>
		<updated>2023-07-26T05:32:59Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:02, 26 July 2023&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Manidh</name></author>
	</entry>
	<entry>
		<id>https://www.vigyanwiki.in/index.php?title=Method_stub&amp;diff=224595&amp;oldid=prev</id>
		<title>wikipedia&gt;W.andrea: Revert insertion of another lead section. Some parts may be worth adding back, but others are incorrect, repetitive, or redundant.</title>
		<link rel="alternate" type="text/html" href="https://www.vigyanwiki.in/index.php?title=Method_stub&amp;diff=224595&amp;oldid=prev"/>
		<updated>2023-07-26T02:21:33Z</updated>

		<summary type="html">&lt;p&gt;Revert insertion of another lead section. Some parts may be worth adding back, but others are incorrect, repetitive, or redundant.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;A '''method stub''' or simply '''stub'''&amp;lt;ref name=&amp;quot;DaleWeems2004&amp;quot;&amp;gt;{{cite book|author1=Nell B. Dale|author2=Chip Weems|title=Programming in C++|url=https://books.google.com/books?id=mxZBPSjSEYUC&amp;amp;pg=PA308|year=2004|publisher=Jones &amp;amp; Bartlett Learning|isbn=978-0-7637-3234-9|pages=308}}&amp;lt;/ref&amp;gt; in [[software development]] is a piece of code used to stand in for some other programming functionality. A stub may [[simulation|simulate]] the behavior of existing code (such as a [[Subroutine|procedure]] on a remote machine; such methods are often called mocks) or be a temporary substitute for yet-to-be-developed code. Stubs are therefore most useful in [[porting]], [[distributed computing]] as well as general software development and [[Software testing|testing]].&lt;br /&gt;
&lt;br /&gt;
An example of a stub in [[pseudocode]] might be as follows:&lt;br /&gt;
&lt;br /&gt;
 temperature = ThermometerRead(Outside)&lt;br /&gt;
 '''if''' temperature &amp;gt; 40 '''then'''&lt;br /&gt;
     print &amp;quot;It is hot!&amp;quot;&lt;br /&gt;
 '''end if'''&lt;br /&gt;
&lt;br /&gt;
 '''function''' ThermometerRead(Source insideOrOutside)&lt;br /&gt;
     '''return''' 28&lt;br /&gt;
 '''end function'''&lt;br /&gt;
&lt;br /&gt;
The above pseudocode utilises the function {{mono|ThermometerRead}}, which returns a temperature. While {{mono|ThermometerRead}} would be intended to read some hardware device, this function currently does not contain the necessary code. So {{mono|ThermometerRead}} does not, in essence, [[Simulation|simulate]] any process, yet it ''does'' return a legal value, allowing the main program to be at least partially tested. Although it accepts the [[Parameter (computer science)|parameter]] of type {{mono|Source}}, which determines whether inside or outside temperature is needed, it does not use the actual value passed ([[Argument (computer science)|argument]] {{mono|insideOrOutside}}) by the caller in its logic.&lt;br /&gt;
&lt;br /&gt;
A stub &amp;lt;ref&amp;gt;{{cite web&lt;br /&gt;
 | url         = http://www.webopedia.com/TERM/S/stub.html&lt;br /&gt;
 | title       = stub&lt;br /&gt;
 | date = 23 March 1998&lt;br /&gt;
 | publisher   = WEBOPEDIA&lt;br /&gt;
 | quote       = &lt;br /&gt;
 | accessdate  = 2012-08-28&lt;br /&gt;
}}&amp;lt;/ref&amp;gt; is a routine that doesn't actually do anything other than declaring itself and the parameters it accepts and returning something that is usually the values expected in one of the &amp;quot;happy scenarios&amp;quot; for the caller. Stubs are used commonly as placeholders for implementation of a known interface, where the [[interface (computer science)|interface]] is finalized/known but the implementation is not yet known/finalized. The stub contains just enough code to allow it to be compiled and linked with the rest of the program. In [[Remote Method Invocation|RMI]] nomenclature, a stub on the client-side communicates with a [[Skeleton (computer science)|skeleton]] on the server-side.&amp;lt;ref&amp;gt;{{cite book&lt;br /&gt;
 | last1         = Freeman&lt;br /&gt;
 | first1        = Eric&lt;br /&gt;
 | authorlink1   = &lt;br /&gt;
 | last2         = Freeman&lt;br /&gt;
 | first2        = Elisabeth &lt;br /&gt;
 | authorlink2   = &lt;br /&gt;
 | last3         = Kathy&lt;br /&gt;
 | first3        = Sierra&lt;br /&gt;
 | authorlink3   = &lt;br /&gt;
 | last4         = Bert&lt;br /&gt;
 | first4        = Bates&lt;br /&gt;
 | authorlink4   = &lt;br /&gt;
 | editor1-last   = Hendrickson&lt;br /&gt;
 | editor1-first  = Mike&lt;br /&gt;
 | editor2-last  = Loukides&lt;br /&gt;
 | editor2-first = Mike&lt;br /&gt;
 | year          = 2004&lt;br /&gt;
 | title         = Head First Design Patterns&lt;br /&gt;
 | volume        = 1&lt;br /&gt;
 | page          = 440&lt;br /&gt;
 | publisher     = O'REILLY&lt;br /&gt;
 | format        = paperback&lt;br /&gt;
 | isbn          = 978-0-596-00712-6&lt;br /&gt;
 | accessdate    = 2012-08-28&lt;br /&gt;
 | url           = http://shop.oreilly.com/product/9780596007126.do&lt;br /&gt;
}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the context of [[DOS]] and [[Windows]], the term ''stub'' is also used in a fashion like [[Shim (computing)|shim]] to describe the small areas of interface code left in [[conventional memory]] by [[self-relocation|self-relocating]] resident drivers which move most of themselves into [[upper memory]], the [[high memory area]], [[expanded memory|expanded]] or [[extended memory]] as well as similar stubs to allow the relocated code to communicate with [[real-mode]] DOS in conjunction with [[DOS extender]]s (like [[DOS Protected Mode Interface|DPMI]], [[DOS Protected Mode Services|DPMS]], [[CLOAKING (DOS extender)|CLOAKING]] or [[NetWare I/O Subsystem|NIOS]]).&lt;br /&gt;
&lt;br /&gt;
The small pieces of dummy code branched into—so as to allow a graceful exit when invoking a [[fat binary]] in the wrong environment—are also called (code) stubs.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Method (computer science)#Abstract methods|Abstract method]]&lt;br /&gt;
* [[Mock object]]&lt;br /&gt;
* [[Dummy code]]&lt;br /&gt;
* [[Test stub]]&lt;br /&gt;
* [[Glue code]]&lt;br /&gt;
* [[Shim (computing)]]&lt;br /&gt;
* [[DOS stub]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [http://www.cs.ncl.ac.uk/research/pubs/articles/papers/94.pdf A Stub Generation System For C++] (PDF)&lt;br /&gt;
* [https://web.archive.org/web/20090711150137/http://www.sizovpoint.com/2009/03/java-mock-frameworks-comparison.html Stub/mock frameworks for Java] Review and comparison of stub &amp;amp; mock frameworks for Java&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- Fittingly enough, this article is a stub --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--Categories--&amp;gt;&lt;br /&gt;
[[Category:Unit testing]]&lt;br /&gt;
[[Category:Computer programming folklore]]&lt;br /&gt;
[[Category:Software development]]&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;W.andrea</name></author>
	</entry>
</feed>