You are previewing Beginning CakePHP: From Novice to Professional.
O'Reilly logo
Beginning CakePHP: From Novice to Professional

Book 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.

Table of Contents

  1. Title Page
  2. Dedication
  3. Contents at a Glance
  4. Contents
  5. About the Author
  6. About the Technical Reviewer
  7. Acknowledgments
  8. CHAPTER 1: Introduction
    1. From Novice to Professional
    2. Why Cake?
    3. Summary
  9. PART 1: Getting Started
    1. CHAPTER 2: Installing and Running CakePHP
      1. A Simple Start: Running Cake on a Localhost Environment
      2. Running the Setup Routines
      3. Summary
    2. CHAPTER 3: Creating a To-Do List Application
      1. Exploring the MVC Structure
      2. Designing and Creating the Database
      3. Creating Models
      4. Creating Controllers
      5. Launching the Application
      6. Creating the Scaffolding
      7. Summary
  10. PART 2: Developing CakePHP Applications
    1. CHAPTER 4: Naming Files and Designing the Database
      1. Convention Over Configuration
      2. MVC Default Behaviors
      3. Naming Conventions
      4. Poorly Designed Databases
      5. Table Associations
      6. Beyond the Scaffold
      7. Summary
    2. CHAPTER 5: Creating Simple Views and Baking in the Console
      1. Introducing Layouts
      2. Creating Individual Views
      3. Using Bake to Create Views
      4. Editing Baked Views
      5. Using Commands for Faster Baking
      6. Customizing Views
      7. Summary
    3. CHAPTER 6: Customizing Views
      1. Handling User Interactions
      2. Writing Individual View Files
      3. Using Other Helpers
      4. Summary
    4. CHAPTER 7: Working with Controllers and Models
      1. Building an Extensive Blog
      2. Working with Actions
      3. Customizing the Controller for the Blog
      4. Creating a Model for the Blog
      5. Writing Custom Model Functions
      6. Trimming Results
      7. Summary
    5. CHAPTER 8: Implementing Ajax Features
      1. How Ajax Works
      2. Preparing the Ajax Helper
      3. Adding Comments to the Blog
      4. Working Ajax into the View
      5. Working Ajax into the Controller
      6. Using Other Ajax Helper Functions
      7. Doing More with the Ajax Helper
      8. Uploading Files with jQuery
      9. More Ajax Features
      10. Summary
  11. PART 3: Advanced CakePHP
    1. CHAPTER 9: Helpers
      1. Installing Helpers
      2. Using Cake's Built-in Helpers
      3. Using Other Built-in Helpers
      4. Creating Custom Helpers
      5. Customizing Helper Variables
      6. Summary
    2. CHAPTER 10: Routes
      1. The Basic Route
      2. Arguments
      3. Reverse Routing
      4. Admin Routing
      5. Route Parameters
      6. Parsing Files with Extensions Other Than .php
      7. Summary
    3. CHAPTER 11: Components and Utilities
      1. Why Use Components?
      2. Using Built-in Components
      3. Utility Classes
      4. Third-Party Components
      5. Creating Custom Components
      6. Summary
    4. CHAPTER 12: Vendors
      1. Using Vendors
      2. Making No Assumptions for Third-Party Scripts
      3. Installing a Third-Party Script
      4. Using Other Frameworks with CakePHP
      5. Summary
    5. CHAPTER 13: Plugins
      1. Installing a Third-Party Plugin
      2. Creating Custom Plugins
      3. The Calendar Plugin
      4. Summary
    6. CHAPTER 14: DataSources and Behaviors
      1. Extending the Model with DataSources and Behaviors
      2. Working with DataSources
      3. Working with Behaviors
      4. Summary
    7. CHAPTER 15: Wrapping Up the Application
      1. Designing the Home Page
      2. Generating Dynamic Navigation
      3. Customizing the Overall Design
      4. Debugging the Application
      5. Running the Application on a Remote Host
      6. Summary
  12. PART 4: Appendixes
    1. APPENDIX A: Installation Issues
      1. Developing in a Localhost Environment
      2. Setting Up a Localhost
      3. Running MySQL
    2. APPENDIX B: How CakePHP Compares with Other Frameworks
      1. PHP Frameworks
      2. Using the Various Frameworks
  13. Index