Level: Intermediate Duane O'Brien (d@duaneobrien.com), PHP developer, Freelance
12 Dec 2006 Updated 22 Jan 2008 CakePHP is a stable production-ready, rapid-development aid for
building Web sites in PHP. This "Cook
up Web sites fast with CakePHP" series shows you how to build an online product catalog using CakePHP.
In this tutorial
Editor's note: This series was originally published in 2006 and 2007. Since its
publication, CakePHP developers made significant changes to CakePHP, which made this
series obsolete. In response to these changes and the popularity of this series, the
authors revised each of its five parts to make it compliant with the version of CakePHP
available in January 2008. This tutorial shows you how to jump-start your CakePHP application using scaffolding
and Bake. You will also learn the ins and outs of using CakePHP's ACLs. You'll get a
look at what scaffolding is and what it provides. Then you'll learn how to use Bake to
generate the code for a scaffold, letting you tweak it as you go. Finally, you will
learn about ACLs: what they are, how to create them, and how to use them in your
application. This tutorial builds on the online product application Tor created
in Part 1.
Prerequisites
It is assumed that you are familiar with the PHP programming language, have a
fundamental grasp of database design, and are comfortable getting your hands dirty. A
full grasp of the MVC design pattern is not necessary, as the fundamentals will be
covered during this tutorial. More than anything, you should be eager to learn, ready
to jump in, and anxious to speed up your development time.
System requirements
Before you begin, you need to have an environment in which you can work. CakePHP has reasonably minimal server requirements:
- An HTTP server that supports sessions (and preferably
mod_rewrite). This tutorial was written using Apache V2.2.4 with mod_rewrite enabled.
- PHP V4.3.2 or later (including PHP V5). This tutorial was written using PHP V5.2.3
- A supported database engine. this tutorial was written using MySQL V5.0.4
You'll also need a database ready for your application to use. The tutorial will
provide syntax for creating any necessary tables in MySQL. The simplest way to download CakePHP is to visit CakeForge.org and download the latest
stable version. This tutorial was written using V1.2.0. Nightly builds and copies
straight from Subversion are also available. Details are in the CakePHP Manual.
Formats html, pdf
|