Gossamer Forum
Home : Gossamer Threads Inc. : Discussion :

[Suggestion] Different GT plugin namespace for apps

Quote Reply
[Suggestion] Different GT plugin namespace for apps
There should be different GT plugin namespace for each application!

Currently only Plugins::myplugin namespace is used.

This is confusing, as there could be 2 plugins using the same name, but for different apps.

Let me show an example.

Current name example:
Plugins::Pagebuilder

To have it under different apps, you should rename it as following example shows:
Plugins::Pagebuilder_LSQL
Plugins::Pagebuilder_GComm
Plugins::Pagebuilder_DBManSQL


Instead of this should be moved under application based namespace:
Links::Plugins::Pagebuilder
Community::Plugins::Pagebuilder
Dbsql::Plugins::Pagebuilder

This would give a clear separation of plugins made for different apps.


In the meantime GT::Plugin should be modified to execute plugins under app namespace, but for backward compatibility reasons, should keep compatibility with Plugins:: namespace, too.

So plugins should be executed under these namespaces until GT apps v4.0 for compatibility reasons:
Plugins::
Links::Plugins::
Community::Plugins::
Dbsql::Plugins::

etc...

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] [Suggestion] Different GT plugin namespace for apps In reply to
I believe Community and GForum do use a different plugins layout. At least GForum does.

Plugins::GForum::

This is done, apparantly, in preparation for a merged "core" install, where code is shared in the GT library, and plugins are assigned to their particular app.

Plugins::GForum::
Plugins::Links::
Plugins::GLinks::
Plugins::Community::

Etc. It probably makes more sense to do it that way, since it would apply to all directories, where different apps had different overrides.


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [webmaster33] [Suggestion] Different GT plugin namespace for apps In reply to
Hi,

It is currently separated. Since Gossamer Links was first, it was done without a separation and is kept that way for backwards compatibility. However, all our other products use Plugins::Product::PluginName as the namespace so you won't have anything conflict.

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] [Suggestion] Different GT plugin namespace for apps In reply to
Oh Blush
Just forgot, that under GCommunity, plugins are placed under Plugins::Community:: namespace.

The idea came, because I'm working on a general installer, and the namespace thing confused me.

I aggree to keep Plugins:: for backward compatibility in LSQL, but wouldn't be possible to keep a namespace mirror of Plugins:: in Plugins::Links:: namespace?

This would mean, that I could use the following scheme for constructing package names:
my $app_name = get_app_name();
my $package = "Package::".$app_name;

In current solution, I have to do an exception just for LSQL, which is not really an elegant solution Unimpressed
Low priority subject, as workaround can be easily done.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...