Table of Contents
Zend Framework is an open source, object oriented web application framework for
PHP 5. Zend Framework is often called a 'component library', because
it has many loosely coupled components that you can use more or less independently. But
Zend Framework also provides an advanced Model-View-Controller (MVC)
implementation that can be used to establish a basic structure for your Zend Framework
applications. A full list of Zend Framework components along with short descriptions may
be found in the components overview. This
QuickStart will introduce you to some of Zend Framework's most commonly used components,
with a few view helpers.
Using these components, we will build a simple database-driven guest book application within minutes. The complete source code for this application is available in the following archives:
So what exactly is this MVC pattern everyone keeps talking about, and why should you care? MVC is much more than just a three-letter acronym (TLA) that you can whip out anytime you want to sound smart; it has become something of a standard in the design of modern web applications. And for good reason. Most web application code falls under one of the following three categories: presentation, business logic, and data access. The MVC pattern models this separation of concerns well. The end result is that your presentation code can be consolidated in one part of your application with your business logic in another and your data access code in yet another. Many developers have found this well-defined separation indispensable for keeping their code organized, especially when more than one developer is working on the same application.
Let's break down the pattern and take a look at the individual pieces:
Of course there is more to be said about this critical pattern, but this should give you enough background to understand the guestbook application we'll be building.