-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
are there any reasons against introducing Smarty as template engine with phpMyAdmin? And of course ship it with phpMyAdmin?
the only 'problem' i see is that Smarty needs a writable directory to store its compiled files - i don't know if it is possible to 'precompile' this files as normally the templates will not be changed by the user
- -- Sebastian Mendel
www.sebastianmendel.de
Hi
On Tue, 30 May 2006 15:59:55 +0200 Sebastian Mendel lists@sebastianmendel.de wrote:
are there any reasons against introducing Smarty as template engine with phpMyAdmin? And of course ship it with phpMyAdmin?
I don't see any reason except that it needs quite a lot of time to switch everything to templates. Maybe it would be even better to start new project :-).
the only 'problem' i see is that Smarty needs a writable directory to store its compiled files - i don't know if it is possible to 'precompile' this files as normally the templates will not be changed by the user
Having need for writable directory is not good, I'd prefer if we could avoid it.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi!
the only 'problem' i see is that Smarty needs a writable directory to store its compiled files - i don't know if it is possible to 'precompile' this files as normally the templates will not be changed by the user
Having need for writable directory is not good, I'd prefer if we could avoid it.
By not supporting the user to choose different smarty templates (which I agree should not be our first goal for introducing them) we can deliver pre-compiled template files in a non-writable directory. Smarty's compile checks can be disabled/bypassed, so that it will work okay. It would just be required upon bundling the release to parse the compiled templates in a single run so that the right compiled *.php files are delivered.
Actually disabling the compile checks would also speed things up a bit.
And I agree, forcing a writable directory wouldn't be so great security-wise.
Best regards, Garvin
- -- ++ Garvin Hicking | Web-Entwickler [PHP] | www.garv.in | ICQ 21392242 ++ Developer of | www.phpMyAdmin.net | www.s9y.org
++ Make me happy | http://wishes.garv.in
Michal Čihař wrote:
Hi
On Tue, 30 May 2006 15:59:55 +0200 Sebastian Mendel lists@sebastianmendel.de wrote:
are there any reasons against introducing Smarty as template engine with phpMyAdmin? And of course ship it with phpMyAdmin?
I doesn't get my vote, I don't think it's a good idea. Main reasons:
1. The benefits are very small except for a very small group of people. I actually don't see a single reason why this would be implemented, things like color adjustments, switching logos and the like are already possible and pretty easy. 2. The development of additional features would take a longer time + the added complexity when debugging. 3. The switch to smarty templates would take forever (duke nukem forever kind of forever) 4. Smarty, if not used right, causes a lot of overhead, even when the templates get cached. Expect to see at least 0.1-0.2 seconds added to the current load time.
I don't see any reason except that it needs quite a lot of time to switch everything to templates. Maybe it would be even better to start new project :-).
the only 'problem' i see is that Smarty needs a writable directory to store its compiled files - i don't know if it is possible to 'precompile' this files as normally the templates will not be changed by the user
Having need for writable directory is not good, I'd prefer if we could avoid it.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Arnor!
I doesn't get my vote, I don't think it's a good idea. Main reasons:
- The benefits are very small except for a very small group of people.
I actually don't see a single reason why this would be implemented, things like color adjustments, switching logos and the like are already possible and pretty easy. 2. The development of additional features would take a longer time + the added complexity when debugging. 3. The switch to smarty templates would take forever (duke nukem forever kind of forever) 4. Smarty, if not used right, causes a lot of overhead, even when the templates get cached. Expect to see at least 0.1-0.2 seconds added to the current load time.
I think you are misunderstanding the reason for templates.
Templares are there to separate logic from display. It's not about us being able to make different GUIs possible, it's about having clean PHP and clean HTML code without intermixture.
About point 2, the development would take less time actually, because everything will be more modular. Only initial deployment of the templating engine will take time that would not happen if we were not using it. But as Sebastian already posted, it speeds up development for all future tasks and also adds clarity for developers.
Point 3.: No, as Sebastian pointed out the migration can be done almost seamless and iterative.
Point 4., there is no such thing as "seconds" in terms of perfomance measuring. It's all about percentage. Actually with pre-compiled PHP code, the only overhead that happens is variables being assigned to a central array and being read frmo there. I am quite sure that if we test it later on, the performance penalty will be below 5%. When using a PHP bytecode cache, performance might even increase.
So, IMHO only point 4 is a valid concern, but this is IMHO neglectible because of the clear improvement in the code base, which scares of most developers today.
Best regards, Garvin
- -- ++ Garvin Hicking | Web-Entwickler [PHP] | www.garv.in | ICQ 21392242 ++ Developer of | www.phpMyAdmin.net | www.s9y.org
++ Make me happy | http://wishes.garv.in
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Garvin Hicking schrieb:
Hi Arnor!
I doesn't get my vote, I don't think it's a good idea. Main reasons:
- The benefits are very small except for a very small group of people.
I actually don't see a single reason why this would be implemented, things like color adjustments, switching logos and the like are already possible and pretty easy. 2. The development of additional features would take a longer time + the added complexity when debugging. 3. The switch to smarty templates would take forever (duke nukem forever kind of forever) 4. Smarty, if not used right, causes a lot of overhead, even when the templates get cached. Expect to see at least 0.1-0.2 seconds added to the current load time.
I think you are misunderstanding the reason for templates.
Templares are there to separate logic from display. It's not about us being able
application logic from display logic! not logic from display! ;-)
- -- Sebastian Mendel
www.sebastianmendel.de
Garvin Hicking a écrit :
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Arnor!
I doesn't get my vote, I don't think it's a good idea. Main reasons:
- The benefits are very small except for a very small group of people.
I actually don't see a single reason why this would be implemented, things like color adjustments, switching logos and the like are already possible and pretty easy. 2. The development of additional features would take a longer time + the added complexity when debugging. 3. The switch to smarty templates would take forever (duke nukem forever kind of forever) 4. Smarty, if not used right, causes a lot of overhead, even when the templates get cached. Expect to see at least 0.1-0.2 seconds added to the current load time.
I think you are misunderstanding the reason for templates.
Templares are there to separate logic from display. It's not about us being able to make different GUIs possible, it's about having clean PHP and clean HTML code without intermixture.
About point 2, the development would take less time actually, because everything will be more modular. Only initial deployment of the templating engine will take time that would not happen if we were not using it. But as Sebastian already posted, it speeds up development for all future tasks and also adds clarity for developers.
Point 3.: No, as Sebastian pointed out the migration can be done almost seamless and iterative.
Point 4., there is no such thing as "seconds" in terms of perfomance measuring. It's all about percentage. Actually with pre-compiled PHP code, the only overhead that happens is variables being assigned to a central array and being read frmo there. I am quite sure that if we test it later on, the performance penalty will be below 5%. When using a PHP bytecode cache, performance might even increase.
So, IMHO only point 4 is a valid concern, but this is IMHO neglectible because of the clear improvement in the code base, which scares of most developers today.
Best regards, Garvin
Garvin, are there some OSS projects of a scale comparable to phpMyAdmin, that are using Smarty?
Marc
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Marc Delisle schrieb:
are there some OSS projects of a scale comparable to phpMyAdmin, that are using Smarty?
http://smarty.php.net/resources.php
- -- Sebastian Mendel
www.sebastianmendel.de
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Marc!
are there some OSS projects of a scale comparable to phpMyAdmin, that are using Smarty?
Are you speaking of a scale in terms of "public awareness" of "lines of code"?
Regarding sheer project size - serendipity is fairly large and using it quite successfully. xtCommerce is also using Smarty (but in a rather bad way). Xoops, Tiki CMS, Drupal, Postnuke, phpLens, phpDocumentor.
Amongst PHP developers it is IMHO recognized as the most flexible templating engine.
Best regards, Garvin
- -- ++ Garvin Hicking | Web-Entwickler [PHP] | www.garv.in | ICQ 21392242 ++ Developer of | www.phpMyAdmin.net | www.s9y.org
++ Make me happy | http://wishes.garv.in
Garvin wrote:
Are you speaking of a scale in terms of "public awareness" of "lines of code"?
Regarding sheer project size - serendipity is fairly large and using it quite successfully. xtCommerce is also using Smarty (but in a rather bad way). Xoops, Tiki CMS, Drupal, Postnuke, phpLens, phpDocumentor.
Amongst PHP developers it is IMHO recognized as the most flexible templating engine.
What about security concerns?? You'd be on the mercy of another projects' bugs, continuity and activity. And constantly trying to be up to date to some other people's codebase. Just thaughts...
Best regards, Arnor Heidar
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Arnór schrieb:
Garvin wrote:
Are you speaking of a scale in terms of "public awareness" of "lines of code"?
Regarding sheer project size - serendipity is fairly large and using it quite successfully. xtCommerce is also using Smarty (but in a rather bad way). Xoops, Tiki CMS, Drupal, Postnuke, phpLens, phpDocumentor.
Amongst PHP developers it is IMHO recognized as the most flexible templating engine.
What about security concerns?? You'd be on the mercy of another projects' bugs, continuity and activity. And constantly trying to be up to date to some other people's codebase. Just thaughts...
we are already at the mercy of other projects bug's: apache, mysql, php, fpdf, the os, the user, ... ;-)
- -- Sebastian Mendel
www.sebastianmendel.de
Hi Arnor!
What about security concerns?? You'd be on the mercy of another projects' bugs, continuity and activity. And constantly trying to be up to date to some other people's codebase. Just thaughts...
Yes, this is true but applies to any dependency one has in a project. However the Smarty project is deployed on many, many sites. Also the ZEND Framework endorses its use, so the chances are that Smarty will be well-maintained for quite some time in the future.
Best regards, Garvin
Sebastian Mendel a écrit :
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi,
are there any reasons against introducing Smarty as template engine with phpMyAdmin? And of course ship it with phpMyAdmin?
Lack of manpower on the PMA team?
the only 'problem' i see is that Smarty needs a writable directory to store its compiled files - i don't know if it is possible to 'precompile' this files as normally the templates will not be changed by the user
We have to be careful to avoid adding another pre-install constraint. Now I don't know much Smarty so my opinion is not formed yet.
Marc
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Marc Delisle schrieb:
Sebastian Mendel a écrit :
Hi,
are there any reasons against introducing Smarty as template engine with phpMyAdmin? And of course ship it with phpMyAdmin?
Lack of manpower on the PMA team?
it is hard to explain all the advantages you get from templates - most you will only see/recognize if you start using it - at least for my projects it helps me save a lot of time/manpower!
- -- Sebastian Mendel
www.sebastianmendel.de
Hi
On Tue, 30 May 2006 16:54:07 +0200 Sebastian Mendel lists@sebastianmendel.de wrote:
it is hard to explain all the advantages you get from templates - most you will only see/recognize if you start using it - at least for my projects it helps me save a lot of time/manpower!
Templates help a lot, however it doesn't decrease time needed to switch to them ;-).
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Michal ?iha? schrieb:
Hi
On Tue, 30 May 2006 16:54:07 +0200 Sebastian Mendel lists@sebastianmendel.de wrote:
it is hard to explain all the advantages you get from templates - most you will only see/recognize if you start using it - at least for my projects it helps me save a lot of time/manpower!
Templates help a lot, however it doesn't decrease time needed to switch to them ;-).
Yes, but it has a high ROI!
- -- Sebastian Mendel
www.sebastianmendel.de