Skip to content


Yii Framework’s New Gii Tool

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.

Posted in MySQL, PHP, Web Development.

Tagged with , , .


6 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. eskimo says

    Can’t wait for your gii post! your yii guides are the best on the web by far. much appreciated!

    • Larry says

      Thank you very much. I’m working on a new Yii-based site now and will surely post about the changes soon!

  2. Oscar says

    Greetings Larry,
    Been a big fan of yours since PHP 5 Advanced: Visual QuickPro Guide (2nd Edition). I have a question in regards to Gii. I tried running the crud generator for a mysql table that has three fields as primary key. One of the fields is an autoincrement key within the group. Anyhow whenever I try generating the crud operation for this table I receive the following error: Table “{$table->name}” has a composite primary key which is not supported by crud generator. From what I read online, it seems that yii has no intention on modifing the frameworks inability to produce crud operations from tables with primary keys. Is this correct, or am I missing something. I am using MAMP 1.9 for on my mac book pro along with yii-1.1.2.r2086. Any findings or thoughts would be greatly appreciated. Thanks.

  3. Oscar says

    Thanks Larry,
    I could not find my original posting and thought it might have been removed. I apologize for the double posting. Also, no need to thank me regarding the book. As most people who have had the honor of reading one of your books, it is one of the best educational investments I’ve ever made as its pays for itself many times over.

    • Larry says

      No need to apologize; sorry I couldn’t be of more help. Thank you very much for the nice words on my work!

If you need quick assistance with a question or problem related to one of my books, please use the support forums instead.

Some HTML is OK

or, reply to this post via trackback.