By rick
via builderau.com.au
Published: Jun 11 2008 / 16:16
A callback in programming is executable code that is passed as an argument to other code. The higher-level code usually starts by calling a function within the lower-level function, passing to it a pointer, or handle to another function.
Comments
Motion Control replied ago:
" Pass a callback delegate object that implements an interface for the callback method(s)."
What he describes is currently better known as DI.
andrewm replied ago:
Umm, no. Dependency injection involves some sort of container injecting the references.
Callback are a lower level "pattern" -- Bob Martin used to call this the abstract client pattern. He's the one who started the whole OO dependency debate back about 10 yrs ago...
imeshev replied ago:
I always thought of callbacks as synonyms for the GoF's Observer AKA Publisher/Subscriber pattern.
Voters For This Link (6)
Voters Against This Link (4)