 | Level: Intermediate Tyler Anderson (tyleranderson5@yahoo.com), Freelance Writer, Stexar Corp.
18 Jul 2006 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. In parts 1 and 2, we discuss the goals behind the Zend
Framework and show you how to use it to create the beginnings of our online
feed reader, creating a form and adding information to a database while getting
to know the MVC pattern. In this tutorial, you will see how to use the Zend
Framework to implement the online feed reader portion of the application. Objectives
By the end of this tutorial, you'll have the basic framework of the
feed-reader application and be ready to start saving entire articles from
non-RSS supporting Web sites to the database in Part 4. Specifically,
you'll know how to use the Zend_InputFilter module to automatically feed
data from the post, get, and session arrays into a Zend object
and to filter incoming get or post data. You'll understand more about RSS feeds. And you'll be able
to use the Zend_Feed module to read data from RSS feeds and be able to
save, view, and delete feed entries to or from the database for later access.
Prerequisites
This tutorial assumes familiarity with PHP. 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.
System requirements
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 pieces of software:
-
Apache HTTP Server
- Theoretically, you can use any HTTP server that supports PHP, but
you will also need to make use of the
mod_rewrite module in order to make the MVC functionality of the
Zend Framework work, so you will probably want to use Apache. For
Microsoft® Windows®, make sure you download a version of
Apache that is supported by PHP V5 as a module. (This tutorial only
covers module installation; if you want to install PHP as a CGI
program, you're on your own.) At the time of this writing, that
means Apache V2.0 -- not Apache V2.2. This tutorial was tested on Windows with Apache V2.0.58.
-
PHP V5
- This requires the functionality of PHP V5.0 and higher. However,
you should go with V5.1 or higher because it also uses PHP Data
Objects (PDO), which comes with that version. This tutorial was tested using V5.1.4.
-
Zend Framework
- This set of PHP classes is where all the work will be done. The
framework is still at an early stage, even though it does include a lot of functionality. This tutorial was tested with V0.1.3.
-
MySQL
- Ultimately, you will be able to use the Zend Framework with any
database for which an adapter exists, and the database
functionality will work the same way. That said, at the time of
this writing, your choices are somewhat limited. This tutorial uses
the MySQL database, tested with V4.0.21, but later versions should work.
Duration
Under 2 hours
Formats html, pdf
|  | |  |