473,586 Members | 2,652 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Plugin-based application, general designing questions

Hi guys.

I am preparing the rewriting of an huge existing application in VB6. This
software is a mess of 10 years of patchs and new functionalities added
randomly, and didn't have any logical or oriented-object background.

This software is used by many differents persons, and there is a LOT of
functionalities that exists only for one or two of them. So, I want to use a
plugin-based system. That's it for the background.

Now, the questions.

1. I've read a lot of articles about plugin-based softwares, and I found
that they use an interface and then design the plugins based on it. Why an
interface, and not an abstract class, who can implement some 'global'
functions (database access, authentications , etc)? Is there a problem with
an abstract class based plugin type?

2. Because of the interface implementation, there is no way to have global
methods, designed on the host-app, and called by the plugins. Well, there
might be some way, but I'm still a newbie, and I don't know how. Can you
help me with that?

3. I've read some stuff about "signed DLL". Is this possible to load only
*signed* plugins, to be sure that the user won't use some other stuff than
ours? (ah, ah) How?

4. Is there maybe some doc' on software designing with plugins? I've found
only things about the technical way to do it, not about the "philosophi cal"
idea behind.

Thank you very much.

PS: Sorry, my english is poor.
--
S. Lorétan <http://www.tynril.info/(This link is in french. Sorry.)
Sep 26 '06 #1
6 1906
Hi,

Interface or abstract class depends on your requirements. In this case
I'd probably use an interface to let plug-in developers choose their own
base class.

If you're using the Enterprise libary, I'd have a look at the 'plug-in
loader application block':
http://msdn.microsoft.com/msdnmag/is...s/default.aspx

otherwise see these articles on the codeproject:
http://www.google.com/search?hl=en&l...n+architecture

Good luck,

Wiebe Tijsma

S. Lorétan wrote:
Hi guys.

I am preparing the rewriting of an huge existing application in VB6. This
software is a mess of 10 years of patchs and new functionalities added
randomly, and didn't have any logical or oriented-object background.

This software is used by many differents persons, and there is a LOT of
functionalities that exists only for one or two of them. So, I want to use a
plugin-based system. That's it for the background.

Now, the questions.

1. I've read a lot of articles about plugin-based softwares, and I found
that they use an interface and then design the plugins based on it. Why an
interface, and not an abstract class, who can implement some 'global'
functions (database access, authentications , etc)? Is there a problem with
an abstract class based plugin type?

2. Because of the interface implementation, there is no way to have global
methods, designed on the host-app, and called by the plugins. Well, there
might be some way, but I'm still a newbie, and I don't know how. Can you
help me with that?

3. I've read some stuff about "signed DLL". Is this possible to load only
*signed* plugins, to be sure that the user won't use some other stuff than
ours? (ah, ah) How?

4. Is there maybe some doc' on software designing with plugins? I've found
only things about the technical way to do it, not about the "philosophi cal"
idea behind.

Thank you very much.

PS: Sorry, my english is poor.
Sep 26 '06 #2
See the answers below : ;)
1. I've read a lot of articles about plugin-based softwares, and I found
that they use an interface and then design the plugins based on it. Why an
interface, and not an abstract class, who can implement some 'global'
functions (database access, authentications , etc)? Is there a problem with
an abstract class based plugin type?
Because you can implement many interfaces at once but cannot inherit more
than one class at once. You can do it with an abstract base class, but one
day or another you'll find yourself in the same situation you were with your
VB6 application and you'll face a requirement you cannot meet without
patching because you didn't tought about it in the beginning..
2. Because of the interface implementation, there is no way to have global
methods, designed on the host-app, and called by the plugins. Well, there
might be some way, but I'm still a newbie, and I don't know how. Can you
help me with that?
Absolutely... What I've done to workaround this is create an interface each
plugins must implement and a base class that provide the plugins I develop
with general global methods, so now my plugins inherit my base class to have
access to all those global methods (made them protected) and if a problem
arise, I can always go back to my implementing my interface and build
another base class from there. You get the point? ;)
3. I've read some stuff about "signed DLL". Is this possible to load only
*signed* plugins, to be sure that the user won't use some other stuff than
ours? (ah, ah) How?
can't help you on this one... sorry...
4. Is there maybe some doc' on software designing with plugins? I've found
only things about the technical way to do it, not about the
"philosophi cal" idea behind.
What do you mean by philosophical? Why to use plugins? How to think
plugin-oriented?
I hope it helps

