Advanced Code Generation Patterns with T4 & DSL Tools


Back in September, I had a chance to co-present Advanced code generation patterns with T4 & DSL Tools with Gareth Jones and Jean-Marc Prieur at the VSX Developer Conference. Here is the abstract of this session:

Code generation is an increasingly common technique in application development and forms a part of many Visual Studio extensions. With the addition of T4 to Visual Studio 2008, every developer has a powerful code generation engine available to them. In this session we’ll look at patterns of usage of T4 and ways to structure your templates for large-scale reuse. We’ll explore a sample that aids large scale code generation from DSL models and finally look at a community library which adds facilities to make the tricky problems of incremental code generation and reverse engineering from a DSL easier.

Gareth recently wrote that recording of this and other VSX sessions is now available on Channel 9. You can download the source code I used in my demo here.

Information and Links

Join the fray by commenting, tracking what others have to say, or linking to it from your blog.


Other Posts
T4 Tutorial: Handling Errors in Code Generators
T4 Tutorial: Reusing code generators on multiple projects

Write a Comment

Take a moment to comment and tell us what you think. Some basic HTML is allowed for formatting.

Reader Comments

Oleg,

Very nice session but I was wondering if you had example code of the T4 portion you presented?

Thanks for pointing this out, John. I updated this post to include a link to the source code I used in my demo.