O'Reilly logo

Beginning CakePHP: From Novice to Professional by David Golding

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 11Components and Utilities

Cake uses helpers to extend the functionality of views. By placing several view functions in helpers, not only do your views remain light but the application is better organized. There is no precise method for how to organize functions in a helper other than keeping order and maintaining consistency in the application. Helpers are to the view what components and utilities are to the controller. In a way, you could think of components as "controller helpers."

Why Use Components?

But you may ask, why have components when there's an App controller? Shouldn't the App controller hold all the functions used by multiple controllers? Yes and no. The App controller does hold more generalized actions, or actions that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required