Archives For yii

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...

So progress on “The Yii Book” in the past month has not gone as well as I would have liked. And, sadly, progress has been poor for no particular reason other than my own ability to get things done. These things do happen to us all, but it doesn’t mean I’m happy about. Still, even though it’s been slow, progress is being made. A quick status report…

Continue Reading...

Last week, the first public preview of version 2 of the Yii framework was announced. Qiang and the entire team have been working very hard, and this is a great milestone to reach. The code is available on Github, and there’s a whole forum dedicated to feedback and design discussions. Input from the Yii community is actively encouraged. All that being said, understand that Yii 2 is not nearly ready for production uses yet. Many bugs will undoubtedly be found, and other changes to the framework’s design are inevitable, too.

Besides mentioning this exciting news, I also wanted to explain how I expect this impacts my self-published book on the Yii framework…

Continue Reading...

I’m working on Part 3 of “The Yii Book”, and have made reference to the fact that I’ve been working on Chapter 15, “Internationalization,” and Chapter 16, “Leaving the Browser.” These are not the original chapters, per the first table of contents. Here, then, is an updated table of contents. These are still subject to change, but considering there’s not that much of the book left, there probably won’t be any dramatic changes.

Continue Reading...