"Hollywood Principle: "Don't call us; we'll call you." ... You implement the interfaces, you get registered. You get called when the time is right. This requires a distinctly different way of thinking to that which is taught in introductory programming where the student dictates the flow of control."
— Dafydd Rees
Great, free ebook by Stephen Ferg. Well-written, conversational style.