CakePHP Application Development

Step-by-step introduction to rapid web development using the open-source MVC CakePHP framework

CakePHP Application Development

Starting
Ahsanul Bari, Anupom Syam

Step-by-step introduction to rapid web development using the open-source MVC CakePHP framework
$14.40
$39.99
RRP $23.99
RRP $39.99
eBook
Print + eBook
$12.99 p/month

Get Access

Get Unlimited Access to every Packt eBook and Video course

Enjoy full and instant access to over 3000 books and videos – you’ll find everything you need to stay ahead of the curve and make sure you can always get the job done.

+ Collection
Free Sample

Book Details

ISBN 139781847193896
Paperback332 pages

About This Book

  • Develop cutting-edge Web 2.0 applications, and write PHP code in a faster, more productive way
  • Walk through the creation of a complete CakePHP Web application
  • Customize the look and feel of applications using CakePHP layouts and views
  • Make interactive applications using CakePHP, JavaScript, and AJAX helpers
  • Ready for the forthcoming release of CakePHP 1.2

Who This Book Is For

If you already know PHP and want to develop cutting-edge Web 2.0 applications, or see how to write code in a faster, more productive way, then this book is ideal for you.

Table of Contents

Chapter 1: Introduction to CakePHP
What is CakePHP?
Improved Code Structure
Faster Development
Versions of CakePHP: 1.1 and 1.2
Summary
Chapter 2: A Quick Installation
Downloading CakePHP
Platform Requirements
Configuring Apache
Setting Up Cake in Web Root
Running Cake for the First Time
Summary
Chapter 3: A Quick App
Making Sure the Oven is Ready
CakeTooDoo: a Simple To-do List Application
Configuring Cake to Work with a Database
Writing our First Model
Writing our First Controller
Viewing All Tasks in CakeTooDoo
Adding a New Task
Editing a Task
Adding Data Validation
Deleting a Task from CakeTooDoo
Viewing Completed Tasks and Pending Tasks
Formatting Date and Time
Creating the CakeTooDoo Homepage
Summary
Chapter 4: Controllers: Programming Application Logic
Interacting with Model
Action, Parameters, and Views
Actions and Parameters
Getting Post Data from the View
Redirecting
AppController: The Parent Controller
Working with Components
Summary
Chapter 5: Models: Accessing Data
Setting Up Database and Models
Retrieving Data
Saving and Updating Data
Deleting Data
Placing Your Own Logic Inside Model
Validating Your Data
Summary
Chapter 6: ORM: Modelling the Table Relationship
Working with Simple Associations
Working with Complex Associations
Summary
Chapter 7: Views: Creating User Interfaces
Working with Layouts
Using Elements
Working with Helpers
Creating Forms to Take User Input
Summary
Chapter 8: Using Shells: Get Further, Faster
Setting Up the Cake Shell
Baking an Application
Summary
Chapter 9: Making Quickwall: The Basics
What is This Quickwall All About?
Setting Up Cake
Creating and Connecting the Database
Creating and Defining Relationships between Models
Creating the Basic Controller Actions and Their Views
Adding Custom Layout
Adding Forms to Add New Questions and Answers
Summary
Chapter 10: Quickwall: User Authentication
Creating the User Model and the Users Controller
Making the User Sign Up Process
Adding Email Confirmation to Sign Up
Integrating Authentication: Database and Models
Integrating Authentication: Controllers
Integrating Authentication: Views
Remembering User with Cookie
Summary
Chapter 11: Quickwall: JavaScript and AJAX
Adding JavaScript Validation
AJAX Link to Show Own Questions
AJAX AutoComplete to Search Users
AJAX Form Submit to View Questions of a User
In-Line Editing to Edit Own Answers
Summary
Chapter 12: Quickwall: Making It Better
Making Dates More Readable
Creating a User Page
Linking the Search Page to the User Page
Adding Pagination
Adding RSS Feeds
Summary

