CakePHP Application Development

Ahsanul Bari, Anupom Syam

eBook: $23.99
Formats: PDF, PacktLib, ePub and Mobi formats
$14.39 save 40%!
Print book: $39.99
$35.99 save 10%!
Print + eBook bundle: $63.98
Includes free access to the book on PacktLib
$39.59 save 38%!
Free Shipping! UK, US, Europe and selected countries in Asia.
This book can also be purchased from:
Overview
Table of Contents
The Author
Reviews
Downloads
  • 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

Book Details

Language : English
Paperback : 332 pages [ 235mm x 191mm ]
Release Date : July 2008
ISBN : 1847193897
ISBN 13 : 978-1-847193-89-6
Author(s) : Ahsanul Bari, Anupom Syam
Topics and Technologies : All Books, Open Source, PHP


Table of Contents

Preface
Introduction to CakePHP
A Quick Installation
A Quick App
Controllers: Programming Application Logic
Models: Accessing Data
ORM: Modelling the Table Relationship
Views: Creating User Interfaces
Using Shells: Get Further, Faster
Making Quickwall: The Basics
Quickwall: User Authentication
Quickwall: JavaScript and AJAX
Quickwall: Making It Better
Index
  • Preface
    • What This Book Covers
    • Who is This Book for
    • Conventions
    • Reader Feedback
    • Customer Support
      • Downloading the Example Code for the Book
      • Errata
      • Questions
  • Introduction to CakePHP
    • What is CakePHP?
      • A PHP Framework
      • Common Design Patterns
      • Rapid Web Development
      • Works with PHP4 and PHP5
      • CakePHP is Free and Open Source
    • Improved Code Structure
      • Understanding the MVC Pattern
      • Models
      • Controllers
      • Views
      • How It Works
    • Faster Development
      • Less Configuration, More Convention
      • Auto Code Generation
      • Quick Access to Related Data
      • Built-in Commonly Used Functionalities
    • Versions of CakePHP: 1.1 and 1.2
    • Summary
  • A Quick Installation
    • Downloading CakePHP
    • Platform Requirements
    • Configuring Apache
      • AllowOverwrite is Set to All
      • Mod_rewrite Module is Loaded
    • Setting Up Cake in Web Root
    • Running Cake for the First Time
    • Summary
  • 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
  • Controllers: Programming Application Logic
    • Interacting with Model
      • Attaching Models and Controllers
    • Action, Parameters, and Views
      • Interacting with View
      • Actions and Parameters
      • Getting Post Data from the View
    • Redirecting
    • AppController: The Parent Controller
    • Working with Components
    • Summary
  • Models: Accessing Data
    • Setting Up Database and Models
      • Creating a Model for a Database Table
    • Retrieving Data
      • Using Model to Retrieve Data
      • More on Data Retrieval
    • Saving and Updating Data
      • Saving Data
      • Updating a Record
      • More on the save() Method
      • Updating a Single Field
      • Batch Update
    • Deleting Data
      • Deleting a Single Record
    • Placing Your Own Logic Inside Model
      • Create and Use Your Own Model Method
    • Validating Your Data
      • Adding Validation to Our Model
    • Summary
  • ORM: Modelling the Table Relationship
    • Working with Simple Associations
      • Defining One-To-Many Relationship in Models
      • Retrieving Related Model Data in One-To-Many Relation
      • Saving Related Model Data in One-To-Many Relation
      • Adding More than One Association of the Same Type
      • One-To-One Relation
      • Customizing Association Characteristics
    • Working with Complex Associations
      • Defining Many-To-Many Relationship in Models
      • Retrieving Related Model Data in Many-To-Many Relation
      • Saving Related Model Data in Many-To-Many Relation
      • Deleting Associated Data
      • Changing Association On The Fly
    • Summary
  • Views: Creating User Interfaces
    • Working with Layouts
      • Creating Custom Layouts
    • Using Elements
      • Creating and Using Element
    • Working with Helpers
      • Creating and Using Your Own Helper
      • Creating Forms to Take User Input
    • Summary
  • Using Shells: Get Further, Faster
    • Setting Up the Cake Shell
      • Setting Up the Cake Shell in Windows
      • Setting Up the Cake Shell in *nix
    • Baking an Application
      • Creating and Configuring the Database
      • Baking Models
      • Baking Controllers
      • Baking Views
    • Summary
  • 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
  • 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
  • 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
  • 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

