A typical request starts from one of three places
- The Skin calling WikiaApp->sendRequest for HTML
- A Controller calling WikiaApp->sendRequest for Data
- Ajax calling wikia.php for JSON/HTML
In each of these examples, sendRequest constructs the request object from the parameters and calls the Dispatcher. The dispatcher determines which Controller (or Oasis/Module) to call based on those request params and returns a Response object which has a View that can be rendered. The developer should put all of their code in the Controller or the template/View and not interact with the Dispatcher directly. The only part of the Dispatcher behavior that is exposed to the developer is flagging a request as internal or external and this is done with a parameter to the WikiaApp->sendRequest() method or by calling Request->setInternal(true/false).