By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,683 Members | 1,597 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,683 IT Pros & Developers. It's quick & easy.

Developing Plug-Ins

P: n/a
Hi!

Is there any recommendation how to develop plugin-like Asp.Net pages?
The use case: We have a framework, where you can administrate employees,
customers, etc. Now, customers always want some specific additional
views, which should be integrated into the web site.
How should I organize the web site(s), the solution(s) and the projects?

Thanks

Joe
Jun 5 '07 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Hello Joe,

As i understand you need to use WebParts. See there http://msdn2.microsoft.com/en-us/library/e0s9t4ck.aspx

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

JKHi!
JK>
JKIs there any recommendation how to develop plugin-like Asp.Net
JKpages?
JKThe use case: We have a framework, where you can administrate
JKemployees,
JKcustomers, etc. Now, customers always want some specific additional
JKviews, which should be integrated into the web site.
JKHow should I organize the web site(s), the solution(s) and the
JKprojects?
JKThanks
JK>
JKJoe
JK>
Jun 5 '07 #2

P: n/a
Michael Nemtsev wrote:
Hello Joe,

As i understand you need to use WebParts. See there
http://msdn2.microsoft.com/en-us/library/e0s9t4ck.aspx

---
WBR, Michael Nemtsev [.NET/C# MVP]. My blog:
http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and
we miss it, but that it is too low and we reach it" (c) Michelangelo

JKHi!
JKJKIs there any recommendation how to develop plugin-like Asp.Net
JKpages?
JKThe use case: We have a framework, where you can administrate
JKemployees,
JKcustomers, etc. Now, customers always want some specific additional
JKviews, which should be integrated into the web site.
JKHow should I organize the web site(s), the solution(s) and the
JKprojects?
JKThanks
JKJKJoe
JK>
Hi Michael,

no, webparts aren't what I am looking for. The customer shall not have
the possibility to edit or customize views.
Our target is to separate work tasks into main tasks (common to all
customers, maybe 80% of the web pages) and company specific tasks, which
another developer shall develop.
So our problem is, how can 2 developers work together easily? How can I
separate company specific stuff (add-on or plug-in like) from the main
application?

Regards,

Joe
Jun 5 '07 #3

P: n/a

We've done this kind of thing both with XML files and with reflection.

With XML files you might have a configuration xml file which defines
some links or lists or controls on a page or whatever you want to be
extensible. The XML file will contain header info and the name of the
page to link to or custom control to call or whatever. Then you just
have to modify the XML file based on installed plugins.

Another way, which I prefer, is to use reflection and attributes. Say
you have a customer view and you want to be able to add extra data,
create an attribute CustomerViewExtensionAttribute and you can have
some data in it to control order or header or whatever you need for
your visuals. Then using reflection you can loop through all the
assemblies in the appdomain (usually skipping gac) and find classes
that are marked with this attribute and include them in the
appropriate page. It's really important to cache this information as
the looping through assemblies part is relatively slow.

With code based plugins (non-visual), then an interface may be
preferred to an attribute since you will need it to implement some api
(with visuals they already implement a web control or page).

HTH,

Sam

------------------------------------------------------------
We're hiring! B-Line Medical is seeking .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.

On Tue, 05 Jun 2007 09:01:31 +0200, Joe Kovac <Jo****@nospam.com>
wrote:
>Hi!

Is there any recommendation how to develop plugin-like Asp.Net pages?
The use case: We have a framework, where you can administrate employees,
customers, etc. Now, customers always want some specific additional
views, which should be integrated into the web site.
How should I organize the web site(s), the solution(s) and the projects?

Thanks

Joe
Jun 5 '07 #4

P: n/a
you could build server-controls or user-controls to isolate code blocks
"Joe Kovac" <Jo****@nospam.comwrote in message news:dd***************************@news.inode.at.. .
Hi!

Is there any recommendation how to develop plugin-like Asp.Net pages? The use case: We have a framework, where you can
administrate employees, customers, etc. Now, customers always want some specific additional views, which should be integrated into
the web site.
How should I organize the web site(s), the solution(s) and the projects?

Thanks

Joe

Jun 5 '07 #5

P: n/a
Hi Sam,

thanks for your ideas. I think all of your concepts are good, but they
might take some time to implement. I guess I might use a combination of
them like follows:

Save general information of the plug-in within Web.config (XML). Save
plug-in classes (which I get told about in Web.config) within a plug-in
directory and use some kind of reflection.
The Web.config might tell me, that "JoePlugin" is a calls that extends
the general Plugin class. This class might be under
/website/APP_CODE/plugin/JoePlugin.cs. It would have to implement
functions like: getPluginPagesForMenu() aso.
Do you think that's a good way?
How would I call this class?

Regards,

Joe

Samuel R. Neff wrote:
We've done this kind of thing both with XML files and with reflection.

With XML files you might have a configuration xml file which defines
some links or lists or controls on a page or whatever you want to be
extensible. The XML file will contain header info and the name of the
page to link to or custom control to call or whatever. Then you just
have to modify the XML file based on installed plugins.

Another way, which I prefer, is to use reflection and attributes. Say
you have a customer view and you want to be able to add extra data,
create an attribute CustomerViewExtensionAttribute and you can have
some data in it to control order or header or whatever you need for
your visuals. Then using reflection you can loop through all the
assemblies in the appdomain (usually skipping gac) and find classes
that are marked with this attribute and include them in the
appropriate page. It's really important to cache this information as
the looping through assemblies part is relatively slow.

With code based plugins (non-visual), then an interface may be
preferred to an attribute since you will need it to implement some api
(with visuals they already implement a web control or page).

HTH,

Sam

------------------------------------------------------------
We're hiring! B-Line Medical is seeking .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.

On Tue, 05 Jun 2007 09:01:31 +0200, Joe Kovac <Jo****@nospam.com>
wrote:
>Hi!

Is there any recommendation how to develop plugin-like Asp.Net pages?
The use case: We have a framework, where you can administrate employees,
customers, etc. Now, customers always want some specific additional
views, which should be integrated into the web site.
How should I organize the web site(s), the solution(s) and the projects?

Thanks

Joe
Jun 5 '07 #6

P: n/a


"Joe Kovac" <Jo****@nospam.comwrote in message
news:dd***************************@news.inode.at.. .
Hi!

Is there any recommendation how to develop plugin-like Asp.Net pages? The
use case: We have a framework, where you can administrate employees,
customers, etc. Now, customers always want some specific additional views,
which should be integrated into the web site.
How should I organize the web site(s), the solution(s) and the projects?

Thanks

Joe
Take a look at the ASP.Net application called DotNetNuke, which uses a
plugin-type framework and, I believe, common practices for doing such a
thing.

www.dotnetnuke.com

Click on Downloads to get the instructions on how to download :)

