O'Reilly logo

PHP 5 e-commerce Development by Michael Peacock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required