|
Posted by awebguynow on 10/09/26 11:35
So I've been evaluating templates and architectures:
-T. Marston variant -
methodolgy is sound, wish I had 3 semesters to learn it, I gave up
after 200 pgs
- phpWACT
also like this, appreciate the comprehensive approach and XML, but
XML parse may slow this down
- Smarty, well known, Pros: easy to use; Cons: Heavy weight, less
portable due to Pear installation issues on webhosts
- TinyButStrong (TBS) Pros: small and flexible; Cons: non-standard
API is detailed
- PHP alone -
Obviously, comparison at a glance, is like apples and oranges.
Marston / WACT solutions extend beyond templates, use Design Pattern
solutions.
I really don't want any specific template code in my php; Makes me wish
for a layer.
As far as analysis or roll-your-own solution, How hard could this be ?
The code I've seen reads a template, and creates an array of
static/placeholder, ....
Then cycles through and does replacements to create the output.
caching ? Date check and then possible reload ?
compiling ? What exactly is this ? some sort of compression
Ways to stress test ? performance evaluations ?
In terms of efficiency, I've also considered ways to keep things in
memory, static?, like PHP's "Persistent Database Connections" (PDC).
If PDC is effectively implemented through Apache, multiprocess Srv,
parent/child,
where parent keeps the Conn open, and hands it off to a child, ...
What about template code and template objects ? Should they be
loaded/discarded on every PHP request ? ( Mine will be a medium usage
site 200-500 hits / hour )
Does Apache cache any of this ?
Re: FC Front Controller
I've heard the raging debates, and most dev's are against the FC model.
I've always thought they would be good, only if you needed to modify
the request.
I suppose that any PHP objects would only be retained in memory if the
script was running in an endless loop - but that's Apache's job to
listen and take requests.
Any suggestions, I'll be glad to hear them. TIA
[Back to original message]
|