Link Details

Link 86287 thumbnail
User 1 avatar

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.
  • 6
  • 4
  • 1688
  • 862

Comments

Add your comment
User 285418 avatar

Motion Control replied ago:

0 votes Vote down Vote up Reply

" Pass a callback delegate object that implements an interface for the callback method(s)."

What he describes is currently better known as DI.

User 85500 avatar

andrewm replied ago:

0 votes Vote down Vote up Reply

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...

User 79175 avatar

imeshev replied ago:

0 votes Vote down Vote up Reply

I always thought of callbacks as synonyms for the GoF's Observer AKA Publisher/Subscriber pattern.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.

Voters For This Link (6)



Voters Against This Link (4)