Before you start
This tutorial is for developers who want to understand the
Model-View-Controller (MVC) pattern, pushing beyond what is covered in
Part 2, as well as how to build a feed reader using the Zend_Feed and Zend_Filter_Input modules of the Zend Framework.
This "Understanding the Zend Framework" series chronicles the building of an online feed reader, Chomp, while explaining the major aspects of using the recently introduced open source PHP Zend Framework.
Part 1 looked at the overall concepts of the Zend Framework, including a list of relevant classes and a general discussion of the MVC pattern. Part 2 expanded on that to show how MVC can be implemented in a Zend Framework application. You also created 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. Here in Part 3, you enable users to subscribe to individual feeds and to display the items listed in those feeds. You will 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.
In Part 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. Part 7 looks at searching saved content and
returning ranked results. In Part
8, you create your own mashup, adding
information from Amazon, Flickr, Twitter and Yahoo! And in Part 9, you add Ajax interactions to the site using JavaScript object notation.
In this tutorial, you add feeds into the equation, enabling the user to
create an account, subscribe to particular feeds, and display those feeds. This tutorial uses the Zend_Feed and Zend_Input_Filter modules, the latter used to verify email addresses
and strip HTML tags from feed entries. You will learn:
- How to use the
Zend_Input_Filtermodule to:
- Filter incoming
GETorPOSTdata
- Filter incoming
- About RSS feeds
- How to use the
Zend_Feedmodule to read data from RSS feeds - How to save, view, and delete feed entries to or from the database for later access
At the end of this tutorial, you will have the basic framework of the feed-reader application and be ready to start saving entire articles from non-RSS supporting websites to the database in Part 4.
This tutorial assumes that you are familiar with PHP. (If you're not, see Resources for 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 (you'll be especially fine if you have completed Part 2 of this series). And you should also be familiar with RSS feeds.
To follow along, you will need to have some pieces of software installed. Look back at Part 2 for details on installation and configuration of the following:
- XAMPP
- 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.




