“If debugging is the process of removing bugs, then programming must be the process of putting them in.” – Edsger Dijkstra
This is the Bug Tracking System for the Flyspray project. This is not a demo! Before opening a new task, please read the guidelines!
Do not issue bugs reports against versions earlier than 0.9.9.5
Security problem? Check the security section.
FS#601 - Templating backend
Attached to Project:
Flyspray - The bug killer!
Opened by Tony Collins (knigits) - Wednesday, 03 August 2005, 00:43 GMT+1
Last edited by Pierre Habouzit (MadCoder) - Wednesday, 09 November 2005, 03:16 GMT+1
Opened by Tony Collins (knigits) - Wednesday, 03 August 2005, 00:43 GMT+1
Last edited by Pierre Habouzit (MadCoder) - Wednesday, 09 November 2005, 03:16 GMT+1
|
DetailsFlyspray is a bit of a mish-mash of PHP code and SQL queries mixed in with the HTML. We need to seperate the code from the markup by using a templating system. Lately I’ve been looking at TinyButStrong, at http://www.tinybutstrong.com/ This task is to be started after we release 0.9.8, before any further features are added. |
Closed by Florian Schmitz (Floele)
Tuesday, 10 January 2006, 17:59 GMT+1
Reason for closing: Implemented in devel
Tuesday, 10 January 2006, 17:59 GMT+1
Reason for closing: Implemented in devel
Hm, I don’t know much about TinyButStrong, but why not to use some PEAR - stuff from http://pear.php.net. They have lots of template engines with open architecture. Especially Sigma (http://pear.php.net/package/HTML_Template_Sigma) has an extremely good reputation.
After some discussion on the mailing list, I’ve decided to go with Savant2 (http://phpsavant.com/). It’s pure php, so no learning any special new syntax. People on the ML said that they could follow my test code quite easily, so I’m fairly happy at this point. I may re-evaluate later if I come up against any terrible limitations, but it seems ok so far.
I don’t see the point. PHP is a pretty good template engine all by itself. Why clutter it up?
Make better use of includes and <?php tags.
I see the point especially when upgrades are due out. If you have made changes and all the layout is controled through a template then changing it back would be a lot simplier than going through all the php includes. Just my opinion.
Thank you, Tony, for not choosing PEAR. phpBugTracker (http://phpbt.sf.net/) uses PEAR, which seems to be the reason why I’m unable to evaluate phpBT...
By the way, most Drupal (http://www.drupal.org/) themes use the PHPTemplate theme engine, which you might consider comparing with Savant2. I don’t know the differences.
After looking at Savant2 in more depth, I really don’t see why I should use a templating ‘engine’ at all! I templated a few scripts using php includes (as eric said above), and it seems to work fairly well to me. After the release of 0.9.8, I will bring it up on the mailing list again and get some more opinions. In the meantime I will look at the PHPTemplate engine just to get a more rounded view of things.
Update: Pierre has written a custom template class for Flyspray, and has converted 90% of the scripts to use it. He’s done a great job. All that remains is the History tab on the task details page, and that looks painful. I’m not worried if it’s left as-is for a while.
Note so that Pierre doesn’t forget: Give the tpl_double_select function an option to disable the up/down arrows.