(Update 2014-12-09: I’ve created a WebApi based library that leverages the System.Net.Http classes to do all the parsing. The code is very simple and much easier to support. I’d recommend trying that first. It’s a lot easier to support.)
This is to announce my new CodePlex project Resuming Action Results for ASP.NET MVC. Or MVC Resuming Actions. Or something else even more clever and catchy. Oh, and it’s already on the NuGet official feed to check out.
Some time ago I started a project called Media Streaming MVC. The project was an early attempt to give ASP.NET MVC developers the ability to easily expose dynamic, routable resources as progressive-download compliant. It was just an ActionFilter and some ActionResults with code to parse HTTP Request Headers and construct the appropriate response.
That project was developed very rapidly as a proof of concept for a StackOverflow question I had tried to answer. Over the past few months I grew increasingly unhappy with the implementation. I knew I wanted to bring it more in line with the way MVC FileResult actions were called and give it a major overhaul. Unfortunately every time I sat down to take a serious look at how I could accomplish these goals, I got overwhelmed and let my attention wander to something less challenging.
Finally I made the decision that there was really no way to clean up the project, make it easier for developers to use and retain any sort of compatibility with existing code. I made the decision to cut the cord and start fresh with the lessons I’ve learned, the feedback I’d gotten and my expanded experience with the ASP.NET MVC platform.
The Modern Day
My new project is a nearly complete redesign starting from identifying the problem I was trying to solve and the design attributes I thought were necessary.
- Enable developers to use the library with no extra effort.
- Streamline the request processing to keep it far away from eyes.
- Build for the most common case but keep an eye toward extension.
I think I accomplished this pretty well. Many of the complaints I had with the library were solved by the simplified pipeline. Rather than parsing a request in an ActionFilter and passing it through the controller method and into the ActionResult, all the lifting is done in the specific ActionResults themselves.
I’m very happy with the way it has turned out given how little time I’ve had to tackle this project. I managed to knock it all out in about 6 hours plus another hour to configure the project for NuGet submission, create a CodePlex repository for it, update some Wiki pages on the old and new project, etc.
As I get time I’ll need to clean up the source comments that came from the re-used code in the old library and create some actual documents. I might even try my hand at creating tests again but honestly I found them such a pain last time I might still be gun shy.
The Obligatory Fluffy Statement
I really hope this new project solves the minor gripes I was hearing from the last project. I’d be very happy to receive any feedback at all about how the project is being used, how it performs, all of that.
The Shameless Beg
Now who wants to make a logo for me?
The Sign Off