I’ve long been a fan of code generation and have used various products and approaches on projects over time. There are many different strategies and philosophies when it comes to code generation and some excellent resources to research options including: http://www.codegeneration.net.
One of my favorites for .Net development is Iron Speed (http://www.ironspeed.com), a .Net web application code generator. The company’s flagship product, Iron Speed Designer, easily creates approximately 80% of an application’s typical plumbing, leaving the rest of the developer’s time working on the 20% of the applications unique business logic. I use other generators but I like how Iron Speed organizes the architecture in a way that makes it easy to maintain your customizations (they don’t get wiped away with subsequent generations) and how readable the generated code is, making it easy to work with inside Microsoft Visual Studio.
I have used Iron Speed on a number of projects developing software in Kansas City and have bumped into other Iron Speed users at user group and other community functions.