Gossamer Forum
Home : Products : Others : Gossamer Community :

Common API level above GT apps

Quote Reply
Common API level above GT apps
Alex, GT staff,

There would be very helpful to have a common API level above all GT apps, like GComm, LSQL, etc...
Usually there are the same functionalities solved in the same way in each app, but when you come to write a general code, which can interact with any GT app (depending from where it's called), you can NOT do that easily, because every app uses different naming logic.

There are a lot inconsistencies in the apps, thus these would require a new API level which would unify the API over all GT apps. For example:
Code:
GCommunity package <=> Links SQL package
Community::Web::Plugins <=> Links::Plugins
Community::comm_fatal <=> Links::fatal
$CFG->{system_template_set} <=> $CFG->{build_default_tpl}
$CFG->{path_private}.'/lib' <=> $CFG->{admin_root_path}
etc...

I'm solving this temporarily by using closures, thus generating the same result, when using came code together with different apps. It basically acts as difference converter/equalizer, and simulates a separate API level.
In later GT developments, the new API level may be placed into main::GT::APP or just main::APP.

Also, very important: GT should install just 1 GT library into a separate directory, and all GT apps should be able to connect the same GT library, from different directories!
Since there are different GT library versions, would be fine to have them installed separated by versions. This should also apply to the APPS library.


GT library should be installed into: ./common/GT_V1_36/GT/ or ./common/GT_V2_53/GT/
APP library should be installed into: ./common/GT_V1_36/APP/ or ./common/GT_V2_53/GT/APP/
The GT word seems to be duplicated, but it has a good reason. We make the ./common/GT_V1_36/ as base library path, so changing the version information should not affect the stable package structure.


Inside the GT and APP library GT::Version and App::Version modules might handle the version informations internally.


The appropiate GT apps would be installed as usual, into the chosen directories (but they don't have a GT directory in each app dir. They use the common GT dir):
./cgi-bin/LSQL/
./cgi-bin/GCommunity/
./cgi-bin/GForum/
./cgi-bin/DBManSQL/

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