This means that we separate out all the functionality both logically using modules and also by concern into
separate controllers, views and models directories. For security, the web_root directory is the only directory
that the web server can directly serve files from and so it only contains one file: the bootstrap file which is the
next thing we will look at.
3.2.2 Bootstrap
The web_root/index.php file from our Hello World application is a good starting point for the bootstrap files
required for Places. We will however augment it as there is additional things we need to do to make our
application easier to develop. These are loading configuration data, initializing the database and automatically
loading classes as we use them.
3.2.3 Automatically loading classes
One aspect of the index.php in Hello World that is less than ideal is that there is a lot of
Zend_Loader::loadClass() calls to load up the classes we need before we use them. In a ???real??? application,
there are even more classes in use and so there is going to be a lot of clutter throughout our application just to
ensure that we have the right classes included at the right time.
Licensed to Menshu You
Please post comments or corrections to the Author Online forum at
http://www.
Pages:
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90