Disclaimer: I received a copy of this book from Packt to review

Yii 1.1 Application Development Cookbook, released by Packt Publishing, covers over 80 recipes about a wide variety of common Yii challenges. Written by Alexander Makarov, one of the core developers of the framework, the book is full of medium to advanced solutions.

Structure of the book

    featured image

  • The first two chapters offer a reference to core framework functionality (controller/ model/ view, URL routing and Yii features like autoloading and widgets).
  • Chapter 3 deals with AJAX by means of the jQuery JS library, which is well integrated into Yii.
  • Chapter 4 offer form gems: validation, uploading files and some nice CAPTCHA tricks.
  • In chapter 5, Testing, you install PHPUnit, Selenium server and Xdebugs to write unit and functional tests.
  • Chapter 6 is all databases and Active Record. You learn to connect to multiple Databases and other tricks, like implementing single table inheritance
  • Using grids and lists with the Yii-bundled Zii library, is what you will learn in chapter 7.
  • The recipes of chapter 8 all focus on making Yii extensible. It shows you how to create widgets (with Google API), CLI commands, a wiki module and more.
  • Chapter 9 shows the ins- and outs of log review, analyzing exception stack traces, and implementing error handlers.
  • Chapter 10 - Security: recipes to prevent common vulnerabilities: XSS, SQL injection, CSRF, at last a recipe about RBAC
  • Chapter 11 - Performance: how to speed up sessions, general best practices, caching and profiling (looking for bottlenecks in the Yii blog demo app).
  • New here? You might want to subscribe to my blog by email or RSS.

  • Chapter 12 shows how to use external code (Zend, Kohana, PEAR) in Yii.
  • At last, chapter 13, has recipes about deploying your app to your server.

Style

The writing style is clear. I liked the format used throughout the book: from preparation "Getting ready", to coding "How to do it ...", to explanation "How it works ...", to more info "There is more ...", to similar recipes "See also".

Like most cookbooks you can randomly jump in, each recipe is standalone. Basic to intermediate knowledge is required to fully grasp the recipes. To learn about Yii and develop an app A-Z, I recommend to first read Packt's first Yii title and the definite guide

Conclusion

This cookbook should be on your desk when you have to get your hands dirty with Yii. It is about practical problem solving with focus on the 'how-to', not the 'why'. Sometimes the 'why' could have been given a bit more thought, but again, a cookbook is pragmatic, problem + solution, and compared to other cookbooks this one does the job pretty well!

I think this is one of the few resources on Yii development. I am still a Yii newbie, but this book did convince me that Yii is an important ingredient for any PHP Web Developer's toolbox. Conceptionally it is a high quality and efficient framework. And it might make you happier: the recipes might save you time. So I think, after managing the basics, and getting some experience coding in Yii, this book can make you proficient.

Links


Bob Belderbos

I build useful apps and share my learning About me