ASP.NET MVC: Not That Open Source
January 11, 2010
This feature is small, hell since I’ve been using spark I almost forgot about it, that is until I started working on a simple administration section. The application has enough entities that “Right Click –> Crud” would make just the right tool.
ASP.NET MVC provides customizable code templates for the view/controller content. There are a few really good articles on how to get started.
- Include the CodeTemplates in my project
- Change the output extention to .spark
- Modify the markup to sparkup
- Phase 3: Profit.
ASP.NET MVC uses a custom tool to process the T4 templates.
It ignores the output extension directive in T4 templates.
MvcTextTemplateHost is included in Microsoft.VisualStudio.Web.Extensions.dll and this DLL that is not “part” of MVC code that was open sourced.
I’d love to write a Visual Studio addin to create spark views but I just don’t have the time. However; I do wonder if I can just have spark parse the .aspx and .ascx files.