Building a killer framework

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:

Pattern implementation

There are a number of different ways to implement the patterns we discussed. ...

Get PHP 5 e-commerce Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.