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 Folder
The 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 Folder
All 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 folder
This 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 folder
Next, we will write code for simple application named helloworld.