Mårten Rånge Takes Advantage of Templates
Carl and Richard talk to Mårten Rånge about Microsoft's Text Template Transformation Toolkit (T4). Don't call it code generation - Mårten talks about how T4 takes away code repetition and keeps you focused on the important stuff. The challenge is learning to build your own maintainable templates. The conversation explores a variety of examples of using T4 effectively for SQL, XAML as well as C# and C++. Mårten has a project on GitHub called T4Include to help you utilize them more effectively. The tooling isn't perfect, but there are alternatives - check it out!
Guests:
Mårten Rånge
Mårten been a programmer since 1988 and a meta programmer since 1990 and has worked for small start-ups to larger organizations such as Visma or Microsoft. In T4 Mårten found his calling and is constantly trying to spread the word to family, friends, colleagues and strangers who just said hello. These days he works at Ericsson.
Links:
- System.Web.Optimization http://msdn.microsoft.com/en-us/library/system.web.optimization.aspx
- Bundling and Minification Tutorial http://www.asp.net/mvc/tutorials/mvc-4/bundling-and-minification
- Code Generation and T4 Text Templates http://msdn.microsoft.com/en-us/library/vstudio/bb126445.aspx
- T4Include on GitHub https://github.com/mrange/T4Include
- T4Include on NuGet http://nuget.org/packages/T4Include/
- Tangible T4 Editor http://t4-editor.tangible-engineering.com/T4-Editor-Visual-T4-Editing.html