How to Install Zend Framework

What are Frameworks?

A Framework is a collection of reusable items or steps in a repeatable process.  A software application framework is a well-defined Application programming interface (API) that serves as abstraction layers that separate business logic from application logic.  Application frameworks usually leverage object-oriented programming techniques to extend the current purpose to serve custom needs.  Combining server-side frameworks with client-side frameworks improves development time and reduces cost while supporting the concepts of Rapid Application Development (RAD).  A popular framework architectural pattern is Model-View-Controller (MVC).  The MVC architectural pattern increases application flexibility and reduces the complexity in architectural design by decoupling models and views.

What is Zend Framework?

The Zend Framework extends the art & spirit of PHP, Zend Framework is based on simplicity, object-oriented best practices, corporate friendly licensing, and a rigorously tested agile codebase. Zend Framework is focused on building more secure, reliable, and modern Web 2.0 applications & web services, and consuming widely available APIs from leading vendors like Google, Amazon, Yahoo!, Flickr, as well as API providers and cataloguers like StrikeIron and ProgrammableWeb.

Installing Zend Framework

Connect to your server with a command line tool like PuTTY, Apple Mac users can simply use a Terminal window.  Navigate to a directory that is NOT the Document Root or any directory in the web server’s “include” path.  The Zend Framework installation described here will allow the user to change the version of Zend Framework at will by using a symbolic link for the Zend installation files.  This method will allow developers to change versions “on-the-fly” without the need for restarting web servers.  Learn how to setup a web server at “How to Setup a Virtual Web Server in 10 Minutes“.

Install Zend Framework with Wget

# 1. ) Get file package from site.
# 2. ) Decompress the file.
tar -xzvf ZendFramework-1.11.4.tar.gz
# 3. ) Delete the compressed file.
rm ZendFramework-1.11.4.tar.gz
# 4. ) Rename installation directory to "ZendFramework"
mv ZendFramework-1.11.4 ZendFramework

Install Zend Framework with Subversion

# 1. ) Get file package from site.
svn checkout
# 2. ) Rename installation directory to "ZendFramework"
mv release-1.11 ZendFramework

Zend Framework Web Server Integration

Use the wGet or Subversion method above to get the package files, then integrate the framework into the existing web server with the following steps.

# 1. ) Create a symbolic link named "Zend" to the "ZendFramework" directory.
# This step will allow changing versions of Zend Framework without the need for restarting the web server.
ln -s ZendFramework Zend
# 2. ) Add the Zend library to your PHP include path
cd /{full}/{path}/{to php.ini folder}
vi php.ini
# Search for the "include_path" directive and update it to include full path to "Zend/library"
# include_path = ".:/php/includes:/{replace this with complete path to parent of Zend symbolic link}/Zend/library"
# Save file and quit editor
# 3. ) Add Zend Tool to the command line by creating an alias in bash_profile
vi ~/.bash_profile
alias zf=/{replace this with complete path to parent of Zend symbolic link}/Zend/bin/
# Save file and quit editor
#Exit and completely close command window
#Open command window and start a new session
# 4. ) Display zend version by entering this at the prompt
#This should return Zend Framework Version: 1.11.4
zf show version
# 5. ) Create a Zend Project
#Navigate to parent directory of Document Root
zf create project quickstart
# 6. ) Automatically write code using Zend Tool
# The following commands will add basic actions to Index
zf create action add index
zf create action edit index
zf create action delete index
# 7. ) Move the project’s “pubic” folder into  Document Root of Web Server as “quickstart”
# Note: Replace "public_html" with the real name of document root folder
mv quickstart/public public_html/quickstart
#Navigate into “public_html/quickstart”
cd public_html/quickstart
# 8. ) Update "APPLICATION_PATH" value in index.php
# This should point to "quickstart/application" in parent of document root.
vi index.php
// Define path to application directory
defined('APPLICATION_PATH') || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../quickstart/application'));
# Save file and quit editor
#Open a web browser and navigate to http://{replace this with host name}/quickstart

Welcome to the Zend Framework

Open a web browser and navigate to “http://{replace this with real host name}/quickstart” to see the “Welcome to the Zend Framework” message.

Open a web browser and navigate to “http://{replace this with real host name}/quickstart/index/add” to see a simple message from the code that was automatically written from using the Zend Tool in the previous steps.

Additional tips and information is available from Zend’s Quick Start Guide.  Software developers can also use Eclipse for application development with Eclipse plug-ins supporting this framework or Zend Studio.  Adobe Dreamweaver users can support Zend in their IDE as outlined in this article “Using Adobe Dreamweaver to color code modules, zend templates, & other file types“.

Software Integration Summary

  • Improved Security by storing sensitive information such as database user name and password in configuration files outside of document root.
  • Provided Version Control by using a symbolic link to software package.  Software developers not using Subversion can change the version of the software by downloading the required version into a new directory and update the Zend symbolic link to point to the new directory.  Software developers using Subversion can manage the software with simple Subversion  Commands and Scripts.
  • Automatic Code Generation by configuring and using Zend Tool to automatically generate code.
  • Integrated by integrating this software into an existing web server environment, developers can leverage existing IT investments.  This server-side framework can also be integrated with a client-side framework to support AJAX and Web 2.0 Technologies across multiple devices.  Here are 3 AJAX Frameworks that can support Custom Dashboards on Apple iPads.

