Archives For yii

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

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