I was recently doing some research on what were some of the best PHP frameworks available and came across Yii. I have some limited experience with another PHP framework called CodeIgniter. I am looking at rewriting a major website that I initially created without a framework back in 2003. Naturally considering how long these websites live, I wanted to get a framework that was robust with a moderate learning curve considering my very limited free time.
My perspective is one of a software developer with a strong PHP and Java background with experience using multiple web UI technologies. I am currently working on creating high traffic, enterprise mobile websites and was looking at Yii for all its features and best of all, for its performance, an area many frameworks don't emphasize. I am also interested in this framework from an architecture point of view as well. I read through this book noting examples of Best Practices from what I consider a top quality framework.
I purchased "Yii 1.1 Application Development Cookbook " by Alexander Makarov from Packt Publishing ([...]) and I wanted to give my review of this book.
This book uses its 13 chapters to cover all of the Yii topics that define a good framework such as: Ajax and jQuery, Working with Forms, Testing your Application, Database, Active Record, Error Handling, Security, Performance Tuning, Extending Yii, and using External Code. Each chapter stands on its own because it uses a "yiic" app generator command to create a fresh copy of a Yii application. I love this part of the framework because this app generator creates login page and a basic home page and if you've ever tried to start a new application the login page with one of the most important pieces of an app yet one of the most boring pieces to work on. Thank you Yii for making this part as easy as a 1 line command.
Since this book is a "Cookbook" style approach to using Yii to build wep apps, you'll find each chapter full of examples and each example uses the following sections to round out each example: Getting Ready (example setup), How to do it (main content of the example), How it works (content explanation) , There's more (where to go to learn more) , and See also (reference to related sections).
Each chapter fully defines the subject matter with useful examples illustrating how Yii uses the "Configuration by Convention" model to build web application components. You won't find re-used examples from the API documentation, but rather real examples that you'll need to not only make top quality applications but also you'll fully understand how Yii works when you consider the reference material provided to augment the examples.
There were some areas that gave me some trouble in reading through this book. It seems this book does assume some level of knowledge of Yii because this book didn't explain Gii on its first mention. This will mean you will have to reference the Yii documentation to fill in any gaps if you are a pure newbie to Yii as I am, but it may be best if you start off with a starter book such as "Agile with Yii 1.1 and PHP5" by Jeffery Winesett to get a good foundation on Yii before learning some of these advanced topics that this cookbook covers.
Overall, I would recommend this book because if the excellent examples in each chapter, the complexity of the tasks that make up the examples and the complete coverage of the topics in all the chapters. I could get by with just this "cookbook" but I'd feel like I am missing something by not starting with a beginners book to learn the full breadth of Yii. In a pinch, this book can get you past your needed tasks.
If you are interested in viewing a sample chapter of this ebook one is available at [...]