Re: plug-ins: what is the right way?




On Sat, 15 May 1999, Andrea Bosio wrote:
> 
> I want to add plug-in capability to my gnome application. 
> But what is the right way?
>

It depends on what you want to plugins to do.
 
> 
> I think that CORBA is a great thing to this such of things... but
> none uses it for plug-ins. I've taken a look at gnumeric and gimp,
> and they doesn't seem to use CORBA for plugins (am I wrong?).
> My question is why.
> 
> On the other hand I haven't used CORBA and doesn't seem so easy
> to use.
> 

There are lots of ways to make an application extensible:

1) Dynamic loading of modules with g_module_* - advantage is speed
   and access to all application internals - disadvantage is that 
   plugins have to be in C, and they can crash the application.

2) CORBA - advantage is that it works over the network, uses a 
   well-defined interface, and extensions can be written in any language
   that has CORBA bindings and can speak to your app (Gnumeric has 
   this too, it's just not called "plugins"

3) Scripting languages - Guile, Python - advantage is lots of flexibility,
   disadvantage is that your app has to be designed to work well with it 
   (handle garbage collection, etc.) Also, you have to write a bunch 
   of wrappers for C functions. Gnumeric has this too...
   Scwm is the very nicest example to follow though, IMO.

Havoc





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]