Forums Register Login

Stub vs TO

+Pie Number of slices to send: Send
HI,
What are some basic differences between a stub and Transfer Object?
+Pie Number of slices to send: Send
Hello,
think of a stub as a skeleton that contains all methods available to invoke. but every time you invoke a method on the stub the stub forwards the request to a machine where the actual object is, there the execution takes place then that machine send the output of the execution back to you (return value or exception etc). so using stubs always involves network traffic, BUT they make things look like as if the execution is taking place on your machine not the host/server where the actual object is.

Transfer Object is different, the host/server sends a copy of an object to the client so you have the original object (on the server/host) with its actual instance values and there is the copy (on your machine), if the original object changes the copy will have no idea, but it allows you to get rid of network traffic, and it makes development a little easier since you don't have to handle network exception.

there are cases where you must use stubs, and there are cases where you can use TO, so it depends on the situation.

hope that helped
Honk if you love justice! And honk twice for tiny ads!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 787 times.
Similar Threads
Model followed by ejb
RMIC On 5.0 Exam?
Stub downloads
Unable to get a value set on Stub in Handler
Webservices Client
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:20:13.