Creating Your First Zend Framework-Driven Web Site Its a fair bet that even a very simple example will leave you utterly convinced that frameworks are a development tool you won't be able to live without. Create the Directory Structure By default, the Zend Framework relies upon a highly organized application directory structure known as the conventional modular directory structure. In its most basic form, this structure looks like this: Web server document root/ This structure opens up the possibility to manage multiple hosted MVC applications within the same location. In a situation where multiple MVC applications exist, you would add additional module directories under the modules directory. However, for the purposes of the examples in this chapter, we'll just stick with a single (default) application. Therefore, a simple Web application might be structured as follows. Note how there are three controllers and each of those controllers matches up to a corresponding view directory: Web server document root/ Don't worry about the oddly named files and structure too much at this point. Just understand that based on the provided controllers and views and a typical configuration, the following URLs would work: http://www.example.com/ http://www.example.com/about/ http://www.example.com/about/contact/ http://www.example.com/book/ http://www.example.com/book/toc/ Because this directory structure won't suit every developer, it's possible to change the default settings; however, coverage of this feature is out of the scope of this chapter.
blog comments powered by Disqus |