473,695 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Plugin assembles best practices

This is a lengthy post; please bear with me...

This will be a large system with dozens of plugins. In addition to plugins
developed internally there will be 3rd parties that will write their own and
integrate them into our application. I will be managing the identification
and loading of these plugins. In addition, there are a number of assemblies
that plugins will reference, some shared, and others private.

There are a couple of approaches I am considering.

It is expected that all plugins will need to be registered so that the app
does not blindly load up
all assemblies searching for plugins to load.

FIRST OPTION - separate directories
The expected directory layout is like this...

BaseDirectory (application)
PluginManifest. xml (info on which ones to load)
-- Common (shared.dll, all versions forced to latest)
-- PlugIn1 directory (Plugin1.dll, private1.dll, v1.0)
-- PlugIn2 directory (Plugin2.dll, private1.dll, v1.1)
-- PlugIn3 directory (Plugin3.dll, private1.dll, v1.2)

All assemblies that share types are to be relocated to the common
directory. This occurs when the
assembly is installed. This involves determining if an assembly is intended
to be shared - this
implies that the assembly is exporting a type that the consumer of that
assembly (i.e. the plugin) is
also exporting or importing.
All shared assemblies will have binding redirects so that all other
assemblies will all be pointing
at the same one.

All assemblies that are intended to be private will remain in the
subdirectory of the plugin. A codebase hint
for each assembly to be loaded will be placed into the app.config file so
that the assembly lives in the fusion load context.
Put all assemblies into the same directory and enforce a naming convention
like this...
<namespace>.<as mName>.<version >.dll

This is intended to result in all assemblies having a unique name; the
name to include the assembly
version number.
No binding redirects to be done, nor will codebase hints be used, unless
there is a common assembly that
all others must share. This will be identified manually and a binding
redirect put into the app.config file.

The layout looks like this...

PluginManifest. xml (info on which ones to load)
shared.v1.0.dll , shared.v1.1.dll , shared.v1.2.dll ,
private1.v1.0.d ll
private1.v1.1.d ll
private1.v1.2.d ll

Separate directories.
Prevents clutter. Makes it easier to separate "system" *(i.e. our)
assemblies from addins, 3rd parties,
Ensures that all private assemblies remain that way as they are isolated
by directories.
There is no global naming scheme we need to maintain or enforce.
Each plugin can have separate associated data files. Can use its own
No naming conflicts.
Much more overhead in managing the system. I have to write a fusion-like
layer to handle all
the locations that assemblies can be in, the binding redirects, etc.
All plugins need to be analyzed for common items during the registration
One directory
Has the advantage of simplicity. Easy to locate and load assemblies.
No fusion-like layer to manage the assemblies is needed.
Requires a global naming scheme that everyone must adhere to.
Each plugin may be using a different version of an assembly and there is
no way to tell which one
is using what since they are all located in the same directory.
Identifying conflicts will be a nightmare.
If an assembly accidentally exports a type that is supposed to be private
will result in an error (typecase)
that will be very hard to troubleshoot.
Will be hard to "know" what assemblies are actually used and needed.
Clutters the directory.
If a plugin uses a data file may result in a name conflict with another

So, anyone have any comments? Which method would be best? What other methods
are there that I did not mention?

David Levine

Nov 16 '05 #1
0 1867

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

Similar topics

by: byrocat | last post by:
I'm chasing after a documetn that was available on one of the Microsoft websites that was titled somethign like "MS SQL Server Best Practices" and detailed a nyumber of best practices about securing the server. Included in this was revoking public access to the system table objects. Can someone post the URL where I can pick this up, or drop me a note on contacting them for a copy of the document?
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their code was littered with document.all and eval, for example, and I wanted to create a practical list of best practices that they could easily put to use. The above URL is version 1.0 (draft) that resulted. IMO, it is not a replacement for the FAQ,...
by: john doe | last post by:
A quick question, about so-called 'best practices', I'm interested in which of A/B of the two examples people would choose, and why. public enum MyEnum { Option1 = 0, Option2 = 1, Option3 = 2, Option4 = 3
by: jojobar | last post by:
Hello, I am trying to use vs.net 2005 to migrate a project originally in vs.net 2003. I started with creation of a "web site", and then created folders for each component of the site. I read somewhere that each folder under the "web site" is compiled in separate assembly. I however, did not find that the "web site" creation in vs.net 2005 created any AssemblyInfo.cs file.
by: Rune Jacobsen | last post by:
Hello all, I mailed our common hero and fellow newsgroupian Jon Skeet a question regarding his article on plugins at http://www.yoda.arachsys.com/csharp/plugin.html, and he suggested that I should post here. I was afraid to spam the group further with my silly questions, but I agree with his sentiment that this might benefit others, so here we are. My question regards the proper way to build the plugin projects. My host
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 linux 3.0 platform. However I am facing the following issues in the plugin: 1. The server principal...
by: Paciente8159 AKA Klayman | last post by:
Hi, I have a couple of doubts reggarding a plugin based application in C++? I want to build a c++ plugin based app. I have searched alot of things in the net but I still don't know how to start this. For example: I want the plugin to be able to expose functions and HANDLES (for synchronization with WaitForSingleObject for example).
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?
by: Olie | last post by:
I was quite surprised to find virtually nothing about this but I may have been searching for the wrong thing. I want to know the best way to provide a programming interface to a plugin. I already have a plugin architecture that allows the application to call code in a plugin but I want the plugin to also be able to call code in the application. I can think of many ways to do this but I am not sure the best way:
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
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 most users, this new feature is actually very convenient. If you want to control the update process,...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.