Re: templating engine options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, May 24, 2009 at 11:09 AM, tedd <tedd.sperling@xxxxxxxxx> wrote:
> At 12:01 AM +0100 5/24/09, Nathan Rixham wrote:
>>
>> LinuxManMikeC wrote:
>>>
>>> I was recently researching template engines for a small in-house
>>> project, with a bias toward simple and lightweight.  I found this
>>> interesting article in my search.  I think its worth considering if
>>> you don't need all the bells and whistles of the big template engines.
>>>  Simple and elegant.
>>> http://www.massassi.com/php/articles/template_engines/
>>
>> cheers, it certainly is simple and elegant - however a bit too simple
>> (specifically as it's in template php); gives me immediate visions of a
>> wordpress template - and that's more than enough to scare me off! <lol>
>>
>> regards,
>>
>> nathan
>
> All:
>
> Anytime I see embedded style elements within html, that's more than ample
> warning to make me look elsewhere for the solution -- because IMO that's not
> a solution.
>
> I find it interesting that the articles states "the separation of business
> logic from presentation" but then combines content with presentation. I
> don't see any real gain here.
>
> My efforts are always trying to separate content from function and
> presentation. Make everything as unobtrusive as you can. Place styling in
> remote css, client-side javascript enhancements unobtrusively, and use
> server-side php/mysql to create secure and accurate function to generate the
> proper html and deliver desired content. I can understand someone wanting to
> simplify their work, but exchanging one problem for another doesn't cut it
> for me.
>
> Cheers,
>
> tedd
>
>

You're missing the point just because he threw in some old HTML
styling attributes.  The main issue is the overhead of added parsing
layers to find where content goes in the HTML.  Aren't we already
using a language (PHP) that parses for place holders for dynamic
content within HTML tags?  Write the template in XHTML, style it with
CSS, and insert content place marks with PHP short tags.  Do the
programming work of calculations, validation, and DB access in another
script which will include the template at the appropriate time.  Even
create classes to hold various data sets (think JavaBeans) if you
want.  Adding a layer of abstraction just so your designers don't have
to write <?=$var?> is silly at best.  At lest that's my opinion.  Do
whatever works for you.

Mike

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux