Zend Framework 1 Overview

Developing a PHP application requires domain knowledge, software engineering, discipline, and time. We rarely write applications from scratch as there are freely available application frameworks that we can take advantage of. For the PHP programming language, there are more than a dozen "popular" frameworks to choose from, and picking the right framework for your application is not a mundane task. I have been working as an IT consultant for many years, and Zend Framework is the one being discussed frequently. As a new PHP developer coming on board with a Zend Framework, I would like to use this forum to describe the learning process.

What is Zend Framework?

Zend Framework is an object-oriented, loosely coupled, and extensible framework, which adopts Model-View-Controller (MVC) implementation on PHP 5. Zend Framework is also known as a "glue" framework because it has many loosely coupled components that you can use independently or use them together to take advantage of MVC design patterns. A full list of Zend Framework components and a complete programmer's reference are available at Component Library, and Programmer's Reference.

What are the advantages of using ZF?

Zend Framework is built on PHP5, uses OOP design concept, and implements a number of standard methods from the Standard PHP Library.

  • A framework is made up of loosely coupled component libraries.
  • Enterprise-ready with a large installed base and good documentation. (Corporate backing)
  • Uses OOP and design patterns including MVC, abstraction, and inheritance.
  • Flexible, Extensible, and scalable.
  • A framework built by a company that develops PHP language itself.

What are some of the drawbacks of using ZF?

I am not trying to discourage people from using Zend Framework, but based on my limited research there are a few drawbacks of using Zend Framework. Every framework has its pros and cons, and when you're evaluating a framework consider its advantages and disadvantages for your specific needs. There are a few popular PHP frameworks to choose from, and no matter what you choose it's better than building an application from scratch on your own. Some of the very popular PHP frameworks include Symphony, CodeIgniter, CakePHP, Yii, Kohana, and Fusebox among others.

  • Steep learning curve
  • No scaffolding
  • No built-in models
  • Big footprint

Zend Framework Directory Structure

Upon successful creation of a project, zf command-line tool creates a basic site structure including the application controllers, views, and unit test components. The directory structure looks something like below:

|-- application
|   |-- Bootstrap.php
|   |-- configs
|   |   +-- application.ini
|   |-- controllers
|   |   |-- ErrorController.php
|   |   +-- IndexController.php
|   |-- models
|   +-- views
|       |-- helpers
|       +-- scripts
|           |-- error
|           |   +-- error.phtml
|           +-- index
|               +-- index.phtml
|-- library
|-- public
|   |-- .htaccess
|   +-- index.php
+-- tests
    |-- application
    |   +-- bootstrap.php
    |-- library
    |   +-- bootstrap.php
    +-- phpunit.xml

Share this post

Comments (0)

    No comment

Leave a comment

All comments are moderated. Spammy and bot submitted comments are deleted. Please submit the comments that are helpful to others, and we'll approve your comments. A comment that includes outbound link will only be approved if the content is relevant to the topic, and has some value to our readers.


Login To Post Comment