ThunderMusic
Sep 26 '06 #3
Hi,

>
1. I've read a lot of articles about plugin-based softwares, and I found
that they use an interface and then design the plugins based on it. Why an
interface, and not an abstract class, who can implement some 'global'
functions (database access, authentications , etc)? Is there a problem with
an abstract class based plugin type?
Not at all, if you have some shared features you should use an abstract
class instead.
Regarding 'global' your example is not correct, in these cases is better to
use a static class. IF you also need flexibility then use a singleton
factory ( a class that has only one instance and you can select which
instance from several options, but once you select one and create it it
exist for ever and no instance of the others classes can be created)
2. Because of the interface implementation, there is no way to have global
methods, designed on the host-app, and called by the plugins. Well, there
might be some way, but I'm still a newbie, and I don't know how. Can you
help me with that?
There is no way to ahve global methods in .net no matter what. you could
have a singleton as I described it above.
3. I've read some stuff about "signed DLL". Is this possible to load only
*signed* plugins, to be sure that the user won't use some other stuff than
ours? (ah, ah) How?
Take a look in strong naming your dlls .
4. Is there maybe some doc' on software designing with plugins? I've found
only things about the technical way to do it, not about the
"philosophi cal" idea behind.
take a look at http://www.pobox.com/~skeet/csharp/plugin.html
Sep 26 '06 #4
Hi,

Thank for your advices. It's true that I'll probably want to inherit from
another class sometime. Now, I understand why using Interface instead of
abstract class.

--
S. Lorétan <http://www.tynril.info/(This link is in french. Sorry.)
"Wiebe Tijsma" <wi*********@CA PITALStijsma.co mwrote in:
OC************* *@TK2MSFTNGP02. phx.gbl...
Hi,

Interface or abstract class depends on your requirements. In this case I'd
probably use an interface to let plug-in developers choose their own base
class.

If you're using the Enterprise libary, I'd have a look at the 'plug-in
loader application block':
http://msdn.microsoft.com/msdnmag/is...s/default.aspx

otherwise see these articles on the codeproject:
http://www.google.com/search?hl=en&l...n+architecture

Good luck,

Wiebe Tijsma

S. Lorétan wrote:
>Hi guys.

I am preparing the rewriting of an huge existing application in VB6. This
software is a mess of 10 years of patchs and new functionalities added
randomly, and didn't have any logical or oriented-object background.

This software is used by many differents persons, and there is a LOT of
functionalitie s that exists only for one or two of them. So, I want to
use a plugin-based system. That's it for the background.

Now, the questions.

1. I've read a lot of articles about plugin-based softwares, and I found
that they use an interface and then design the plugins based on it. Why
an interface, and not an abstract class, who can implement some 'global'
functions (database access, authentications , etc)? Is there a problem
with an abstract class based plugin type?

2. Because of the interface implementation, there is no way to have
global methods, designed on the host-app, and called by the plugins.
Well, there might be some way, but I'm still a newbie, and I don't know
how. Can you help me with that?

3. I've read some stuff about "signed DLL". Is this possible to load only
*signed* plugins, to be sure that the user won't use some other stuff
than ours? (ah, ah) How?

4. Is there maybe some doc' on software designing with plugins? I've
found only things about the technical way to do it, not about the
"philosophical " idea behind.

Thank you very much.

PS: Sorry, my english is poor.

