An outlet for my obsession with technology
Posts tagged Open Source
ASP.NET MVC: Not That Open Source
Jan 11th
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.
Introducing: AutoDeploy
Jun 11th
A class library to help automate simple deployment tasks.
Warning: pre-alpha.
AutoDeploy has 2 main components; deployment objects and a deployment controller. A deployment object holds n+1 deployment tasks. The deployment controller is responsible for executing scheduled, interval and on demand deployment tasks.
AutoDeploy is complete enough for me to start dog fooding it this week. I’ll have a road-map soon after.
Features
- Deployment Controller
- Scheduled Deployments
- Interval Deployments
- SVN Checkout
- SVN Commit
- ASP.NET Build
Example 1: Fluent Interface, SVN Checkout, Interval
1: var deploymentController = AutoDeploy.Controllers.DeploymentController.GetInstance;
2: new AutoDeploy.Mappings.FluentMapping().Named("TestMapping")
3: .FromSvnHttpRepositoryUrl("URL")
4: .UsingSvnCredentials(new System.Net.NetworkCredential("UID", "PASS"))
5: .SvnCheckoutToDirectory("C:/Temp")
6: .AtTime(6)
7: .Save();
First, or last, or never..we create a controller. The controller will check every minute for interval and scheduled deployments. In this example we checkout every day @ 6am.
Example 1: Fluent Interface, Compile, Publish, One Time
1: new AutoDeploy.Mappings.FluentMapping()
2: .SvnCheckoutToDirectory("C:/Temp")
3: .BuildAndOutputToDirectory("C:/TempCompiled")
4: .Execute();
shhh..I know the source directory name is horrible…