Archives For mvc

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 1.1 Updates

February 9, 2010

Version 1.1 of the Yii framework was released just recently. I’m going back through the series I wrote on learning Yii and updating it for the latest version. Here’s what I found so far… Continue Reading…

In my series Learning the Yii Framework, I discuss the individual parts of the MVC (Model, View, Controller) architecture in some detail, from a Yii perspective. In the post on [intlink id=”659″ type=”post”]Controllers[/intlink], I introduce Access Control Lists (ACLs), Yii’s default way of restricting who can take what actions. This is a key part of the security of any Web application. For example, a site’s content can often be read by anyone at all, registered or non-registered users alike (like the text you’re reading now). Some content may only be viewable by registered users and some by registered users of a certain type (e.g., paid members). Finally, some content may only be viewable by administrators. In this post, I detail how to completely control access to your Web application using Yii’s Access Control Lists. Continue Reading…

In a [intlink id=”826″ type=”post”]previous post[/intlink], I walk through the Yii framework’s built-in authentication system for adding login functionality to a Web site. There are a number of files and components involved, but simple authentication works fine out of the box, or with just a little tweaking. That’s the focus of that previous post. In this post, I explain how you can customize the authentication process further. Continue Reading…