[consulting] Challenging an Assumption About What an Easy tpl.php Looks Like

Shai Gluskin shai at content2zero.com
Mon Oct 12 12:59:07 UTC 2009


Gang,

Matt, very cool on the user testing.

Ultimately, it does come down to personal preference. Newbies wouldn't
know there is something different. If this is enough if an itch for me
I could put out a Zen clone with the tpl files re-written.

I want to research Michelle's suggestion that all PHP degrades
performance. I'm sceptacle of that.

Re Greg's point about the View-source less structured/ harder to read.
First off, the output when doing it HTML style is far from perfect.
And I think in a Firebug world, it's kind of moot, cause Firebug reads
the DOM of the doc and puts the HTML in perfect order, so the  raw
View-source isn't that important.

An interesting addition to Matt's user test would be to ask the user
to comment out a portion of the code, which is a really helpful thing
to do when experimenting. Very easy in PHP; a real pain in a mixed
PHP/HTML environment.

The Zen tpl files have a bunch of helpful documentation at the top. In
a PHP environment, the help could be interspersed throughout the file,
 close to relevant code. It would also be easy to add sample code
snippets that are commented out by default. Zen does that quite a bit
in template.php and in CSS files, but that is notably missing from the
tpl files.

Shai

On Monday, October 12, 2009, Nancy Wichmann <nan_wich at bellsouth.net> wrote:
>
>
>
>
>
> Shai,
> I absolutely agree with you on the readability aspect. I, too, rewrote several
> tpl.php files before I stumbled across a post on DO somewhere that said the
> interspersed technique was as much as 4 times faster to execute. However, we
> still see "print" used exclusively when "echo" is faster...
>
> Nancy E. Wichmann,
> PMP
> Injustice
> anywhere is a threat to justice everywhere. -- Dr. Martin L. King,
> Jr.
>


More information about the consulting mailing list