How to know what's a stub?

Does stub always mean the same thing when you write programs?

"Stubs provide replacement implementations for objects, methods, or functions in order to remove external dependencies. Stubs are typically used during unit and component testing. If you're trying to write a unit test and need to replace a simple call to a database, external libraries (e.g., file I/O) or other system API, stubbing might be perfectly suited for your needs."

I thought stub and skeleton were only in CORBA but here there's a stub and is that the same thing/concept? A coiincidence or a connection when the word "stub" appears in rather different programming models (RMI and MIPS assmebly are 2 rather different) both have the concept / thing called "stub" and I also know for RMI / CORBA there's something called the skeleton but it's also possible to have a stub without a skeleton or what?

For instance when main is translated to assembly it's called a stud here and is there a connection to that stub and skeleton are used in network programming such as CORBA or is it no connection despite both are called stub?

movia r8,stub # source
movia r9,0x800020 # destination
ldw r10,0(r8) # read
stw r10,0(r9) # write
ldw r10,4(r8) # read part 2
stw r10,4(r9) # write
ldw r10,8(r8) # read jump
stw r10,8(r9) # write
... # initialize others

Is the code above an exmple of a stub? If so, what would be a skeleton or is that not applicable?

Thanks for info.

Answers


CORBA and RMI stub is a quite specific object that locally represents a certain remote object. This object exists on server side and the stub exists on a client side. The stub implements the same interface (has same working methods), forwarding all calls to the remote object, also receiving returned results and exceptions. Stub class is normally often automatically generated.

Stub in general has a different meaning (something that is only half finished, often just enough to make the code to compile but not to run properly).


Need Your Help

How do you dynamically plug a different database into your linq to sql data classes?

sql-server database linq-to-sql datacontext

Suppose you have a single web portal application that is used by a number of different clients. For reasons of security and portability, each client's data must reside in a separate database. The

rookie with castle windsor and trying to create implementations of my interfaces

c# .net castle-windsor

I've created my own project but im failing to spin up implementations of my interfaces using castle! I've added my ControllersInstaller, WindsorControllerFactory classes shown below. My controlle...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.