Now that we have designed our framework, it is time to start building it! Let's start by implementing the patterns we discussed earlier in the chapter.
If we now look at an overview of our framework, the user visits the site through the
index.php file, which in turn instantiates the registry, creates or instantiates the relevant controllers, and passes the registry to those. The controllers in turn create models where appropriate, and both the models and controllers can interact with the registry (as it was passed to the objects), generating and manipulating views as appropriate. The following diagram illustrates this:
There are a number of different ways to implement the patterns we discussed. ...