July 18th, 2001, 01:32 PM
Re: PhpLib vs. FastTemplate
If I'm understanding correctly, PhpLib templating allows nesting templates, where FastTemplate does not. I've also been led to believe that FastTemplates was ported over to php from perl, where PhpLib is written in native php, and therefore runs more efficiently, I.E. FastTemplates uses ereg_replace, PHPLIb uses preg_replace which is touted to be faster.
If anyone knows these points to be false, please say so.
July 18th, 2001, 01:46 PM
Re: Is this wisdom generally accepted
For our web app I decided to go ahead and try Leon Atkinsons "FreeEnergy" approach.
It was more work up front, but is saving me time in the long run as the site grows. I think the overall methodology at least deserves a look if your considering a web app in php that has the potential to grow over time. (IMHO). Sure it uses more "includes" than other approaches, but fast hardware is cheap, developement/maintenance time is not.
July 19th, 2001, 04:23 AM
Re: PhpLib vs. FastTemplate
Libraries and classes don't hit performance that much. Even though a large library script may need to be loaded on the server-side, not all that data needs to make it's way to the client's browser (which could be in Zimbabwe over a 14.4k modem).
July 19th, 2001, 08:30 AM
Re: Any advantage when ...?
Interesting question. I have no answer, but why do you ask?
July 19th, 2001, 10:47 AM
Re: PhpLib vs. FastTemplate
But PhpLib has a preappend on each page. You have to edit the php config file. Does that preappend really only load the libraries? or is it actually loading some code that is run too. I thought it was the later.
July 22nd, 2001, 03:48 AM
What about TemplatePower?
Recently i developed a PHP4 class for templates. Its called TemplatePower and its about 6 times faster than FastTemplate. You can read more about it at:
please let me know what you think of it.
July 24th, 2001, 02:25 PM
While many comments have brought very good issues such as caching templates, using different methods to separate presentation from logic, the main issue in the comments is whether or not to even separate presentation from logic.
Here is a real world example where being able to separate presentation from logic won me a contract on a project:
A potential client wanted to move his site from static HTML pages to a database centered site. He didn't know anything about HTML and wanted to be able to update the site himself and have his friend who knew graphic design, update the look every now and then.
The client certainly didn't know HTML let alone PHP and his friend only used Dreamweaver. If I could set up the solution so that every page could be generated dynamically but also isolate the presentation and the PHP code, he would not have done it.
Being able to do this gave me money and experience. I hope this helps people figure out if the need to knbow about it or not. Keep in mind, this tutorial was intended to demonstrate separating presentation from logic, not advocating strictly FastTemplate. Some people use PHPLib or create their own such as the gentleman who posted recently. Find out what works given the circumstances.
August 8th, 2001, 06:31 AM
try http://xtpl.sourceforge.net much improvements, better and faster than FastTemplate,PHPLib Template and EasyTemplate together (i've tried all)
ciao dennis (from germany)
August 9th, 2001, 03:49 AM
I would like to know what you think of TemplatePower where I wrote about.
August 16th, 2001, 03:55 PM
FastTemplate is not really Object Oriented
Hm, someone says, that FastTemplate is Object Oriented. OKi it is but wait a minute! You need only *ONE* object for doing whole stuff.
The one of the main points of object oriented architectore is that objects are created (derived from classes) as they are in normal life. So than tell me, why FastTemplate don't use one-to-one model? One object will belong to one template and you will not need to use some specials keyqords like in FastTemplate.
In fact I can't find any one-to-one template system and I don't know why. I wrote my own, but I'm so confused. People don't know the basics of OO modeling or am I thinking in wrong way?
So the question at the end. Why is FastTemplate object oriented since you need only one object for whole stuff?!
August 20th, 2001, 04:00 PM
full examples please
I really this idea nomatter if you call it OO or not. If this works and it seems to do so then it is great. I am new to all this and I am trying to get it to work for me, but I can't seem to do it. I would like a real full example including the database with it. I would like to separate the content from the database (tables) from the presentation of the output of the database but I can't seem to do it as of yet. Can anyone send me a full detailed example of how to do it? I can do the first example show in this article but not the MySQL database driven example (the last one).
So if anyone can tell me how to do this please I would be very grateful.
Thanks in advance.
August 28th, 2001, 01:45 AM
August 28th, 2001, 04:18 AM
Re: What about TemplatePower?
September 1st, 2001, 07:39 AM
They go hand in hand
Logic and Graphic Design go hand in hand. The rules of web design is that the site should be both visually stimulating and easy to navigate. In order to achive both of these goals you must think of both the design but think of it in a logical order. If the site is confusing such as using things like "magic meat" (buttons that you are not sure of where you are going untill you roll over them) then the users can become confused as to what they are suppose to do with the site.
Think logically about you design.
September 11th, 2001, 09:41 AM
PHP script inside a template?
I have implemented the FastTemplateClass, but i was very surprised to see that it couldnt parse any php script inside a template. it doesnt take it as a PHP tag.
Any ideas or fix please??