Larry Garfield wrote:
OK, I've not actually looked at it yet, so I can't comment on how good/late-night the code is, but my knee-jerk reaction is that I don't like code generation in the first place.
As a for-instance:
hook_load(), hook_insert(), and hook_update() are horribly redundant. All three do the same thing in almost any node. They select/insert/delete fields from a table, using almost the same code. Sometimes there will be an extra table to manipulate, but there's still almost always a basic node++ table. And the fields have to be specified in all of them. Ick!
So yeah, code generation in general gets a -1 for me in favor of more powerful and generalized polymorphic code.
Well, I'm all about generalized, abstracted, objectified database access -- and I'm writing such a class library for my employer right now. However, I'm still very pleased with Angie's module. It's a great tool for sketching a new module so that one doesn't forget to code the hooks it needs. And it is similarly instructional, teaching programmers about how to develop Drupal modules. Moreover, to hack the quote from Donald Rumsfeld, the US secretary of defense: one codes to the core hooks one has at the moment, not to what one would like to have. Sure, go ahead and develop a "more powerful and generalized polymorphic code" for the core hooks, and get them committed to core, so that module generation is less valuable. In the meantime, this module is a great tool. If you don't like it, don't use it. :-) ..chrisxj