How many times you you been coding a business or data layer object and thought... "This is sooo repetitve there must be a better way." Well there is! CodeSmith is a template driven code generation tool. Now don't lose me... I know you heard code generation and are thinking this is some blue sky type of tool, but trust me this is the real deal. With it you can create templates using an ASP.Net like language (it's not limited to generating .Net code an ascii lanaguage is possible). This works best for highly standardized code like business objects and/or data layer objects. This week I downloaded the demo and created templates that read a SQL table and create a matching data layer, business object and all the standard stored procedures needed to do the basic create/reade/update/delete.
For basic objects I can run my templates and I'm off to the UI. Event for intermediate / advanced objects I'm light years ahead by the time I start modifing the code. Using it the past 2 days I bet I've easily saved myself 8-10 hours. This tool is a must for any coder! Check it out now.
Amen to auto-gen code! I think after the 5th time I had to write that mundane object layer code I said “never again”. The pattern was too clear so a co-worker and I wrote a tool in Perl (*blush*) to generate all future db/persistence layer object code we needed. I’ve never looked back…
I haven't used CodeSmith yet but may finally give it a try since you’re recommending it.
Posted by: Nick Airdo | July 07, 2005 at 10:13 AM
CodeSmith is definitely one of the most valuable tools any programmer can have. One of the most phenomenal things about CodeSmith is you can generate any kind of output. You can use it to generate SQL stored procedures, your data access layer, entity objects, user interfaces, HTML, or practically anything you can dream up a template for.
Posted by: David Neal | July 07, 2005 at 10:29 AM