HTH,
Mythran
Jun 5 '07 #7

P: n/a
Yes that would be good. To call the class use
Activator.CreateIntsance and it will give you an instance of the class
specified in your config file.

Also if your plugin api requires several classes,then really you want
to define a factory as the plugin starting point so you create a
factory for each plugin and then once you have the concrete factory
you create the supporting classes. This is exactly how the new
DbFactory architecture works in ADO.NET 2.0.

HTH,

Sam

------------------------------------------------------------
We're hiring! B-Line Medical is seeking .NET
Developers for exciting positions in medical product
development in MD/DC. Work with a variety of technologies
in a relaxed team environment. See ads on Dice.com.

On Tue, 05 Jun 2007 16:42:27 +0200, Joe Kovac <Jo****@nospam.com>
wrote:
>Hi Sam,

thanks for your ideas. I think all of your concepts are good, but they
might take some time to implement. I guess I might use a combination of
them like follows:

Save general information of the plug-in within Web.config (XML). Save
plug-in classes (which I get told about in Web.config) within a plug-in
directory and use some kind of reflection.
The Web.config might tell me, that "JoePlugin" is a calls that extends
the general Plugin class. This class might be under
/website/APP_CODE/plugin/JoePlugin.cs. It would have to implement
functions like: getPluginPagesForMenu() aso.
Do you think that's a good way?
How would I call this class?

Regards,

Joe
Jun 5 '07 #8

P: n/a
Mythran wrote:
>

"Joe Kovac" <Jo****@nospam.comwrote in message
news:dd***************************@news.inode.at.. .
>Hi!

Is there any recommendation how to develop plugin-like Asp.Net pages?
The use case: We have a framework, where you can administrate
employees, customers, etc. Now, customers always want some specific
additional views, which should be integrated into the web site.
How should I organize the web site(s), the solution(s) and the projects?

Thanks

Joe

Take a look at the ASP.Net application called DotNetNuke, which uses a
plugin-type framework and, I believe, common practices for doing such a
thing.

www.dotnetnuke.com

Click on Downloads to get the instructions on how to download :)

HTH,
Mythran

Hi,

DotNetNuke seems to be a good project. But I neither plan to rebuild it,
nor do I wan to extend it.
I guess my main task will be to create a solution, that uses another web
site as base and link additional web pages into the base web site. Hope
I can make that work.

Thanks

Joe
Jun 6 '07 #9

This discussion thread is closed

Replies have been disabled for this discussion.