NYCPHP Meetup

NYPHP.org

[nycphp-talk] Templating and authentication

max goldberg max at idsociety.com
Tue Oct 8 11:39:43 EDT 2002


	I've been involved in the same type of projects before and been in the 
same situations. Although I decided at the time that creating static 
versions of the content each time a user updated it in the CMS, I have 
had a good amount of experience with template systems. The majority of 
template engines written solely in PHP seem to have the downfall of 
using eregs which on a high load can produce a good amount of latency.
	
	Another option is to exec a process which does the templating, which 
also has a decent amount of latency, but when replacing a very large 
amount of variables may be a viable solution. Such an outside solution 
may also be good if you are in need of the use of templates outside of 
your project, such as external scripts in Java or Perl, etc. ClearSilver 
(www.clearsilver.net) may be a good example of this, and I think there 
is an apache module for it too (a friend of mine started work on a PHP 
module to replace the exec call, but never finished it if I recall 
correctly).

The best solution I've seen to date is FastTemplate 
(http://www.thewebmasters.net/php/FastTemplate.phtml) modified to use a 
custom template php module. The module was not very near to being done 
and was written by a past employer of mine, basically taking out the PHP 
call to ereg and replacing it with a finite state machine. I'm not 
really sure why no one has put a suitable amount of time into a similar 
module for PHP as I think it would be widely used.

Regardless, depending on your needs you have a few choices.

-Max


Adam Fields wrote:
> I just joined this list, although I've been coding in PHP for a while
> now. It was good to meet some of you at the meetup last week!
> 
> I'm working on a dynamic configuration-driven autogenerated CMS in
> PHP, and I'm looking for a templating system to hook into it for the
> display side. I'm thinking something along the lines of velocity -
> ideally even something that can read velocity templates (since I hope
> to also port the system to java at some point).
> 
> Any suggestions?
> 
> (Also, Hans - please get in touch with me about your authentication
> system, since I didn't get your email address.)
> 




More information about the talk mailing list