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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 17 2025 23:54:46
Script start
Timing: Jan 17 2025 23:54:46
Module start 'layout'
Timing: Jan 17 2025 23:54:46
Module start 'content'
Timing: Jan 17 2025 23:54:47
Module end 'content'
Timing: Jan 17 2025 23:54:47
Script end

Main resources:

Total runtime0.7034 sec
Peak memory usage4,096.0000 KB
Database Queries80

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0051 587.9141152.6250
Module start 'layout' 0.00510.0028 740.539139.4453
Module start 'content' 0.00780.6942 779.9844779.7109
Module end 'content' 0.70200.0014 1,559.695324.1641
Script end 0.7034  1,583.8594 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4210160.0002
Check MTime0.00130.1788160.0001
Mysql Total
Database connection0.00060.080510.0006
Mysqli_queries0.618387.8950800.0077
Looping result0.00080.1186780.0000
Template Total0.674595.920.3373
Template load0.00200.287920.0010
Template processing0.672595.603020.3363
Template load and register function0.00020.023210.0002
states
state_id_array0.00080.113010.0008
state_identifier_array0.00080.112020.0004
Override
Cache load0.00180.2627540.0000
Sytem overhead
Fetch class attribute can translate value0.00090.126660.0001
Fetch class attribute name0.00220.3195130.0002
XML
Image XML parsing0.00881.257060.0015
class_abstraction
Instantiating content class attribute0.00000.0039150.0000
General
dbfile0.00921.3089400.0002
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
7content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
8content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
12content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ul.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ul.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 34
 Number of unique templates used: 9

Time used to render debug report: 0.0001 secs