What You Will Learn

  • Develop well-structured applications faster, using CakePHP's MVC
  • Install and set up CakePHP
  • Create and configure your database to build a bookmark manager interface step by step
  • Build a model that that integrates with your database and provides basic features to your application: inserts, updates, deletes, searches, and relationships
  • Create views that present the user interface in an attractive, organized, and maintainable way
  • Develop controllers to interact with model classes, use callback functions, and create reusable components
  • Prototype applications fast using scaffolding to auto-generate user interface code
  • Create custom user interfaces using layouts, elements, helper classes, and CakePHP's FormHelper
  • Build complex data models with multiple related tables, using Cake associations
  • Enhance your data models by adding new functionalities like user authentication and data validation
  • Automate repetitive tasks and speed up development using shells
  • Reduce the amount of code you write yourself using Bake to automatically generate essential code based on your database design
  • Add interactivity using JavaScript and AJAX
  • Work with user pages, search, pagination, and RSS

In Detail

Cake is a rapid development framework for PHP that uses well-known design patterns and provides a structured framework that enables PHP users at all levels to rapidly develop robust web applications, without any loss of flexibility. It means you can code faster, your code is better, and it makes writing Web 2.0-style apps a snap.

This book offers step-by-step instructions to learn the CakePHP framework and to quickly develop and deploy web-based applications. It introduces the MVC pattern and coding styles using practical examples. It takes the developer through setting up a CakePHP development and deployment environment, and develops an example application to illustrate all of the techniques you need to write a complete, non-trivial application in PHP. It aims to assist PHP programmers to rapidly develop and deploy well-crafted and robust web-based applications with CakePHP.

Authors

Table of Contents

Chapter 1: Introduction to CakePHP
What is CakePHP?
Improved Code Structure
Faster Development
Versions of CakePHP: 1.1 and 1.2
Summary
Chapter 2: A Quick Installation
Downloading CakePHP
Platform Requirements
Configuring Apache
Setting Up Cake in Web Root
Running Cake for the First Time
Summary
Chapter 3: A Quick App
Making Sure the Oven is Ready
CakeTooDoo: a Simple To-do List Application
Configuring Cake to Work with a Database
Writing our First Model
Writing our First Controller
Viewing All Tasks in CakeTooDoo
Adding a New Task
Editing a Task
Adding Data Validation
Deleting a Task from CakeTooDoo
Viewing Completed Tasks and Pending Tasks
Formatting Date and Time
Creating the CakeTooDoo Homepage
Summary
Chapter 4: Controllers: Programming Application Logic
Interacting with Model
Action, Parameters, and Views
Actions and Parameters
Getting Post Data from the View
Redirecting
AppController: The Parent Controller
Working with Components
Summary
Chapter 5: Models: Accessing Data
Setting Up Database and Models
Retrieving Data
Saving and Updating Data
Deleting Data
Placing Your Own Logic Inside Model
Validating Your Data
Summary
Chapter 6: ORM: Modelling the Table Relationship
Working with Simple Associations
Working with Complex Associations
Summary
Chapter 7: Views: Creating User Interfaces
Working with Layouts
Using Elements
Working with Helpers
Creating Forms to Take User Input
Summary
Chapter 8: Using Shells: Get Further, Faster
Setting Up the Cake Shell
Baking an Application
Summary
Chapter 9: Making Quickwall: The Basics
What is This Quickwall All About?
Setting Up Cake
Creating and Connecting the Database
Creating and Defining Relationships between Models
Creating the Basic Controller Actions and Their Views
Adding Custom Layout
Adding Forms to Add New Questions and Answers
Summary
Chapter 10: Quickwall: User Authentication
Creating the User Model and the Users Controller
Making the User Sign Up Process
Adding Email Confirmation to Sign Up
Integrating Authentication: Database and Models
Integrating Authentication: Controllers
Integrating Authentication: Views
Remembering User with Cookie
Summary
Chapter 11: Quickwall: JavaScript and AJAX
Adding JavaScript Validation
AJAX Link to Show Own Questions
AJAX AutoComplete to Search Users
AJAX Form Submit to View Questions of a User
In-Line Editing to Edit Own Answers
Summary
Chapter 12: Quickwall: Making It Better
Making Dates More Readable
Creating a User Page
Linking the Search Page to the User Page
Adding Pagination
Adding RSS Feeds
Summary

Book Details

ISBN 139781847193896
Paperback332 pages
Read More

Recommended for You

CakePHP 2 Application Cookbook
$ 29.99
CakePHP 1.3 Application Development Cookbook
$ 23.99
Magento PHP Developer's Guide - Second Edition
$ 35.99
CodeIgniter 1.7 Professional Development
$ 23.99
Magento PHP Developer’s Guide
$ 26.99