Two implementations of the Application Controller Pattern. The first is a naive but simple implementation, the second is robust but more complex.