Archives For yii

Some time back, I had written a couple of blog posts on authentication and authorization in Yii. As a comment to one of those posts, someone shared some code (also posted in the Yii forums) that requires a login to access any page. The interesting thing about this code is that it’s placed in the primary application configuration file, not within individual Controllers. The benefit to this approach is that a little bit of code can add authorization to your entire site, no matter how many Controllers you have. I’ll explain how to use this approach in this post, although keep in mind that it’s really best for situations where users must be logged in to access almost all of the site’s content. Continue Reading…

I’ve just wrapped another project using the Yii framework (my fourth in the past year) and so I’ve got a few more topics to write about. I really like the Yii framework (obviously) and think it’s very accessible, but there are still things that take me some time to figure out, so those topics make for good blog posts! In this one, I’ll walk through what I had to do to cache the database schema using memcached. For that matter, I’ll explain why you’d want to do this in the first place… Continue Reading…

Version 1.1.2 of the Yii framework came out a couple of weeks ago (May 2, 2010) and it’s main new feature is Gii. Gii is a Web-based alternative to the yiic command-line tool. Both yiic and Gii are used to generate code in existing Yii Web applications. For example, you create the database for a project, then use the command-line yiic tool to generate the shell of the project (its directory, configuration files, subdirectories, etc.), and then you would turn to Gii in the Web browser to create Model, Controller, and View files, along with the standard CRUD functionality. I’ll write more about Gii soon, but in the meantime, check out the previous Gii link or this part of the quickstart documentation.

Yii Framework Version 1.1

February 26, 2010

A significant upgrade to the Yii framework—1.1—came out in January, just over a year after the original 1.0 release. I’ve already updated my series on Learning the Yii Framework to make sure it’s technically accurate, but I thought I’d highlight a few of changes in Yii 1.1 here.

Continue Reading…

The latest version of the Yii framework, 1.1, came out in January and has a few significant changes, so I’ve been reviewing my “Learning the Yii Framework” series to make sure it’s all still correct. In a [intlink id=”889″ type=”post”]previous post[/intlink], I made note of the new config bootstrap files for testing purposes, as well as the changes in the auto-generated Views. Here I’m going to look at the Models, Views, and Controllers in more detail. Continue Reading…