Old Skool Code Generation
It runs you through the whole process and I think is a must read for anyone playing with code generation.
To clarify my position, I find XSLT a little inelegant and thus prefer CF Template which is more powerful and concise, but outside (and inside) of the CF world XSLT is widely used, so it is a very valid approach.
As for databased metadata, the problem is that because it only knows basic information (it knows that a field is a varchar(8) but doesn't know it is a US Social Security Number - for example), the generated code acts only as scaffolding - a starting point for customizing the code base.
That said, unless you've written your own object based code generator, a starting point is better than nothing and playing with something like Illudium would make writing a more robust generator easier.
Well worth checking out.



"Yeah. No school like the old school."
However, while I am in agreement that there are limits to db introspection for code generation, I am not sure I would call it "old skool." It does offer an very easy way to get some basic code generated...as in the barriers to entry are much lower than setting up your metabase and it can be an invaluable time saver.
Inelegant just in terms of signal to noise (do you SEE how long variables are in XSLT) and the fact you can't put angle brackets into your generated scripts. Imagine using XSLT instead of ColdFusion for doing all of your HTML templating - it'd drive you crazy. I want my generation templates to be easy as my HTML templates generated by CF in terms of readability and efficiency, so that is why I prefer CF Template.
Also CF Template provides me with all of the functions in ColdFusion so if I want to handle number formatting ro date formattng or something in a template I can use CF for that rather than having to figure that out using XSLT.
What do you mean "leaving the send feature without a captcha"? I have a captcha in the comment form. Is there something I'm missing?!
It has saved me so much time typing out my beans and DAO's! It is indeed a great place to start with OOP. Thanks Brian.