Archives For yiibk

On Friday evening, I officially released version 0.8 of “The Yii Book” (Chapter 19 had previously been released in rough format). This update includes over 55 pages of new content, which I call Chapter 19, “Extending Yii”. This is a 10% increase in the book’s total length, and by far the longest chapter in the book. You can download the latest version from the account page. Continue Reading…

On Wednesday, I sent out three emails about “The Yii Book”, the contents of which I’ll summarize here. But first, if you’re not receiving these emails but you’d like to, you can set that on your Yii account page.

As for those emails, and this summarization, the tl;dr version is:

* A rough draft of Chapter 19, “Extending Yii,” is available for download on the account page.
* Got some plans on doing more work on this going forward.
* You all are great!

Continue Reading...

I wanted to wait on saying something until the chapter was on its way to the tech editors, but it’s the end of the year and the chapter is close enough to being done that I can offer an update now. My wife and kids went away to visit friends for a couple of days, and I stayed home to work, spending the vast majority of my time on “The Yii Book”. Not only did I make pretty good progress on Chapter 19, but I got my Yii book mojo back (in terms of being in the flow and mindset), which is just as important.

Continue Reading...

Whenever you begin working with a database, you introduce more possible causes of errors. Thus, you must learn additional debugging strategies. When using PHP to run queries on the database, the problems you might encounter include:

An inability to connect to the database
A database error thrown because of a query
The query not returning the results or having the effect that you expect
None of the above, and yet, the output is still incorrect
On a non-framework site, you just need to watch for database errors to catch the first two types of problems. There’s a simple and standard approach for debugging the last two types:

Use PHP to print out the query being run.
Run the same query using another interface to confirm the results.
Debug the query until you get the results you want.
When using a framework, these same debugging techniques are a little less obvious, in part because you may not be directly touching the underlying SQL commands. Thankfully, Yii will still be quite helpful, if you know what switches to flip.

Continue Reading...

I’m looking ahead to writing Chapter 20, “Working with Third-Party Libraries,” of “The Yii Book” (I’m currently writing Chapter 19), and was wondering what people wanted me to specifically demonstrate. Originally, I had intended to use the Zend Framework as my example. I like how ZF components can be easily used on their own, and I’d frequently used ZF with my own Yii projects. Lately, I’ve been thinking about using Symfony in the chapter. I’ve not touched Symfony yet myself, but have heard good things. Of course, the examples don’t have to use frameworks; they could use any type of library.

Continue Reading...