NYCPHP Meetup

NYPHP.org

[nycphp-talk] Templating and authentication

Joseph Annino jannino at jannino.com
Tue Oct 8 13:35:34 EDT 2002


Vlib template can store parsed versions of the template files, in order 
to speed things up, and remove the eregs from each request.  It will 
just load the "compiled" template and insert the variables and spit it 
out.

I've used HTML::Template in perl to save its results to static files.  
I've used that for product catalogs, because they only change at known 
times and involve most of the clicking on a commerce site.

On Tuesday, October 8, 2002, at 12:34  PM, Adam Fields wrote:

> On Tue, Oct 08, 2002 at 11:39:12AM -0400, max goldberg wrote:
>> 	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.
>
> Well, ideally, for any kind of traffic, the templating system should
> be combined with caching (I've done a lot of work building Vignette
> systems, and the caching is one of the few things I really like about
> their system). However, I'm not there yet. I've heard reasonably good
> things about squid to that effect, but have yet to explore how (well)
> it works with php.
>
>> 	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.)
>>>
>>
>>
>>
>>
>>
>>
>
> -- 
> 				- Adam
>
> -----
> Adam Fields, Managing Partner, fields at surgam.net
> Surgam, Inc. is a technology consulting firm with strong background in
> delivering scalable and robust enterprise web and IT applications.
> http://www.adamfields.com
>
>
> --- Unsubscribe at http://nyphp.org/list ---
>
>




More information about the talk mailing list