[development] Move all core modules into their own directories.

Earl Miles merlin at logrus.com
Thu May 4 14:55:51 UTC 2006


Adrian Rossouw wrote:
> Most of the other theme engines are just copy pastes of phptemplate,  
> re-implementing
> one or two functions.
> 
> I'll glady step up and work on the compatibility of theme engines ,  and 
> the interoperability
> with standard drupal themes (although in reality, everything will  work 
> as before).

I like this idea.

1) Including lots of templates might be a performance drain; I've already done 
some experiments that show that even with an opcache, more PHP files with small 
amounts of code is significantly slower to process than 1 PHP file with lots of 
code. Though I think this could be rectified with a PHPTemplateCompiled engine,
where the compiler extracts all of the files necessary and puts them into a 
single template file. This would have an advantage of making design easier by 
separating the templates, but impacting the performance much less...but it does 
have the disadvantage of the compiling process being a disconnect between 
modifying and using. Still, I think there could be some value here.

2) This fits nicely with the views template system where I have specifically 
named templates for each view, and I've heard wind that other modules are using 
similar systems -- it's really very much the same as node-page.tpl.php and in 
this future templating system, would likely work the same way.

3) There's no reason that we can't require future engines to all parse PHP 
template files *as well as* whatever their own template infrastructure wants; at 
that point, alternative template engines (smarty, xtemplate, for example) can 
simply provide their own versions of the templates. However, we need to be very 
careful to not include code in our templates at that point.


More information about the development mailing list