J
Joseph Ferris
I am working on a Web Application that can dynamically load
UserControls, a la a plugin style system. When I create any new
controls within the project, all is fine.
What my question is, would be how might I be able to allow someone to
create a plugin that would not require that I rebuild the application -
or is it even possible? Right now, this is what I have:
A BasePage class that inherits from System.Web.UI.Page that is used to
extend the Page object for extended rendering functionality.
A BaseControl class that inherits from System.Web.UI.UserControl that
is used to extend the UserControl object for specific rendering
capabilities that are used by all plugins.
I have a page that inherits from BasePage. To it, I've added a
PlaceHolder control. Then on Page_Load, I simply use LoadControl to
load the specific control and add it to the PlaceHolder. My ultimate
goal would be to build up a repository of these objects in a database
so that I could configure certain controls to be used in certain
situations. Basically, it is a CMS-type application.
Like I mentioned, as long as the control exists in the main project,
all is well. But assume that a third party wants to develop a plugin.
I don't want to give access to the code to that person, for obvious
reasons.
Are my options limited to adding the DLL from the plugin to the /bin
folder of the main application? After I do that, how do I get the
application to recongize the DLL? If I put them in a subfolder
structure to keep them organized, does this impact anything in regards
to the ability to load the control?
Thank you, in advance, for any input.
Joseph
UserControls, a la a plugin style system. When I create any new
controls within the project, all is fine.
What my question is, would be how might I be able to allow someone to
create a plugin that would not require that I rebuild the application -
or is it even possible? Right now, this is what I have:
A BasePage class that inherits from System.Web.UI.Page that is used to
extend the Page object for extended rendering functionality.
A BaseControl class that inherits from System.Web.UI.UserControl that
is used to extend the UserControl object for specific rendering
capabilities that are used by all plugins.
I have a page that inherits from BasePage. To it, I've added a
PlaceHolder control. Then on Page_Load, I simply use LoadControl to
load the specific control and add it to the PlaceHolder. My ultimate
goal would be to build up a repository of these objects in a database
so that I could configure certain controls to be used in certain
situations. Basically, it is a CMS-type application.
Like I mentioned, as long as the control exists in the main project,
all is well. But assume that a third party wants to develop a plugin.
I don't want to give access to the code to that person, for obvious
reasons.
Are my options limited to adding the DLL from the plugin to the /bin
folder of the main application? After I do that, how do I get the
application to recongize the DLL? If I put them in a subfolder
structure to keep them organized, does this impact anything in regards
to the ability to load the control?
Thank you, in advance, for any input.
Joseph