Creating plug ins for an ASP.net app

G

Guest

Hello.
I would like to build my app in sort of a "plug and play" way and i dont
know how.
I would like to have a directory on the server with DLL files, each
including a class (derived from some base class i will use),
and my program will iterate these classes and by creating an instance of
these classes.
So this way each time i want to add a feature to the app i will only have to
add a DLL file and w'ont have to tuch any other file on the server.

How can i do this?
Thank you
 
G

Guest

Hello.
I would like to build my app in sort of a "plug and play" way and i
dont know how.
I would like to have a directory on the server with DLL files, each
including a class (derived from some base class i will use),
and my program will iterate these classes and by creating an instance
of these classes.
So this way each time i want to add a feature to the app i will only
have to add a DLL file and w'ont have to tuch any other file on the
server.

How can i do this?



Unfortunately with ASP.NET your DLLs must reside in the BIN directory...
but that is OK. Your application can still have a plug-in architecture.

You basically create a custom interface for your plug-in DLLs. You then
scan your BIN directory looking for all DLLs that implement the interface.
Once you know all DLLs that contain the interface you can easily
instantiate them via reflection to find out additional properties (i.e.
Name of Plugin, type, etc).

More info here:

http://www.developerfusion.co.uk/show/4371/

In regards to displaying plug-in screens - you can do this by creating a
DLL library with ASCX files. Unfortunately VS.NET does not allow you to
easily compile a DLL library with user controls, but if you check .NET
Nuke's Module Developer Guide they will give you the steps on how to fudge
VS.NET to compile a DLL w/ User Controls.

To load a Plug-in w/ screens you would just use the Standard
Page.LoadControl("Directory_To_ASCX_Files). Since the custom Plugin DLLs
reside in the BIN directory, ASP.NET will auto-load the code : )
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top