Automatic code generation

What you think about automatic code generation like the Gii tool shipped with Yii? Personally, I have no use for it at all. I like to do everything by my bare hands. What about you guys?

I’m just curious about the numbers :)

i think if u understand everything in detail u can sure use the Gii tool. But it is always better, in my opinion, to code on his own without a tool.

Well, there are some cases when automatic generation saves time. I use it in every project, especially model and controller generator. A nice feature is that you can use customize templates. I think that should be further developed.

Use it a lot… saves me many time for basic crud functionality and adding some models ;)

i also use gii very much…

recently i found out how easy it is to add new crud-templates… and in few minutes i could add my own customizations as new template

i even customized my default yii webapp generation to add my dev/main config switch and my shortcut.php

it’s great, it helps prevent human error by removing repetitive tasks from the programmer.

there are changes to the generated code that i make, i need to come up with my own template…

I think I would take another look at gii after your comment!

Gii is great tool indeed and I use it a lot, however I regret that it takes the place of the command line tool yiic (which is now ‘deprecated’). It would have been nice if both tools would have evolved in parallel.

The Yiic command line tool is useful to integrate yii into an existing environment. For instance, I use command ‘yiic webapp’ from Eclipse to automatically create app skeleton …


@Raoul - check this comment from Qiang -

I start every project using gii now, but usually only for the models.

I find the crud generation rarely fits well although it can be a good start sometimes.

Could not open this link :blink:

Check again, its working for me…

anyway it says:

does not work for me either… staff only topic maybe?

ops… Flavio you are right…

anyway quoted above the line that I wanted you to see…

Interesting numbers, I didn’t expect so many people seeing Gii as essential. Well at least I’m not fully alone :D But maybe I should give it a try again.

Thanks for your votes and comments.

Was the purpose of the poll personal or there will be some deeper analysis on it. :rolleyes:

Just personal! :)

It saves a lot of time in model creation.

I am just curious why you were surprised that many people use Gii (including myself). The latest development tendencies dictate do more with less coding and Gii fits in perfectly especially for repetitive code such as attribute labels…etc. I mean that is one of the reasons why more and more people use Yii in general…because it is a fantastic framework and makes your life easier even if you are an expert in php. I am also curious if Qiang uses Gii? B)

I like code generation tools, for the same reasons stated above. But I prefer Cli over Gui for this kind of tools, just a matter of taste.