i think one of the best advantages of the gii framework will be that you can define
different templates and sub-templates about how your views will look like after
generation. Such working horror-lines still could be implemented in the CRUD Generator
code, but being separated in a more low-level area.
it’s very exciting to see what gii could be in the future. a ‘collection’ of
user-contributed templates and even code generation ‘behaviors’ could be made by
the community. For example, there could be a behavior attached to the code generation
that generates list boxes out of a relation (like in this example). if i attach
another behavior, it would generate a relation widget. in an third code generation behavior
it would generate nothing more but an input field, and so on.
After that, we need behaviors for MANY_MANY relations, that generate a listbox, checkboxlist,
a ajax twopane view, and so on.
Then we could provide a bunch of ‘footer’ templates, for example. All this can be mixed in my
‘code generation run’. I click ‘Go’ and (almost) everything is done 
Making re-usable generation logic snippets should be the way to go.
What do you think about this?