Prev | Current Page 76 | Next

Rob Allen, Nick Lo, and Steven Brown

"Zend Framework in Action"

We will also look at how we build the
view templates to ensure that we do not repeat the header and footer code within every action template.
3.1.3 Planning the code
We have looked at the goals of the site and how the user interface will work, so we can now look at how we
will organize the PHP code. As with the UI, we need to ensure that our code is not ???hemmed in??? as the site??™s
functionality and feature lists grow. We also want the system to do as much of the ???plumbing??? automatically
for us, so for instance, we don??™t have to worry about finding the correct class in the file structure, choosing the
name of a view template or struggle to relate to database tables. We will also be using Ajax when appropriate,
so whilst linking the view to the controllers is important for simplicity, we want to be able to override it.
The Zend Framework is a good choice to meet these requirements. As we discussed in chapter one, the
key benefits of the Zend Framework mean that we are basing our website on a flexible, robust and supported
platform that will be around as long as our site is.
The Zend Framework MVC system means that we will organize our site into separate controllers, each
with a set of view templates. We will also access our data via models that will provide us with a ???problemdomain???
interface to the database tables that we use.


Pages:
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
Gabi meble Warszawa odżywki tworzenie stron internetowych skarżysko kamienna Kocham wakacje aquilamed