jeudi 28 avril 2016

Plugins for ASP.Net Webapplication

i'm working on a webapplication written in C# using the ASP.NET MVC framework.

I want to allow my clients to write their own plugins for the web application. Each client get it's own database.

I got some ideas how to do this:

  1. I will provide an interface which allows the user to upload his assembly dll. This will store the dll in a specific plugins-folder for the client.
  2. I will provide some C# Interfaces and Attributes for Class and Method annotations.
  3. The business logic of the server will check each plugin and search for classes and methods with these attributes or interface implementations to override or alter it's default behavior on certain points.
  4. For performance, I'll implement some form of caching that gets invalidated every time a new plugin is uploaded.

Now my question:

How can i allow the user to write a plugin? I mean how to provide some kind of SDK for this? The user primary needs the C# interfaces and Annotations but the developer also want's to test the plugin before uploading it to the production server. Can i pack my webapplication in some kind of DLL which could be loaded by the developer for testing purposes but not read the source code? Or is there any other way of doing this?

Thank you for any info on this!




Aucun commentaire:

Enregistrer un commentaire