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.
wget http://framework.zend.com/releases/ZendFramework-1.11.4/ZendFramework-1.11.4.tar.gz
# 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 http://framework.zend.com/svn/framework/standard/branches/release-1.11/
# 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
:wq
# 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/zf.sh
# Save file and quit editor
:wq
#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
:wq
#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.

new-internet-media

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 http://labs.adobe.com/?sdid=ERZSR.

Learn more about Flash Builder 4 and Zend Framework integration in an online e-seminar on June 9th. Register for free at: http://www.adobe.com/go/flex_seminars/?sdid=ERZSR

Zend Framework

zendframework

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 http://framework.zend.com .

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?

New Zend Demo – Developing Rich Internet Applications (RIAs)

Creating Rich Internet Applications (RIAs) has never been easier! The integration of Zend Framework and Dojo, and the new Dojo code editing support in Zend Studio for Eclipse 6.1, provide an out-of-the-box solution for rapid development of Ajax-based applications. View our new, five minute screencast to understand the basic steps of creating a meeting scheduler PHP Web application:

  • Creating a Zend Framework and Dojo project
  • Using Zend Studio’s code assist for writing Dojo code
  • Deploying and running the application

If you can not see the embedded video, you can access the zend demo video here.