Over 60 great recipes for developing, maintaining, and deploying web applications Create elegant and scalable web applications using CakePHP Leverage your find operations with virtual fields, ad-hoc queries, and custom find types Add full internationalization support to your application, including translation of database records Part of Packt's Cookbook Each recipe is a carefully organized sequence of instructions to complete the task as efficiently as possible In Detail CakePHP is a rapid development framework for PHP that provides an extensible architecture for developing, maintaining, and deploying web applications. While the framework has a lot of documentation and reference guides available for beginners, developing more sophisticated and scalable applications require a deeper knowledge of CakePHP features, a challenge that proves difficult even for well established developers. The recipes in this cookbook will give you instant results and help you to develop web applications, leveraging the CakePHP features that allow you to build robust and complex applications. Following the recipes in this book you will be able to understand and use these features in no time. We start with setting up authentication on a CakePHP application. One of the most important aspects of a CakePHP the relationship between models, also known as model bindings. Model binding is an integral part of any application's logic and we can manipulate it to get the data we need and when we need. We will go through a series of recipes that will show us how to change the way bindings are fetched, what bindings and what information from a binding is returned, how to create new bindings, and how to build hierarchical data structures. We also define our custom find types that will extend the three basic ones, allowing our code to be even more readable and also create our own find type, with pagination support. This book also has
The promise of "Over 60 great recipes for developing, maintaining, and deploying web application" is fulfilled.
Some cakephp books are good, some a little bit less; most are the "learn cakephp from the basics" and "follow me while I develop those simple apps" type - that's good, but this one is different. Mariano's book is probably what many where missing - the step beyond the blog tutorial. It fills the only gap left in cakephp manuals: dig deeper in single topics, from Auth to creating and consuming webservices, from model bindings to validation and behaviours, from datasources to routing, shells, internationalization, testing and core utility classes.
The recipes are organized in chapters, by topic - from the simplest to the most advanced. Each recipe addresses a single problem or task, with a clean example -and is organized in (at least) 3 parts: "getting started" (prerequisites, setup, database dump..), "How to do it" (the actual code and guided steps) and "How it works" (explanation of what happened in phase 2). It's useful to better understand the topic, and -probably- as a starting point for your ouwn code. It's also easy to find answers to the questions that arise after the development of the first real cake apps. This is the kind of book you can read normally - sequentially, from start to finish - or jumping from chapter to chapter based on your actual needs and topics you want to go deeper in.
One final note on one of the main strong points of this book: the author, Mariano Iglesias, is a well known cakephp expert and contributor; other big names are among the technical reviewers, like Nick Baker and Mark Story (cakephp lead developer). It seems, they take quality assurance seriously.
pros
well organized, structured content real world problems and common / advanced tasks covered clear code, easy to understand examples expert author and first class technical reviewers
cons not for beginners you will probably want more
Great CakePHP cookbook with lots of commonly needed recipes!
The CakePHP Cookbook, like all “Cookbooks”, gives you many code snippets to create commonly needed systems, which are used to create complex applications.
The book covers a wide range of topics that would be useful in most applications that you are likely to develop. From creating a user login and authorization system, or using the OpenID system to login users, to gathering data from different sources, such as CSV files, RSS feeds and even twitter, there are many different recipes that are invaluable, and save time when working with CakePHP to create online applications.
It is worth noting though that this book is not aimed at beginners to CakePHP, and although you could understand the code after at least completing the blog tutorial on the CakePHP site, the book will be most valuable to developers who have used CakePHP before, and need to integrate any of the normal systems that the book covers into their CakPHP based application.
Overall it is a very helpful cookbook type book for finding recipes for adding useful functionality to your CakePHP applications.