In this second part of a four-part series on the MVC paradigm and the Zend framework, you'll learn what the framework can help you accomplish and how to install it. This article is excerpted from the chapter 25 of the book Beginning PHP and Oracle: From Novice to Professional, written by W. Jason Gilmore and Bob Bryla (Apress; ISBN: 1590597702).
The Zend Framework, an open source project fostered by the prominent PHP product and services provider Zend Technologies ( http://www.zend.com/) was at the time of this writing the most aggressively developed of the four frameworks. Additionally, the Zend Framework provides a variety of task-specific components capable of carrying out tasks that are becoming increasingly commonplace in today's cutting-edge Web applications. In addition to facilitating MVC-driven development, the Zend Framework can automate CRUD (create, retrieve, update, delete) database operations, and perform data caching and filter input. But what makes the Zend Framework particularly intriguing is the assortment of components it offers for performing nonessential but increasingly commonplace tasks such as creating PDF's, interacting with the Amazon, Flickr, and Yahoo! APIs, and consuming RSS feeds.
The rest of this chapter is focused on a fast-paced introduction to the Zend Framework's key features, serving to acquaint you with its usage as well as to excite you about the amazing boost in productivity it and similar frameworks have to offer.
Introducing the Zend Framework
Although all of the frameworks presented in the previous section are very powerful and worthy of further consideration, Zend's particularly unique approach to framework development led to the decision to explore it further in this chapter. To begin, Table 25-1 summarizes the components available by way of the framework, which should give you a pretty good idea of its diverse set of capabilities. This is followed by an overview of the installation process, and finally two examples. The first example is intended to show you just how easy it is to construct a Web site skeleton using the framework, while the second offers a somewhat more practical twist, using the Yahoo! Web Services component to facilitate sales research.
To begin, take a moment to review Table 25-1, which presents a partial list of the most interesting Zend Framework components accompanied by a brief description. In the two examples found later in this section, you'll learn how to deploy several of these components.
Table 25-1. A Partial Listing of Zend's Feature-Specific Components
Facilitates interaction with Amazon E-Commerce Service.
Caches data into speedy backend adapters such as RAM, SQLite, and APC (Alternative PHP Cache).
Facilitates the management of application configuration parameters.
Manages the framework’s controller component.
Table 25-1. A Partial Listing of Zend's Feature-Specific Components (Continued)
Drives the framework’s PDO-based database API abstraction layer.
Consumes RSS and Atom feeds.
Facilitates the filtering and validation of data, including the ability to validate proper syntax for commonplace values such as e-mail addresses, credit card numbers, dates (according to ISO 8601 format), and phone numbers.
Relies upon the methods provided by Zend_Filterto filter input.
Provides an interface to several of Google’s services, including, among
others, Google Blogger, Google Calendar, and Google Notebook.
Performs HTTP requests. Presently capable of executing GET, POST, PUT, and DELETE requests.
Facilitates application logging.
Sends text and MIME-compliant e-mail.
Parses MIME messages.
Creates PDF documents.
Facilitates search engine development using the Lucene library.
Facilitates interaction with the Amazon Web Services API.
Facilitates interaction with the Flickr Web Services API.
Facilitates interaction with the Yahoo! Web Services API.
Manages the framework’s view component.
Provides support for consuming and serving XML-RPC implementations.