Tag Archives: Zend Framework

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

Install Zend Framework with Subversion

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.

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 .

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?

Installing The Zend Framework

UPDATE:

This article has been updated, please see “How to Install Zend Framework

http://framework.zend.com/

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

Installing Zend Framework from the command line

Connect to your server with a command line tool like PuTTY

PuTTY is a free implementation of Telnet and SSH for Win32 and Unix platforms, along with an xterm terminal emulator. It is written and maintained primarily by Simon Tatham.

Here are the command line steps

These steps are executed by super user (su) in your site’s root directory

  1. wget http://framework.zend.com/releases/ZendFramework-1.7.0/
    ZendFramework-1.7.0.tar.gz
  2. tar -xzvf ZendFramework-1.7.0.tar.gz
  3. rm ZendFramework-1.7.0.tar.gz
  4. mv ZendFramework-1.7.0/library/Zend /usr/local/lib/php
  5. rm -rf ZendFramework-1.7.0

Command line steps explained

  1. Get file package from site.
    wget http://framework.zend.com/releases/ZendFramework-1.7.0/
    ZendFramework-1.7.0.tar.gz
  2. Decompress the file.
    tar -xzvf ZendFramework-1.7.0.tar.gz
  3. Delete the compressed file.
    rm ZendFramework-1.7.0.tar.gz
  4. Move the library files to your standard location.
    Note:
    This is usually something like “/usr/local/lib/php”, but you may need to check your PHP Include Path to validate your standard location.
    mv ZendFramework-1.7.0/library/Zend /usr/local/lib/php
  5. Delete the decompressed directory and all it’s contents.
    rm -rf ZendFramework-1.7.0

Setup Zend Framework Directories

Move just outside of site root directory to create your Applications directory.

  • mkdir applications
  • mkdir applications/data
  • mkdir applications/data/logs
  • mkdir applications/data/tmp
  • mkdir applications/data/tmp/templates_c
  • mkdir applications/controllers
  • mkdir applications/views
  • mkdir applications/templates

The Zend Framework site offers offers Zend Framework installation steps that are a little different than the steps explained here.