Jochem Maas said:
> 1. 'Template Engine' - you can justifyably call PHP a template engine

Correct.  Seems that Smarty is, for the most part, redundant (see my last
post called "PHP makes a great templating engine (Was: smarty)").

> but I think calling Smarty a template engine confuses the issue - it
> would be clearer call it something like 'Presentation Component' which
> encapsulates output caching, output string transformation, markup
> generation, presentation logic security & seperation of (code & possibly
> human) tasks. viewing it as a component means viewing it as a tool,
> tools are used when appropriate and according to their capabilities and
> the scope of the job at hand. in principle a sizeable proportion of all
> the.

Tool.  Look at it as just another tool.  I was seeing it as a "must have"
because I was somewhat ignorant of PHP's native capabilities.  It adds
complexity and does indeed slow down your program (the Smarty class must
load on every page) so keep those in mind.  On the other hand, you're
almost forced to separate business and presentation and you gain caching
(though native PHP options or Zend are available).  So it's a weighty
decision.  But it is a good tool.

> 3. 'Lock In'

I believe "Lock In" is a big problem unless you document well.  For
instance, my supervisor is probably going to choose ASP.NET (don't ask
why) for our next project.  But all along, I plan to document it well in
case we hit a stumbling block.  With a bit of effort and the source code I
can port it to PHP.  I've even toyed with the idea of keeping a
fully-functional copy written in PHP while he's working in ASP.NET ;-) 
But I've got better things to do.

> Limitations are often purely percieved rather than actual

I believe that's why I chose Smarty for my last project.  I thought PHP
limited me to keeping business logic mixed with presentation logic, but
it's hardly the case.

When you consider that it's just another tool in your box, it works well. 
It's not the only way to let designers design and programmers program
(Jochem is a big believer in CSS for that).  Just think of it as another
tool and it's no big deal.

/dev/idal

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

Reply via email to