Sep 26 '06 #5
Hi,
See the answers below : ;)
Thank you for your help.
Because you can implement many interfaces at once but cannot inherit more
than one class at once. You can do it with an abstract base class, but one
day or another you'll find yourself in the same situation you were with
your VB6 application and you'll face a requirement you cannot meet without
patching because you didn't tought about it in the beginning..
True. Thank you.
Absolutely... What I've done to workaround this is create an interface
each plugins must implement and a base class that provide the plugins I
develop with general global methods, so now my plugins inherit my base
class to have access to all those global methods (made them protected) and
if a problem arise, I can always go back to my implementing my interface
and build another base class from there. You get the point? ;)
I understand it too. Thanks.
can't help you on this one... sorry...
No problem, I'll be digging some more.
What do you mean by philosophical? Why to use plugins? How to think
plugin-oriented?
Your 2nd option.
I hope it helps
It helps surely. Thank you very much.
Sep 26 '06 #6
Hi,
3. I've read some stuff about "signed DLL". Is this possible to load only *signed* plugins, to be sure that the user won't use
some other stuff than ours? (ah, ah) How?
In addition to Ignacio's remark about strong-naming your assemblies, take a look at the following to enforce that of your plug-ins
from your main assembly:

StrongNameIdent ityPermission Class on MSDN:
http://msdn2.microsoft.com/en-us/lib...ermission.aspx

--
Dave Sexton
Sep 26 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
2061
by: Simon Roses Femerling | last post by:
Dear pythonnians :) Hopeful somebody can help me about implementing plugin support. I'm working on a python/wxpython app that needs plugin support. My problem is: The way my app works is a python module (plugin) that contains (imbedded) XML defining the classname and some extra information and the app will be load the module using the...
2
20939
by: Rudolf | last post by:
Dear NG, I want to create a Plugin System in C# (WinForms). Has anybody experience about this, tips, tricks, or any links. Thank you very much The DotNetJunkie
2
2775
by: Chua Wen Ching | last post by:
Hi there, I had some doubts on creatings plugins. As most example on the internet shows how to write plugins onto a plugin host which is normally a windows form program. 1) Can i replace plugin host as class libraries instead of windows forms program?
2
2783
by: Edvard Majakari | last post by:
Hi, My idea is to create a system working as follows: each module knows path to plugin directory, and that directory contains modules which may add hooks to some points in the code. Inspired by http://www.python.org/pycon/2005/papers/7/pyconHooking.html I would create a class like this:
0
1394
by: sayalikulkarni | last post by:
Hello all, I have been trying to develop a security plugin for DB2 V8.2 using the GSS APIs. I have a library of GSS APIs implemented by a third party which I am using in my plugin. This plugin is now using the users and groups which belong to the active directory which are accessed by the GSS APIs. My DB2 database is installed in RH enterprise...
0
1431
by: Dan Dorey | last post by:
I'm in the midst of creating a plugin framework with the goal of making it as easy as possible for myself and other developers to both create new plugins and work with existing ones. Each plugin has a seperate sub-dir for each plugin with all external dependencies located in this directory. When I load these plugins dynamically everything...
3
2214
by: auad | last post by:
hi, I'm having a problem with plugins....as follows: I have 3 projects: 2 class libraries and 1 Windows App (Project 1: ClassLibrary) I have a plugin interface: -------------------------------------------------------------------- namespace API {
8
2019
by: Flavio | last post by:
Hi, Nowadays the addition of functionality to programs by means of plugins is very frequent. I want to know the opinions of experienced Python developers about the best practices when it comes to developing a plugin system for a Python package. Should plugins be modules in a separate package?
4
2586
by: anglozaxxon | last post by:
I'm making a program that consists of a main engine + plugins. Both are in Python. My question is, how do I go about importing arbitrary code and have it be able to use the engine's functions, classes, etc? First, here's how it's laid out on the filesystem: -mainstarterscript.py -<engine> -__init__.py - -<plugin>
3
5387
etiainen
by: etiainen | last post by:
Hi everyone! I'm in a bit of a problem here: I have to make a maven project for native (jni & C) code. I am using this plugin: http://mojo.codehaus.org/maven-native/native-maven-plugin/index.html and trying to make this example build: http://mojo.codehaus.org/maven-native/native-maven-plugin/examples/jni-dll.html (the jni one in svn)
0
7912
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8338
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7959
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6614
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5710
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5390
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3865
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2345
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1180
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.