Forums / Suggestions / Multiple extension directory

Multiple extension directory

Author Message

Jérémy Poulain

Tuesday 20 July 2010 9:44:49 am

We can define in the site.ini file the name of the extension directory.

[ExtensionSettings]
ExtensionDirectory=extension

This value can only be a string. This means we can only use one folder for our extensions.

Using few folders instead of a single one could help maintaining the system, don't you think ?

Carlos Revillo

Tuesday 20 July 2010 10:35:09 am

mmm, really dunno. everybody usign ez publish knows that design stuff is on design folder, images and so on in var... and extensions use to be in extension folder.

for me, if i see different folders to the usual ones i would say... 'wtf?... now i have to check settings to know if this is an extension folder or something that someone has put there accidentally...' :)

on the other hand, maybe it could be an idea to have a separate folder for custom extensions and for 'contrib' extensions, being contrib those you get from projects.ez.no for example...

so you will have something like:

  • extension
  • contrib
  • ezgmaplocation
  • ezoe
  • custom
  • mycustomextension

thats my two pounds

André R.

Tuesday 20 July 2010 1:04:48 pm

Might be something to think about for future versions, but added to current kernel will just add overhead to figure out location of modules / settings / design, basically everything that is not handled by autoloader.

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Gaetano Giunta

Tuesday 20 July 2010 3:14:11 pm

what would help in system maintenance is really renaming the default folder from 'extension' to 'extensions' as

- it's the only dir with a singular noun

- you always have more than one anyway

;-)

ps: while at it, another dir that can be switched via an ini setting is the one where kernel modules reside. Moving it from $ezp/kernel to $ezp/modules would also be a good idea...

Principal Consultant International Business
Member of the Community Project Board

Thiago Campos Viana

Sunday 25 July 2010 2:38:15 pm

"

Might be something to think about for future versions, but added to current kernel will just add overhead to figure out location of modules / settings / design, basically everything that is not handled by autoloader.

"

It would also crash a lot of extensions, because some extensions, like ezfind, needs to be in the extension folder, if you check extension/ezfind/modules/ezfind/function_definition.php the include parameter makes references for files in "extension/ezfind/classes/"*

ie:

...

$FunctionList['search'] = array( 'name' => 'search',
                                  'operation_types' => 'read',
                                  'call_method' => array( 'class'  => 'ezfModuleFunctionCollection',
                                                          'include_file'  => 'extension/ezfind/classes/ezfmodulefunctioncollection.php',
                                                          'method' =>  'search' ),...

So do many extensions, this feature would create a need for some updates in all eZ publish extension that uses function_definition.php

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

Gaetano Giunta

Sunday 25 July 2010 3:40:34 pm

As long as autoload is always used for loading classes, the 'include_file' spec used in definition of tpl operators or fetch functions is moot. So if ezp code does not use it, extensions will still work without having to be patched...

Principal Consultant International Business
Member of the Community Project Board

Thiago Campos Viana

Sunday 25 July 2010 5:27:06 pm

Hi

Does autoload works for all folders of an extension? Like lib, classes, autoloads, datatypes?

If yes I think you are right, it would be nice to have multiple extension directory. But could you please tell me if it really loads all php files?

eZ Publish Certified Developer: http://auth.ez.no/certification/verify/376924

Twitter: http://twitter.com/tcv_br

Felix Woldt

Monday 26 July 2010 12:07:19 am

I vote for multiple extension directory.

The advantage would be:

You could have a 'global' extension repository where you have all your prefered extensions inside for example from projects.ez.no ... This could be a git checkout or svn checkout. If you have several ez instalallation it is easy to have keep all major extension up to date ( if you use only 1 git, svn repository ).

The custom extension with design, siteaccessdefinitions ... you could have in a seperate folder. And this custom extension could be in a seperate svn / git ( project svn ).

I agree to Andre's post, that the current kernel implementation of finding files .ini, .tpl files is not so good if we have more than one extension repositories. What is about the idea of having an index of all files in the ez extension dirs. An index of tpl files, ini files for every extension. So we reduce file_exists calls on the filesystem to find all related files because only the index is use to find the files.

http://www.jac-systeme.de - Developers united in eZ Publish: http://www.cjw-network.com

CJW Newsletter 1.0.0 released: http://projects.ez.no/cjw_newsletter