Data Visualization is Key

Happy Fav Five Friday!

Social Media + Time = Information Overload

Our time to review information is shrinking while the available information to review is growing, which leads us to the need for methods that help us understand information faster. Data visualization will play a key role in helping us convey and interact with information in more interesting ways. Adobe Flash Builder is a tool that will help.


Adobe Releases Flash Builder 4 Beta 1 – Including Zend Framework

Adobe has released a beta version of Adobe Flash Builder, the next generation of the popular Flex Builder tool. Zend Framework is now included within Flash Builder, allowing developers to introspect PHP classes and then to use a drag and drop approach to bind specific methods to UI components in applications, such as interactive charts, graphs, datagrids, and more. These new features provide a simplified development approach for adding rich UI to PHP applications using the Flex Framework and Zend Framework. Download Flash Builder 4 Beta 1 today from

Learn more about Flash Builder 4 and Zend Framework integration in an online e-seminar on June 9th. Register for free at:

Zend Framework


I’m excited to see the Zend Framework is included in the new Adobe Flash Builder.  I have been closely following this project.  I believe the Zend Framework plays a key role in Enterprise Level application development.  This framework is

  • Well Documented
  • Simple
  • Safe for the Enterprise
  • Supported by Industry
  • Supported by Development Community
  • Supports Rapid Development
  • Flexible Architecture
  • Extensible
  • Tested Code Base
  • Professional Training Available
  • Certification Possible

Some people may argue that PHP Zend Framework is just an abstraction layer of unwanted, bloated code.  I disagree.  I believe the Zend Framework, with it’s Object Oriented approach is the foundation of Enterprise 2.0 level code.  I recommend at least taking a look .

Using Adobe Dreamweaver to color code modules, zend templates, & other file types

Getting Dreamweaver to open template files

dreamweaver-preferencesAdobe Dreamweaver makes coding easier with it’s color coding and auto-complete features. I use the Zend Framework on many of my projects and I wanted to take advantage of features in Dreamweaver for my template files that have an extension of .tpl that are basically PHP files. Here’s how I added the file type to Dreamweaver.

  • Open Dreamweaver
  • Open Edit>Preferences
  • Select “File Types / Editor”
  • Add .tpl to items in “Open in Code View”
  • Click “OK”

Updating your Dreamweaver Extension File

Open Extensions.txt in the Configuration directory where you installed Dreamweaver. Adobe Dreamweaver default install directory is “/Program Files/Adobe/Adobe Dreamweaver{version}/Configuration”.

Open Extensions.txt with your text editor (notepad). You should see a line towards the top of the files that ends in “:All Documents”. Update this to “,TPL:All Documents”. Note the extension is added in uppercase without a period. Now look for a line that ends with “:PHP Files”. Update this to “,TPL:PHP Files”. Save this file.

Updating your Dreamweaver Document Types

Open “Configuration\DocumentTypes\MMDocumentTypes.xml” in your text editor. Update the documenttype section with the id of “PHP_MySQL”. Add “tpl” to the winfileextension list. Add “tpl” to the macfileextension list. Save this file.

Zend Template files treated as PHP files in Dreamweaver

Open your template files (.tpl) in Adobe Dreamweaver. Now Dreamweaver will treat these files as PHP files and give you the proper color-coding & PHP auto-complete features.

Using this technique with Smarty, Drupal, Zend, & other file types

You can use these same steps to help Dreamweaver understand your other file types. I have other file type associated with PHP in Dreamweaver. I use .phtml files for a template engine and other special extensions for a wide variety of Content Management Systems.

Associating these file types with the right tools has improved my work flow and I hope it helps you. Please feel free to share your tips here.

5 Zend PHP Videos Covering Google, RIAs, & Studio For Your Enterprise 2.0 Strategy

Zend Demo Videos: Fav Five Friday

Happy Friday!  I have been helping people with web-based solutions for years.  Some of my projects have included simple brochure type of web sites, others have been dynamic, database driven web sites with a huge number of people rapidly accessing components while expecting instant responses from the application.  Most of this code has been written in PHP with tools like Adobe Dreamweaver.  A while back I posted an article about installing the Zend Framework and a quick article about “New Zend Demo – Developing Rich Internet Applications (RIAs)“.  Zend has an endless amount of tools, training, education, & resources to help you with your social media platform development, which should be part of your Enterprise 2.0 strategy.

Using Zend Studio to develop your Social Media Platform for your Enterprise 2.0 Solution

When developing PHP Solutions for Social Media Platforms, I prefer a robust toolset to help create exciting user interfaces, especially in the Enterprise.

I found these videos very helpful and I just wanted to share them with you to hopefully help you in your quest for developing rich internet applications for your social media platforms.

Zend Demo Videos

  • Unlock the Value of Your PHP Applications
  • Zend Studio for Eclipse – Getting Started
  • Zend Framework and Ajax Webinar
  • Zend Framework and Dojo
  • Zend Framework Google data PHP Client Update

Happy Fav Five Friday!

What’s your favorite Zend?