June 13, 2013
My intro to web programming was with PHP and scripts such as phpBB and other internet forum software. I always like that installing a plugin normally just worked. You would drop a folder into some directory and the script would see it and you could install it. I have yet to really see this recreated in ASP.NET MVC.
For the past year or so I have been trying to find a way to recreate this. There are many blog posts and half tutorials on this. There is even a few libraries out there on how to do this.
And old blog post from 2008 was my starting off point. It talked about Virtual Paths. It worked but the syntax was terrible.
I knew if I was going to do this, I wanted everything to just work as easily as possible. I also wanted the plugins to be runnable on there own if the developer wanted (for dev and debug reasons).
Griffin.MvcContrib has a way to do this. It seems overly complicated to me. So I kept at it.
After some more searching I found an example of some code that implemented a virtual path provider. I don’t know from where or who but I feel bad because I would like to give them credit. I finally had enough to start tinkering on my own.
I finally have something to show for all of this. I have posted on github a working example of how to create a ASP.NET MVC plugin system. This system allows for DLLs that contain all necessary files, compiled or embedded, to be dropped into the bin directory of a main site and then those files served from the DLL.
Questions are always welcome.
Written by Tony Gemoll. Shorter opinions found on twitter