Zend Framework (Part -2):
Model View Controller Architecture:
This tutorial will give you an overview on Zend Framework. How to set the directories, where to put the files etc. In this tutorial we will also learn how to integrate the files with database.
Zend framework is basically work on MVC architecture. Now let's have a quick look on this topic:
Model: The model part deals with the part which is concerned with the specification of the data to be displayed Business logic part of the program is handled by this part which involves activities like load and save to databases.
View: Responsibility of this part is to display the content of the application to the user. Usually this section contains the HTML part.
Controller: This part combines together the specifics of model and view section and gives the assurance of displaying correct data.
Though any directory structure is not been mandate by Zend Framework, but for our convenience we could maintain a directory structure. One example of the directory structure is given as below, let's consider the name of the project is NewProj, under this root directory, create three folders application, library and public. Under the application folder create another three folders named controllers, models, views. Under the library section copy the folder Zend framework<version>/library/ folder and under the public folder create the folders like images, scripts, and styles folder:
We will put the related files in respective directories. Supporting images, scripts and CSS files are stored in separate files and place the zend framework files under the library folder and if any other library file is needed place that under the library folder.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.