One of the most used functions, yet least thought of in Dojo is dojo.connect.
Basically, what this function does is allow its users to call any function in any context, whenever a given function at a given scope was called.
Think of that last sentence again, up till now, if function T needed to be called due to the fact that function S was called, you had to follow the following steps:
1. Hope that the creator of function S provided a notification when function S was called
2. Hope that the creator of the object that holds function S provided an API that allows you to register to that notification, and made that option a public one.
Too much here relies on the API design capabilities of the creator of the function S.
Dojo solved it.
Dojo.connect is all about removing the need for relying on the good design skills of other people but you. Generally speaking this function takes function S, puts it aside and replaces it with a dispatcher, that calls all the T functions after that dispatcher first calls function S.