CodeBreeze Code Generation Tool - Template Based Code Generator and Data Mapping Tool

CodeBreeze Code Generation Tool - Template Based Code Generator and Data Mapping Tool

by David Hayden ( Microsoft MVP C# ), Filed: Code Generation

 

Miguel Castro has put together a nice template-based code generation tool, called CodeBreeze, that allows you to generate code, xml files, etc. based on the schema of a database. It is like CodeSmith, but offers a bit more customization and extensibility.

CodeBreeze Code Generation ToolIf you have used other template-based code generators, it might take you a bit of time to adjust to the concepts of project templates, architecture layers, modules and codegen processes in addition to the normal code templates that are common across all code generation tools. I know it took me a bit of hit-and-miss attempts to understand things, but I didn't read the help file cover-to-cover either :) Now that I somewhat understand the extra concepts, I can appreciate their role in the code generation process.

The nice thing is that CodeBreeze uses the familiar ASP.NET Templating Engine that we have been using all these years, so creating code templates isn't that much of a stretch. You can create the templates in C# or VB as you might expect and target numerous output types. There are a few project templates provided: CSLA templates, sample 3-tier templates, and a basic NHibernate Mapping File template. These can get you started with understanding how to create your own code generation templates.

I have built some simple project templates and code templates in an attempt to get familiar with CodeBreeze, but haven't built anything for real-world use. I thought I might build a template for the stored procedures wrappers I just created using my own code generation tool that I talked about here - Code Generation - Stored Procedure Wrappers for Data Access Layer. That code template and perhaps a couple other templates will give me a real world feel for CodeBreeze as an alternative to other code generation tools.

If you are looking to purchase a template-based code generation tool and data mapping tool, it would be worthwhile checking out CodeBreeze during your investigations. Miguel put together a show on dnrTV, too.

 

Source: David Hayden ( Microsoft MVP C# )

Filed: Code Generation

 

posted on Sunday, September 09, 2007 12:25 PM

My Links

Post Categories

Article Categories

Archives

Loose-Leaf Tea