Apress Access

Beginning CakePHP

From Novice to Professional

By David Golding

  • eBook Price: $30.99
Buy eBook Buy Print Book
Start with the basic setup of CakePHP and progress to building some applications that will highlight CakePHP's functionality and capabilities. With Beginning CakePHP, you'll avoid delving too deeply into the PHP language and focus on everything the CakePHP framework can offer the developer.

Full Description

  • Add to Wishlist
  • ISBN13: 978-1-4302-0977-5
  • User Level: Beginner to Advanced
  • Publication Date: July 24, 2008
  • Available eBook Formats: EPUB, MOBI, PDF

Related Titles

  • Go Recipes
  • Learn CakePHP, Second Edition
  • PHP Development Tool Essentials
  • PHP and MySQL Recipes
  • Practical Laravel 5
  • Lumen Programming Guide
Full Description

CakePHP is a leading PHP–based web app development framework. When asking a question on forums or chat rooms, many CakePHP beginners get little help from the experts. Simple questions can get a response like, “Well, just read the online manual and API.” Unfortunately, the online manual is depreciated, and who wants to absorb a programming language or framework from an API? Beginning CakePHP will do the following:

  • Lead you from a basic setup of CakePHP to building a couple applications that will highlight CakePHP’s functionality and capabilities without delving too deeply into the PHP language, but rather what the CakePHP framework can offer the developer.
  • Teach you to use CakePHP by incorporating advanced features into your web development projects.
  • Target beginners of CakePHP or web frameworks in general as well as experienced developers with limited exposure to CakePHP. A secondary audience may include developers undecided on adopting CakePHP or business managers trying to assess the value of incorporating CakePHP into their toolbox.

What you’ll learn

  • Install and configure the CakePHP web framework
  • Create your first CakePHP web application: to–do lists
  • Progress by building a more complex blogging application
  • Incorporate Ajax and Web 2.0 principles and techniques into your blogging and other CakePHP applications
  • Apply these sample applications along with advanced techniques as a framework or template for building your own web applications with CakePHP going forward

Who this book is for

This book will speak to an audience of developers already familiar with PHP but who may not be PHP experts. This book is tailored for those new to CakePHP and who want a thorough tutorial.

Table of Contents

Table of Contents

  1. Introduction
  2. Installing and Running CakePHP
  3. Creating a To-Do List Application
  4. Naming Files and Designing the Database
  5. Creating Simple Views and Baking in the Console
  6. Customizing Views
  7. Working with Controllers and Models
  8. Implementing Ajax Features
  9. Helpers
  10. Routes
  11. Components and Utilities
  12. Vendors
  13. Plugins
  14. DataSources and Behaviors
  15. Wrapping Up the Application

Source Code/Downloads

Downloads are available to accompany this book.

Your operating system can likely extract zipped downloads automatically, but you may require software such as WinZip for PC, or StuffIt on a Mac.


If you think that you've found an error in this book, please let us know by emailing to editorial@apress.com . You will find any confirmed erratum below, so you can check if your concern has already been addressed.

On page 83:

Listing 6-8

<?php echo $html->link("<h1>".$post['Post']['name']."</h1>", '/posts/view/'.$post['Post']['id'],null,null,false);?>

should read

<?php echo $html->link("<h1>".$post['Post']['name']."</h1>", '/posts/view/'.$post['Post']['id'],array('escape' => false),null,false);?>

On page 107:
The Post model and controller custom functions findByYear should read findByDate. CakePHP uses the findByxxx to supply the column to retrieve. The documentation for this can be found here http://book.cakephp.org/view/1026/findBy

On page 117:

Previous examples in the book have you calling the Session helper, when defining your helpers in the AppController you also need to specify Session helper to be included:


class AppController extends Controller {
var $helpers = array('Html','Form','Ajax','Javascript', 'Session');


    1. PHP Objects, Patterns, and Practice


      View Book

    2. Beginning Android 3D Game Development


      View Book

    3. Troubleshooting Oracle Performance


      View Book

    4. Beginning Amazon Web Services with Node.js


      View Book