In keeping with modern design
practices, we haven??™t tried to design Places up-front, but have a story that describes what the site is about and
from that we have an initial list of functional ideas. We have then concentrated on getting something going and
ensuring that we have some tests in place for refactoring later. Testing is vitally important and we need the
freedom to be able to change our code to suit each new piece of added functionality and be sure that it still
works!
In order to get it all working, we have set up the directory structure for Places and have decided that our
view templates should be organized into a master template containing an action content template. As each view
template is named after its action, we have created a Front Controller plug-in, SiteTemplate, to implement the
Two-Step View design pattern to allow for an easily maintainable common look and feel using a master layout
view template.
We have also created two models that extend Zend_Db_Table to provide database access. The models
implement the business logic required to retrieve reviews for a specific place. Places is a fully working website
ready to add the foundations for enabling Ajax in our new Web 2.0 world.
Licensed to Menshu You
Please post comments or corrections to the Author Online forum at
http://www.
Pages:
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118