I recently laid my hand on the book “Rapid Application Development with CakePHP 2.0” by Jose Diaz-Gonzalez. I am always looking for material, methods and ways which will help me shorten the training period for the programmers we hire. Being essentially a CakePHP shop we have over years collected and devised our own course which the developers undertake and practice with. The drawback is that we never got around to polishing our stuff and things are very disparate. This short 82 page book gave me several ideas to fine tune this roadmap.
What I liked most about the book was that rather than being mishmash of CakePHP code from various projects pasted together with some explanations, the book guides you through a series of best programming practices along with the related tool and technologies you would use.
What is inside the book
So while you will build a PasteBin application, you will also learn things like version control, virtual machines, dependency management, automated testing etc, which can be a bit overwhelming but it is not very hard to accomplish all the things mentioned.
The book begins with setting up a virtual environment with Vagrant and VirtualBox using FriendsOfCake/vagrant-chef which gives a nice cakePHP specific virtual machine.
Next comes the installation of CakePHP using Composer Package Manager along with a brief introduction how to use Composer for pulling in your project dependency, and initializes GIT to track changes. Yes the virtual machine we setup has GIT installed. At this point some readers may become a bit restless because the book takes its time for guiding the reader through setting up Unit Tests, automating them using Travis CI server and finally deploying the application using Heroku
It only after all these very important preliminaries that for the next three chapters the author focuses on building the sample application called PasteBin which allows users to add code snippets to be kept public or private using Auth.
I was happy to know that even here good practices like using the Migration Plugin and CRUD for rapid prototyping was advocated.
If you are beginning CakePHP development then this book the definitely the one for you. Even if you have been developing with CakePHP for a while this book gives several insights about good workflow practices.
Other than a few typo and code snippet errors in the book I did not find any downside to the book. However I do hope the book and the plugins mentioned get updated for CakePHP V3.0 which is just round the corner!
Issue tracker: https://github.com/josegonzalez/rad-cakephp-2/issues