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.

Add-In

First off turn the Add-in On.

 

CodeWindowContextMenu

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

SolutionExplorer

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

 

SelectTemplate

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.

 

TemplateRunningDialog

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.

TemplatesCreated

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?

Related Articles:

Post Footer automatically generated by Add Post Footer Plugin for wordpress.

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?

  • http://michael.smith Michael A. Smith

    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 (http://msdn.microsoft.com/en-us/teamsystem/aa718948.aspx) or whether or not you decided against it and if so, why you’re avoiding it?

    I appreciate any insight you offer. Thanks :)

  • http://blogger.forgottenskies.com Steve

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

  • http://michael.smith Michael A. Smith

    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)

  • http://www.heliosfx.com Travis

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

  • http://www.spinthemoose.com/ David Alpert

    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.

  • http://blogs.systemex.net/Kiliman/ Kiliman

    For the mockups, I believe he’s using Balsamiq Mockups http://www.balsamiq.com/

    It’s a very nice tool.

  • http://www.lostechies.com/members/erichexter/default.aspx erichexter

    @magellings I am usinghttp://www.balsamiq.com/products/mockups 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.

  • http://michael.smith Michael A. Smith

    Thanks for your response eric.

  • http://www.lostechies.com/members/agilejoe/default.aspx Joe Ocampo

    Dude I am going to use the Balsamiq with our Jira installation. This rocks!
    http://www.balsamiq.com/products/mockups/jira#buy

    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. :)