David Golding



More on the CakePHP Book

By David Golding

Long time, no see. But thanks, everyone, for your fabulous feedback on the sample chapters I sent out there of my “Newbie’s Introduction to CakePHP.” The book reached a new milestone today, and so I thought I’d write about how the book is coming along and what to expect in the near future. I have now written over 100 pages, and still trucking along :) I anticipate making this thing available as soon as possible. In order to push it out to the marketplace the quickest, I’ve opted to self-publish on Lulu.com. I’ve used Lulu before, and I absolutely love its interface and printing specs, so it seems like a win-win scenario: you get the book faster (no publishers editing the thing and slowing down the process) and I get to manage my own dang book ;)

So far, the book covers a lot more and is based entirely on Cake 1.2, so no worries about deprecated functions, methods, etc. in the book. Here’s the current table of contents:

Introduction
Why Cake
Models, Views, and Controllers (MVC)
CRUD Operations
Scaffolding
Helpers
Large Community
Much More

A Newbie’s Guide
What This Book Is Not

Installing Cake
Localhost First, Remote Last
Why Doing It All Remotely Is Bad
Localhost Setup
Setting Up On a Mac
Setting Up On a PC Running Windows
“Hello World,” and Testing the Localhost
Running MySQL
A Quick Overview of Database Management
How It’s Organized
PHPMyAdmin
Other MySQL Tools
Typical Settings
Creating Tables, Fields, and Records

Running CakePHP
Off the Ground
Setup Routines

Your First Cake App
Plain-text Editors and Other Applications
A To-Do List Application
Create the Database Schema
Create the Items Controller
Create the Items Model
Launch Your App

Naming Conventions
Controllers
Models
Views
More Than One Word in the Title

Changing the Design
How Views Work
Creating Individual Views
Add the Index Action to the Controller
Create the Index View

Using Bake to Create Views
Getting the Bake Script Working on our Localhost
Bake the CRUD Views
Cleaning Up the Views
Make the Priority Field a Select Tag
Change the Index View to Better Display

A (More Extensive) Blog Application
Database First, Always
Plain English Explanation of the Blog
Table Associations
Create the Tables
Make the Extensive Blog Application Folders
Create the Scaffolding
Use the Scaffolding to Test the Associations
Bake the Blog’s Views
Line-By-Line Look At the Baked Controller
The Home Page
The Article View
User Comments
The Form and Text Helpers
Using Ajax
How Ajax Works
Prepare the Ajax Helper
Work Ajax Into the Article View
Ajax Comments Voting

… and more to come. (FYI, the Extensive Blog Application is so far over 50 pages in length, so, extensive indeed!)

I should complete the second hundred pages within the month (as in before December) and then have the book out by then, I hope. Feel free to drop me a line with suggestions on what to include, how to expand on the book, etc. The reviews of sample chapters have been pouring in, and they’ve been thorough and helpful, so keep them coming.


Beginning CakePHP: From Novice to Professional by David Golding

David Golding

A blog about CakePHP, web design, and grad studies in religion. © 2008, D. Golding