Chapter 3. The Text Template Transformation Toolkit (T4)
In this chapter
- Thinking of generics as templates
- Introducing T4 and exploring useful T4 examples
- Using T4 inside Visual Studio
Pattern recognition and the beneficial repetition of proven patterns are considered to be excellent qualities in a software developer. Software developers and architects who have great pattern vocabularies are often the best among us. These are the developers who rarely try to reinvent complex solutions from scratch. Instead, they rely on well-known best practices, borrowing from the demonstrated success of others to produce their own great works. Code generation, which is viewed by many as a form of metaprogramming, is typically a key part of their successful development methodology. This chapter focuses on template-based metaprogramming using Microsoft’s Text Template Transformation Toolkit (T4) to learn how these master developers think and work.