Before you start
This tutorial is for developers who want to better understand the MVC pattern, and for those who wish to use and learn more about the Zend Framework. You'll see how to use the Zend_Controller, Zend_View, Zend_Form, and Zend_Db components as the building blocks of your web application.
This "Understanding the Zend Framework" series chronicles the building of an online feed reader, Chomp, while explaining the major aspects of using the open source PHP Zend Framework.
In Part 1 I talked about the overall concepts of the Zend Framework, including a list of relevant classes and a general discussion of the MVC pattern. Part 2 expands on that and shows how MVC can be implemented in a Zend Framework application. You will also create the user registration and login process, adding user information to the database and pulling it back out again.
Parts 3 and 4 deal with the actual RSS and Atom feeds. In Part 3, you enable users to subscribe to individual feeds and to display the items listed in those feeds. You also look at some of the Zend Framework's form-handling capabilities, validating data, and sanitizing feed items. Part 4 explains how to create a proxy to pull data from a site that has no feed.
The rest of the series involves adding value to the Chomp application.
5, you look at using the PDF format as a type of backup for saved entries. In Part 6, you use the
Zend_Mail module to alert users to new posts.
In Part 7, you
look at searching saved content and returning ranked results. In Part
8, you create your own mashup, leveraging web services from Amazon, Flickr, Twitter
and Yahoo! And in Part
You'll soon begin developing with the Zend Framework. The goal is to make Chomp the perfect online feed reader. In this tutorial, you will create the basic application, including the registration and login pages, using the Zend Framework implementation of the MVC pattern and its basic database classes. You will learn:
- How to set up Apache and the
- How to integrate PHP V5 into Apache
- Configuration changes for the Zend Framework
- How to use the MVC pattern
- How to create custom controllers
- How to create custom actions
- How to insert, extract, and update data in a database
- How to use Zend's general database capabilities
At the end of this tutorial, you will have the basic framework of the application, and you'll add feeds in Part 3.
This tutorial assumes that you are familiar with PHP. If you're not, check out the Resources to find the "Learning PHP" tutorial series. You should also have basic familiarity with how databases work, but you don't need to be an expert in the use of SQL.
To follow along, you will need to have several pieces of software installed. This tutorial will cover installation and configuration, but make sure to download the following:
- XAMPP is an easy-to-install version of Apache, MySQL, and PHP rolled into one. The version used for this tutorial (V1.7.3) contains Apache V2.2.14, PHP V5.3.1, and MySQL V5.1.41.
- Zend Framework
- This set of PHP classes is where all the work will be done. This tutorial was tested with V1.10.6.