Zend Framework: Part 1 – Introduction

Introduction

Zend Framework is an open source, object oriented web application framework for PHP 5. ZF 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 ZF applications. The MVC paradigm is a way of breaking an application into three parts: the model, the view, and the controller. Let’s break down the pattern and take a look at the individual pieces:

MVC Diagram
MVC Diagram
  • Model – This is the part of your application that defines its basic functionality behind a set of abstractions. Data access routines and some business logic can be defined in the model
  • View – Views define exactly what is presented to the user. Usually controllers pass data to each view to render in some format. Views will often collect data from the user, as well. This is where you’re likely to find HTML markup in your MVC applications
  • Controller – Controllers bind the whole pattern together. They manipulate models, decide which view to display based on the user’s request and other factors, pass along the data that each view will need, or hand off control to another controller entirely

A simple diagram will show you the basics of the MVC system:

Zend Framework's MVC system
Zend Framework's MVC system

Leave a Reply