Re: HTML_Template_Flexy and the need for SPEED

From: Date: Wed, 23 Jul 2003 01:47:50 +0000
Subject: Re: HTML_Template_Flexy and the need for SPEED
References: 1  Groups: php.pear.general php.pear.general 
Request: Send a blank email to pear-general+get-6743@lists.php.net to get a copy of this message
Stan Lemon wrote:
I've been working on a CMS prog and it is evolving more and more every day. Anyhow, currently for my templates I have a table in the DB, I pluck the info out of the DB and run regular expressions to replace %keys% with content. I used to eval() everything that came out of that table so that the user could insert PHP code as needed but there are SO MANY security issues there I took it out, not to mention it was slower then mollasus. I've been lookg at HTML_Template_Flexy and I think I've convinced myself that this might help me, if not in anything else but the fact I can use some code rather then HTML to produce what I need. Plus there's the whole idea that when I want to change the template (and I usually do so first on my HD - defeats the purpose of a CMS, I know) the upload would be easier. I think in general the development of a template would be easier. The question, now that I've babeled... For those of you that use HTML_Template_Flexy, how is speed? Does it slow you down, speed you up, how is it in comparison to other Template packages, and other ways of handeling templates in general? My biggest issue with my prog, at this point is speed, and I want to make sure that this change is going to help me out in the long run.
It was designed for speed - in terms of having a limited load requirement (one class for already compiled templates). Compiling is slow (and deliberatly so as it happens rarely) CVS version has Quickforms removed, and a lightweight HTML Element for form elements. although this is not documented anywhere.
Also, I've seen and working with the example on the web, but does anyone have any examples which are a bit more complicated? This gives a rough idea of what most templates end up looking like: (a list page..)
http://www.akbkhome.com:81/svn/hebehaven2/templates/browse/committee_post_list.html http://devel.akbkhome.com/hebe2/templates/browse/committee_post_list.html http://www.akbkhome.com:81/svn/hebehaven2/templates/browse/account_code_edit.html http://devel.akbkhome.com/hebe2/templates/browse/account_code_edit.html this give some of an example of the form interface http://www.akbkhome.com:81/svn/hebehaven2/Hebe/backend/member_types_editlive.php the outputBody() call of this class actually uses the data from elements[] http://www.akbkhome.com:81/svn/akpear/HTML_FlexyFramework/FlexyFramework/Page.php There are still changes to the API for Flexy to be worked through. - It's in Beta, due to the fact that some methods may be added/or removed, although the basic infrustructure is there now, and I'm not that keen to break all my old code again :) Regards Alan
Thanks, - Stan


« previous php.pear.general (#6743) next »