1. A method comprising: detecting, at a dispatcher within a user interface framework, an event emitted from a user interface element contained within a document object model node associated with a controller, wherein the document object model node includes an attribute defining a module and specifying that the module be loaded prior to instantiating the controller; requesting the module associated with the controller; instantiating the controller, wherein instantiating the controller includes automatically constructing the controller in response to a first occurrence of the event; and providing the event to the controller.