How to Install Zend Framework Two

Zend Framework 2 is an open source framework for developing web applications and services using PHP. Zend  is good when you want to develop robust applications and require a complete  group of libraries to accompany this -- Zend's library is vast and all the components co-ordinate nicely with each other (although, you can cut them out individually and add them to any project). The disadvantage of ZF is that as it is very flexible, it can be a little bit complex in setting it up.
To be honest, if you want to learn MVC applications, you might try something a little bit more straight forward. I find CodeIgniter to have a very short learning curve when we are  maintaining the fundamentals of MVC design. CakePHP also walks you through the steps quite deliberately
  • Model - This is a part of your application that defines its basic functionality. Data access routines and business logic can be defined in model.

  • View - Views define exactly that is shown to the user. Usually controllers pass data to each view to provide in some format. Views often collects data from the user. This is where you'are likely to find HTML markups in your MVC applications.

  • Controller - Controllers bind the whole pattern together. They handle models, decide which view to display based on the user's request and  pass the data that each view would need, or pass on control to another controller entirely. 

Follow the steps below:

1.Download msysGit and install it to any of ur directory.

2.Create a folder named   zend_practice in the  htdocs folder inside XAMPP.


Open zend_practice folder,right click in the blank area and then click git bash here,

Get Bash Here
When you click git bash here ,a black dialog box will be opened like below. 


Copy 'git clone git://' and paste it on the screen below as shown.  
Download Zend Framwork in your folder, 

ZendSkeletonApplication is set up to use Composer ( to resolve its dependencies. In this case, the dependency is Zend Framework 2 itself.
To install Zend Framework 2 into our application we simply type:
  1. php composer.phar self-update  
  2. php composer.phar install  
last step is configuring virtual host, create virtual host on your local machine.
Go to C:\xampp\apache\conf\extra\ httpd-vhosts.conf paste the below code.
  1. <VirtualHost *:80>    
  3.     ServerName zf2.localhost DocumentRoot C:\xampp\htdocs\zend_practice\ZendSkeletonApplication\public SetEnv APPLICATION_ENV "development"  
  4.       <Directory C:\xampp\htdocs\zend_practice\ZendSkeletonApplication\public>  
  6.         DirectoryIndex index.php AllowOverride All Order allow,deny Allow from all    
  8.     </Directory>    
  10. </VirtualHost>  
Zend Framwork