Zend Framework Intro: Explaining Anatomy of Zend Framework ApplicationTag: framework, zend, zend framework, anatomy application, MVC Category: PHP Frameworkpost: 08 Apr 2008 read: 935 Zend Framework Step By Step Tutorial - Part 2: We have created folder structure for helloword applicaton use zend framework. What we created is standard for Model View Controller pattern at zend framework application. In this post, we will see what function each folders. There are 4 top level directories within application's folder:
The Application FolderThe application folder contains all the code required to run the application. User can not accessed directly. This is separation between display, business, and control logic modele. Under this application, there are models, views, and controllers folder. These folders contain the model, view, and controller files. Other folders still may be created, for example for configuration files. The Library FolderAll applications use zend library. We place zend framework here. but, substantively, we can store library at anywhere. But make sure the application can find them. You can store at a global include directory that accessible for php application on the server, such as /usr/php_include or c:\code\php_include. Make sure set php.ini configuration file (or you can use set_include_path() function). The Test folderThis folder is used to store all unit tests that are written. If you still don't know about unit test, you can read at this. many PHP programmers do not place unit test as special step. How about you? The web_root folderAll web request from user are channeled through a single file, usually called index.php. This file is the only php file that needs to be accessible by web server. This file is placed in the web_root. Other common files that can be accessed directly are images, css, and JavaScript files. Each of them has own sub-directory within web_root directory. Next, we will write code for simple application named helloworld.
| ||
| | Give Your Opinion | Recommend |
|


