Open Source
ASP.NET MVC: Not That Open Source
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.
Idea
ASP.NET MVC provides customizable code templates for the view/controller content. There are a few really good articles on how to get started.
Plan
- Include the CodeTemplates in my project
- Change the output extention to .spark
- Modify the markup to sparkup
- Phase 3: Profit.
Problem
ASP.NET MVC uses a custom tool to process the T4 templates.
MvcTextTemplateHost
It ignores the output extension directive in T4 templates.
(Click play)
Sadness
MvcTextTemplateHost is included in Microsoft.VisualStudio.Web.Extensions.dll and this DLL that is not “part” of MVC code that was open sourced.
Conclusion
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.
Notepad++ > Editpad Pro
Just a quick note…in this tight economy there is a huge opportunity for open source software to enter the public sector. I’d really like to see little changes like these in the public sector. Expectably when the open source software, IMHO, is better then the commercial software.