Ahsanul Bari

Ahsanul Bari is a web application developer from Dhaka, Bangladesh. After graduating from North South University with a bachelor's degree in Computer Science, he has been involved in developing various web applications for local businesses. At a very early stage of his career he felt the need for tools and techniques to build structured and maintainable web applications. That is when he found out about CakePHP. It was love at first sight and he decided to use CakePHP for his future projects. He never had to look back, and from then on he has been heavily using CakePHP for all kinds of projects. Most notably, using CakePHP, he developed an ERP solution for companies involved in urban and land development.

Apart from that, he has also 'irregularly' contributed to the CakePHP Documentation Team. He is also an 'irregular' blogger (http://ahsanity.com and http://ahsanity.wordpress.com). Just when people start to think that he has given up blogging, he is known to write a post from nowhere! Among his friends and colleagues, he is known as a fanboy for CakePHP.

Currently he is working at Trippert Labs, where he has been involved in making a travel-based blogging system, http://www.trippert.com.


Anupom Syam

Anupom Syam is a web application developer from Dhaka, Bangladesh. He started programming back in 1998 in C when he was a high school kid. In his early university years, he met Java and fell in love immediately. Through the years he has become proficient in various aspects of Java (ME, SE, and EE). Early in his career he was engaged mainly in building localized mobile applications. Over time his interest in web technologies grew and he did not hesitate to jump onto the Web 2.0 bandwagon. Over the last five years he has been working with different startups and building web/mobile applications. He currently works as a Development Engineer at Trippert, Inc. where he has been involved in developing a travel-based blogging system http://www.trippert.com (which is developed using CakePHP) as the lead back-end programmer.

He loves to build rich-client web apps with JavaScript/AJAX in the front end and CakePHP/RoR/MySQL in the back end. He still uses Java heavily for his personal fun-time projects. He also maintains blogs: http://anupom.wordpress.com and http://syamantics.com. Besides programming he is interested in many things, ranging from the most recent scientific discoveries to ancient Vedic philosophies.

Sorry, we don't have any reviews for this title yet.

Sample chapters

You can view our sample chapters and prefaces of this title on PacktLib or download sample chapters in PDF format.

Find your book in our support section to find errata and to download code samples.

What you will learn from this book

  • 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

Special Offers

PacktLib gives you access to this and 600+ other titles with an annual or monthly subscription.

Annual subscription:

$220.00 per annum

Monthly subscription:

$21.99 per month

Buy 2 eBooks and Get 50% Off +
Buy CakePHP Application Development with Object-Oriented Programming with PHP5 and get 50% off both the eBooks.
 
Just add both the eBooks to your shopping cart and enter ado5p in the 'Enter Promotion Code' field. Click 'Add Promotion Code' and the discount will be applied.
View Best Selling eBook offers

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.

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

Approach

This book starts by installing Cake and building our first application, then looking at each main component of a CakePHP application in detail. We then learn how to build Web 2.0 style applications quickly using a case study application. The book is packed with example code and demo applications, so that you can see techniques in action.

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.

Are there no books available that are right for you at the moment? How about signing up to our newsletter to keep up to date?
Awards Voting Nominations Previous Winners
Judges Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Resources
Open Source CMS Hall Of Fame CMS Most Promising Open Source Project Open Source E-Commerce Applications Open Source JavaScript Library Open Source Graphics Software
Sort A-Z