Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

[STANDARD] Common Function Library (CFL) for each plugin developer

Quote Reply
[STANDARD] Common Function Library (CFL) for each plugin developer
I opened this thread to discuss the standard of Common Function Libraries (CFL), we may use in our LSQL plugins. Nobody is forced to use these standards, but would be fine to have a standard, which is aggreed by most of LSQL plugin developers.

This problem was originally suggested several times by Ian, but I do not remember that there was a final solution or standard how to do it. Let me know, if I missed it...

If we have a standard for CFL-s, the developers may use the CFL-s of other developers, and may create their install.pm the way to check if there is already installed the required version of a CFL, or newer version.

I plan to create a common function library for myself, where I will place my commonly used libraries, modules, under /admin/Plugins/ path in directory with standard name.
My opinion is, that each plugin developer may have his own CFL, since others may have usedcsame files in their developments...

I think there would be 2 possible solutions:

A) Using /admin/Plugins/common-W33-v1.0.0/ directory, which name already includes the version for version checking
The directory naming convention is the following:
1) starts with word "common"
2) - delimiter follows
3) Plugin developer name (short one, the most known)
4) - delimiter follows
5) the version number follows

B) Using /admin/Plugins/common-W33/ directory and a "version" file for version checking
- The current CFL version identifying solution is, to have a file named "version" in "common-W33" directory, which have the only content: current version of the common library release, e.g. "v1.0.0". This will be used to identify by an install script, if the needed version or newer is available.

I would prefer the solution A) .

I would be curious about opinion of other plugin developers (especially Ian, who originally suggested that), what they think about this CFL standard suggestion?
Which of the suggested ways above is better?
Would be there a better solution than these?

Opinions, comments are appreciated.

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] [STANDARD] Common Function Library (CFL) for each plugin developer In reply to
...and how are you going to get your plugin to test which CFL's are currently available in the server?
Quote Reply
Re: [Paul] [STANDARD] Common Function Library (CFL) for each plugin developer In reply to
It is possible to write a commonly used function, which will read the directory and list all "common-*" directory names.
If we use solution A), we can get the developer name, and version, just in one step.
Any problem with this?

* W33 is now AWAY for 2 hour *

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] [STANDARD] Common Function Library (CFL) for each plugin developer In reply to
I am currently learning and will be making my own modules also. But I am still of the opinion a common set of functions is a good way to go. I found that this is necessary as I seem to be duplicating a lot of functions throughout my plugins.


Quote:


The directory naming convention is the following:
1) starts with word "common"
2) - delimiter follows
3) Plugin developer name (short one, the most known)
4) - delimiter follows
5) the version number follows


Good ideas.

Point 3 could be done for sure. Though It would be a fair task to go and change all of my existing plugin names, as this will cause a problem when users go to update the plugin on their system.


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

Ian: Aug 12, 2002, 10:26 AM
Quote Reply
Re: [Ian] [STANDARD] Common Function Library (CFL) for each plugin developer In reply to
I'm glad, that you aggree this way.
If others also aggree this rule, then I will begin to develop my plugins based on the suggested way A).

In the beginning, so there will be no function or module exist to treat, check, or compare Common Function Libraries. I will develop it later, when as I will need it.

The module, which will treat, check, or compare CFL-s should be also placed into a directory.
My opinion is that it should be placed into "common-standard-v1.0.0" or "common-modules-v1.0.0"...
Opinions?

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] [STANDARD] Common Function Library (CFL) for each plugin developer In reply to
Who says you should write the code?...what if I want to write it? Wink
Quote Reply
Re: [Paul] [STANDARD] Common Function Library (CFL) for each plugin developer In reply to
Paul, do it if you want.

But the module should work to fit general needs, not just the personal needs.
Please keep in mind this.

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] [STANDARD] Common Function Library (CFL) for each plugin developer In reply to
Just to make sure we are on the same page, you are talking about the code to check for the library existence correct?
Quote Reply
Re: [webmaster33] [STANDARD] Common Function Library (CFL) for each plugin developer In reply to
I am a bit sceptical about this. I fear it will only add a lot of burocracy, and I don't see the value added.

Could you explain a bit on what kind of functions you would like to see in the common library?

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [Paul] [STANDARD] Common Function Library (CFL) for each plugin developer In reply to
>code to check for the library existence correct
Yeah, the library existence, and version checking. Useful for install.pm to check the needed common libraries (Usually for the same developer. However may be possible to use other's common library, too.)

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: [yogi] [STANDARD] Common Function Library (CFL) for each plugin developer In reply to
Common libraries will contain only the developers own commonly used functions.

I suggested a real common library which will contain a module to to check existance of CFL-s, and versions of them.

EDIT: useful for reusable functions between the plugins of a developer, and maybe between other developers, too, if a developer publishes his/her CFL.
My developments definitely needs this, since I begin to have redundant functions.

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...

Last edited by:

webmaster33: Aug 12, 2002, 11:36 AM