which each of its components has, or makes use of, little or no knowledge of the definitions of other separate components. » - Wikipedia « Loose coupling »
want to say « something happens » • Add handler on `document` when you need it. Into a plugin. Or another one. Or into your main script, or... ➔ Event on `document` your « application level events ».
on « user_connected » to load the User profile – Handler on « user_disconnected » to display the login form • Another plugin : – Handler on « user_some_action » to trigger another action, event, etc.