Code generators

Added a how-to to the wiki:


I’m also only using yiic to create webapp and models. As Yii is all about good OOP and reusability i really wonder why it should not be possible to write some code generator that can be used for both, yiic and gii. The only difference i see, is that i don’t need a preview feature on the command line.

I totally agree with Mike.

There should be a solution which uses the same code for code generation, while one has a web-interface and the other the command line for entering the params.

Seems a good solution to me.

Gii (or the new generator) could be improved also with more extensibility.

A suggestion is to divide the code generation in two steps for each generated method (eg relations, rules etc). The first step will gather/build the information needed and the second step will assemble (generate) the code.

This allows for a method to hook in between and change or add some information before the code is generated.

Thank you very much, but “with” not “instead of”. :)

Thank you. Some bugs are already fixed in the trunk. Please open tickets for anything strange you see in giix!

The biggest disadvantages of the web-based solution are the lack of batch scripting and permission handling.

You always have to adjust the directories, where you want to create the files.

+1 for GII

Above would be nice. Ever think of building a special version of yiilite with Gii included for execution out of the framework directory (same level as examples)? Then gii could generate applications.

What about a CConsoleView?