Method stub

stubstubsStub (computer science)
A method stub or simply stub in software development is a piece of code used to stand in for some other programming functionality.wikipedia
49 Related Articles

Software testing

beta testingtestingbeta
Stubs are therefore most useful in porting, distributed computing as well as general software development and testing.
Typical techniques for these are either using stubs/drivers or execution from a debugger environment.

Interface (computing)

interfaceinterfacescomputer interface
Stubs are used commonly as placeholders for implementation of a known interface, where the interface is finalized/known but the implementation is not yet known/finalized.
Such stub implementations are replaced by real code later in the development process.

DOS Protected Mode Services

DPMSCLOAKINGHelix Cloaking
In the context of DOS and Windows, the term stub is also used in a fashion like shim to describe the small areas of interface code left in conventional memory by self-relocating resident drivers which move most of themselves into upper memory, the high memory area, expanded or extended memory as well as similar stubs to allow the relocated code to communicate with real-mode DOS in conjunction with DOS extenders (like DPMI, DPMS, CLOAKING or NIOS).
Not being a DOS extender by itself, DPMS is a minimal set of extended DOS memory management services to allow slightly modified DOS resident system extensions (RSX) such as device drivers or TSRs (as so called DPMS clients) to relocate themselves into extended memory and run in 16-bit or 32-bit protected mode while leaving only a tiny stub in conventional memory as an interface to communicate with the conventional DOS environment.

Self-relocation

self-relocatingrelocateRelocating logic
In the context of DOS and Windows, the term stub is also used in a fashion like shim to describe the small areas of interface code left in conventional memory by self-relocating resident drivers which move most of themselves into upper memory, the high memory area, expanded or extended memory as well as similar stubs to allow the relocated code to communicate with real-mode DOS in conjunction with DOS extenders (like DPMI, DPMS, CLOAKING or NIOS).
Finally, it is technically impossible for an external loader to relocate drivers into expanded memory (EMS), the high memory area (HMA) or extended memory (via DPMS or CLOAKING), because these methods require small driver-specific stubs to remain in conventional or upper memory in order to coordinate the access to the relocation target area, and in the case of device drivers also because the driver's header must always remain in the first megabyte.

Shim (computing)

shimshimsshimming
In the context of DOS and Windows, the term stub is also used in a fashion like shim to describe the small areas of interface code left in conventional memory by self-relocating resident drivers which move most of themselves into upper memory, the high memory area, expanded or extended memory as well as similar stubs to allow the relocated code to communicate with real-mode DOS in conjunction with DOS extenders (like DPMI, DPMS, CLOAKING or NIOS).

DOS Protected Mode Interface

DPMIDPMI 1.0DOS DPMI32
In the context of DOS and Windows, the term stub is also used in a fashion like shim to describe the small areas of interface code left in conventional memory by self-relocating resident drivers which move most of themselves into upper memory, the high memory area, expanded or extended memory as well as similar stubs to allow the relocated code to communicate with real-mode DOS in conjunction with DOS extenders (like DPMI, DPMS, CLOAKING or NIOS).
Another specification named DPMS, developed by Digital Research / Novell around 1992, specifically addresses requirements to easily relocate modified DOS driver software into extended memory and run them in protected mode, thereby reducing their conventional memory footprint down to small stubs.

Mock object

mockingFake objectmock
Which out of mock, fake, or stub is the simplest is inconsistent, but the simplest always returns pre-arranged responses (as in a method stub).

Fat binary

fat binariesFATfat application
The small pieces of dummy code branched into to allow a graceful exit when invoking a fat binary in the wrong environment are also called (code) stubs.
The methods either combine two fully functional programs each built for their corresponding environment, or add stubs which cause the program to exit gracefully if started on the wrong processor.

Skeleton (computer programming)

skeletonskeletonsDummy code
In RMI nomenclature, a stub communicates on the server-side with a skeleton.
In object-oriented programming, dummy code corresponds to an abstract method, a method stub or a mock object.

New Executable

NEDOS stub
When run under DOS, a so-called DOS stub is executed which usually prints a message and exits.

Software development

developmentdevelopedapplication development
A method stub or simply stub in software development is a piece of code used to stand in for some other programming functionality.

Simulation

simulatorsimulatesimulations
A stub may simulate the behavior of existing code (such as a procedure on a remote machine, such methods are often called mocks) or be a temporary substitute for yet-to-be-developed code.

Subroutine

functionfunctionssubroutines
A stub may simulate the behavior of existing code (such as a procedure on a remote machine, such methods are often called mocks) or be a temporary substitute for yet-to-be-developed code.

Porting

portedportports
Stubs are therefore most useful in porting, distributed computing as well as general software development and testing.

Distributed computing

distributeddistributed systemsdistributed system
Stubs are therefore most useful in porting, distributed computing as well as general software development and testing.

Pseudocode

pseudo-codepseudo codepseudo
An example of a stub in pseudocode might be as follows:

Parameter (computer programming)

parameterparametersargument
Also note that although it accepts the parameter of type Source, which determines whether inside or outside temperature is needed, it does not use the actual value passed (argument insideOrOutside) by the caller in its logic.

Distributed object communication

remote method invocationRMIremote invocation
In RMI nomenclature, a stub communicates on the server-side with a skeleton.

DOS

COM1AUX:LPT1
In the context of DOS and Windows, the term stub is also used in a fashion like shim to describe the small areas of interface code left in conventional memory by self-relocating resident drivers which move most of themselves into upper memory, the high memory area, expanded or extended memory as well as similar stubs to allow the relocated code to communicate with real-mode DOS in conjunction with DOS extenders (like DPMI, DPMS, CLOAKING or NIOS).

Microsoft Windows

WindowsPCMS Windows
In the context of DOS and Windows, the term stub is also used in a fashion like shim to describe the small areas of interface code left in conventional memory by self-relocating resident drivers which move most of themselves into upper memory, the high memory area, expanded or extended memory as well as similar stubs to allow the relocated code to communicate with real-mode DOS in conjunction with DOS extenders (like DPMI, DPMS, CLOAKING or NIOS).

Conventional memory

640 KB barrierconventionallow memory
In the context of DOS and Windows, the term stub is also used in a fashion like shim to describe the small areas of interface code left in conventional memory by self-relocating resident drivers which move most of themselves into upper memory, the high memory area, expanded or extended memory as well as similar stubs to allow the relocated code to communicate with real-mode DOS in conjunction with DOS extenders (like DPMI, DPMS, CLOAKING or NIOS).

Upper memory area

upper memoryupper memory blockUpper Memory Blocks
In the context of DOS and Windows, the term stub is also used in a fashion like shim to describe the small areas of interface code left in conventional memory by self-relocating resident drivers which move most of themselves into upper memory, the high memory area, expanded or extended memory as well as similar stubs to allow the relocated code to communicate with real-mode DOS in conjunction with DOS extenders (like DPMI, DPMS, CLOAKING or NIOS).

High memory area

HMAHMA, or High Memory Area
In the context of DOS and Windows, the term stub is also used in a fashion like shim to describe the small areas of interface code left in conventional memory by self-relocating resident drivers which move most of themselves into upper memory, the high memory area, expanded or extended memory as well as similar stubs to allow the relocated code to communicate with real-mode DOS in conjunction with DOS extenders (like DPMI, DPMS, CLOAKING or NIOS).