Model Driven template/scaffolding addin for Visual Studio


After playing around with the T4 templates in the Asp.Net MVC release, I wanted to test out what a more complete solution would look like.  Here are some screen shots and mock ups to demonstrate what the tooling experience would feel like.  The code is in progress and will be available publicly soon.  The important thing to know is that a Model is a class file, it is code.


First off turn the Add-in On.



The Generate Scaffolding menu is available from inside of any class.  This could easily be connected to a Hot-Key as well.


From the solution explorer, the Generate Scaffolding menu is available for any class file.



The goal of this template selection dialog box is to minimize the need to use the mouse.  Ideally, the most used template set would be the default and all of the templates that are contained in that set are auto checked.  The only action required would be pressing the <enter> key.



This dialog box would show the status of the template generation.  It is a pretty short process to generate the files, but when editing the T4 templates when there is a compilation error, this dialog would show the results and make debugging the templates easier.


Obviously.. This is the current templates created dialog box… It has a long way to go before it looks like the previous mock up.


What do you think?  Is this a total waste of time or am I on to something?

About Eric Hexter

I am the CTO for QuarterSpot. I (co)Founded MvcContrib, Should, Solution Factory, and Pstrami open source projects. I have co-authored MVC 2 in Action, MVC3 in Action, and MVC 4 in Action. I co-founded online events like mvcConf, aspConf, and Community for MVC. I am also a Microsoft MVP in ASP.Net.
This entry was posted in .Net, agile, Asp.Net, Asp.Net MVC, mvc, mvccontrib, Tools. Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • Raj

    Great work. Can you share the code?

  • I apologise for any ignorance I’m about to reveal either from poor reading of your excellent series on this topic or general lack of experience…

    I’m not currently using MVC nor T4 Templates, nor have I looked deeply into T4 Templates, but I was curious as to whether your intended implementation for your automation is going to use GAX/GAT ( or whether or not you decided against it and if so, why you’re avoiding it?

    I appreciate any insight you offer. Thanks :)

  • This looks very cool – I like what I’m seeing

  • I’m sorry about the failed link in the previous post (not that you needed it, you can just google GAX/GAT)

  • magellings

    Your screen designs w/ the post it notes are very cool. What tool are you using?

    (Sorry if this is irrelevant)

  • This is cool, keep it up. Looks like a huge time saver.

  • i love it! i have been thinking about the same kind of thing but you’ve moved ahead of me so go to it and i’ll help if/where i can.

    i am also impressed with your screen designs and the way you present those paper prototypes. I do a lot of UX design work and that is a very clean way to present draft screens.

  • For the mockups, I believe he’s using Balsamiq Mockups

    It’s a very nice tool.

  • @magellings I am using for the mock ups.. It is an awesome product.

    @Michael A. Smith I do not intend to use… GAX/GAT So far all of my experience with all of the VS extention technologies have been a bad experience. Wether that is extening Resharper or trying out VSX, or GAX. At this point, I feel the best way to ensure that I can easily port something to the next version of visual studio or to the previous for that matter is to code against the Addin api. It is a painful process, but I do not think it will get any better until vs2010 comes out. I do not want to rely on a 3rd party abstraction that does not have a clear road map that will be supported at the time I need it. The only thing that I am relying on is the 3rd party Clarius T4 editor for language support in the .TT files. And that is not required for this solution to work.. it just makes editing the templates a better experience. I really dislike Visual Studio extensibility, but I really want more productivity out of it.

  • Thanks for your response eric.

  • Dude I am going to use the Balsamiq with our Jira installation. This rocks!

    BTW I think what you are doing with the scaffolding is awesome. Haven’t been in the .Net world in a while but it reminds me of a Ruby generator and this a GOOD thing!

  • magellings

    thanks Erich. I’ve forwarded to our software process team to consider purchasing. :)

  • Frank

    I totally agree with using T4 as a scaffolding tool in Visual Studio but why only for MVC? What about business logic, pocos, web forms, there are some many areas that could benefit from scaffolding. That’s why I created any extension that takes a more generic approach and tries to support scaffolding everywhere inside Visual Studio. You can check it out here: