I've been using some Sonic and NHibernate and NetTiers. What else is out there and how do they compare?
Well, maybe it's not very cool, but I've been using fprintf
to generate code ever since I learned C.
The GWT compiler is a cross-platform, optimising, Java-to-JavaScript code generator.
On the unix side of things, autogen is pretty good: http://www.gnu.org/software/autogen/
I often use it to do poor man's templates in C (templating over float/double/long double), but it can do some pretty advanced things too.
How about this (reasonably) definitive list: http://www.codegeneration.net/generators.php
As for comparison, ultimately only you can decide if you want (or need) to adapt to the code they produce, or how much time you want to invest adapting your own style to align with what they produce. For example, some developers here used LLBLGen for a while, but we have since abandoned its use as its output didn't align particularly well with our own coding standards. It wasn't bad code, just different.
I hear a lot about MyGeneration. I have also used ActiveWriter for CastleProject but it is a bit specific, not unlike subSonic though, which is more of an orm. (Activerecord uses NHibernate, but this is a tool to generate your classes. As for generating classes, there is a built in class diagram system in Visual Studio to get you started.
I've done a couple projects now where we used T4, which works pretty well and is built into Visual Studio.