Tweaking T4 Templates to Improve Script Performance

In this DevNugget, a follow-up to part 1, "Make Script Performance Automatic with Custom Templates in Visual Studio 2010," Developer Evangelist G. Andrew Duthie shows you how you can customize the T4 templates used for creating new Views in an MVC3 application, to move script references to the bottom of the page.Why the bottom? As […]

In this DevNugget, a follow-up to part 1, "Make Script Performance Automatic with Custom Templates in Visual Studio 2010," Developer Evangelist G. Andrew Duthie shows you how you can customize the T4 templates used for creating new Views in an MVC3 application, to move script references to the bottom of the page.

Why the bottom? As explained in the previous installment (linked above), because some browsers won't load any additional content while they're busy downloading a script, so if you're loading a large script file from an external site, or if that external site isn't available, your entire page may be blocked from loading. Yikes!

Along the way, you'll learn a bit about quickly creating an MVC3 application using Entity Framework Code First and MVC3 Scaffolding.

For those, who like tutorials, follow this step-by-step format.