Freigeben über


Fun use of T4 to generate strongly-typed web navigation

I wondered how long it would be before folks outside of the DSL Tools/VSX/SF community started to pick up on the fact that T4 is in every VS box as of VS 2008.

Here's my answer...

Kirill Chilingarashvili has a nice example of turning some weakly typed data into strongly-typed data and hence moving errors from runtime to compile time.  Rarely a bad thing.  Interestingly this doesn't even require a directive processor to be written to get the data into the template.

Nice stuff Kirill.

Technorati Tags: Code Generation,T4,Text Templating,Visual Studio

Comments

  • Anonymous
    January 31, 2008
    Yep. It's clean. That's simple, efficient, and addressing "stickily" enough Kirill's specific issue (no more, no less) and, as you said, also a nice way to show how the T4 functionality in VS 2008 actually is orthogonal to the rest of the DSL Tools/VSX features. In my opinion, at design and functional scope levels, feature orthogonality in software development tools (whenever possible) is as important as, say, object-oriented languages' syntactical or semantical constructs' orthogonality, for instance.

  • Anonymous
    February 03, 2008
    The comment has been removed

  • Anonymous
    February 04, 2008
    Oleg saw my post about Kiril's general-purpose use of T4 and gently pointed me at the set of resources

  • Anonymous
    February 04, 2008
    Oleg saw my post about Kiril's general-purpose use of T4 and gently pointed me at the set of resources

  • Anonymous
    February 07, 2008
    Gareth is obviously settled in the US now, because he's starting to become a prolific blog poster again.

  • Anonymous
    February 07, 2008
    Gareth is obviously settled in the US now, because he's starting to become a prolific blog poster

  • Anonymous
    May 22, 2009
    Gareth has been posting a lot about T4 over the past few months. In case you missed it, here’s a roundup