Dynamic binding is another name for Late Binding. That's where the language ties a data element or method to an object after compilation time.
Wikipedia equates dynamic & late binding:
- Dynamic binding (computing), also known as late binding
links to
http://en.wikipedia.org/wiki/Dynamic_binding_(computing)
Javascript was my first exposure to that, because you can just drop functions into objects willy nilly and do cool things with them.
For example (untested, not guaranteed to work exactly):
var a = Object();
var do = function() { do something };
a.do = do;
a.do();
// neato!
BTW, on a side note, there is some question whether Java is Object-oriented, because one of the original ideas in OO was late binding. Unfortunately, this particular discussion seems to devolve into attempts to define "Object Oriented".
http://c2.com/cgi/wiki?IsJavaObjectOriented
lol!
Under the covers, Dynamic Dispatch and Dynamic Binding may work out the same. But the idea in dynamic dispatch is following some function pointer to see which method to actually invoke, or object to invoke it on. "Binding" is the idea that the method is "bound" to a particular instance (or class of instances) & that's how you identify it.
So they could work together -- a method that's bound to an object with dynamic binding might use dynamic dispatch when you call it.
...
Also dynamic dispatch has more of an OO flavor to it... it's the mechanism behind polymorphism, in which a reference to an object might point to one of multiple implementations. Dynamic dispatch decides at runtime which one to actually run. By contrast, late binding would be dropping in whole new methods that weren't there at compile time.