User Guide > Tasks > Developing with Zend Framework > Creating and Running a Zend Framework Example Project

Creating and Running a Zend Framework Example Project

The purpose of the Zend Framework Example Project is to demonstrate the capabilities and best practices of working with the Zend Framework.

Zend Framework is a high quality open source framework for developing Web Applications and Web Services with PHP. The Zend Framework Example Project is a small demo application that shows how Zend Framework can be leveraged in order to streamline writing code, by decreasing development time (through using prewritten modules) and demonstrating how to implement best practices in organizing your project.

Once the Example Project has been created, you will be able to navigate through the tree in PHP Explorer and see the different components of the project.

 

The Zend Framework Example provides a model called MVC (Model-View-Controller) for programming using the Framework. With this model, applications are divided into three parts to assist in making the development process more efficient.

The components are:

Additional information about programming with the Zend Framework can be found in the official Zend Framework Manual at: https://framework.zend.com

For more information about the MVC method see http://en.wikipedia.org/wiki/Model-view-controller.

Creating the Zend Framework Example Project

The following procedure describes how to create a Zend Framework example project.

 

 

Instructions on how to complete a procedure

To create a Zend Framework Example Project:

  1. Go to File | New | Example | Zend Framework Example Project.
    The New Zend Framework Project dialog is displayed.

  1. Enter a name for your example project.

  2. You have two options for the contents of your Zend Framework Example Project:

  • Create new project in workspace - Creates the project in your current workspace.

  • Create project at existing location - Creates the project from an existing location outside of your workspace.

You may choose your location by writing it in the "Directory" text field, or by clicking Browse.

  1. Click Finish
    An example project will be created and displayed in the PHP Explorer view.

You can navigate through the application source files to learn more about the source behind the application.

Running the Zend Framework Example Project

The following procedure describes how to run the Zend Framework example project. In order to run your Zend Framework Example Project, you must first create one. For more information see Creating the Zend Framework Example Project.

Note:

You must have an established connection with a server to run the Zend Framework Example project. For more information see Defining Zend Server in Zend Studio.

 

 

Instructions on how to complete a procedure

To run the Zend Framework example project:

  1. Expand your Zend Framework Example project in the PHP Explorer View.
    The project's sub-folders will be exposed.

  2. Expand the sub-folder called public and right click on the sub-file index.php. From the right click menu select Run As | PHP Web Application.
    The "Run PHP Web Page" dialog will open.
    If the dialog does not open you will need to add this directory to the build path by right-clicking on the Public folder and selecting Build Path | Include.
    You do not need to make any changes in order to run the example project.  

  3. Click OK.

Your project Web page opens.

 

 

Related Links:
Zend Framework Integration

Creating Zend Framework Projects

Creating and Running a Zend Framework Example Project

Creating Zend Framework Elements

Searching the Zend Framework Site

Defining Zend Server in Zend Studio

Zend Server Integration

 

 

©1999-2013 Zend Technologies LTD. All rights reserved.