What's Smarty provides over the following lines?

index.php
===============
*$tpl = array(
// .. some data to be displayed in template
);
include_once "template.phtml"*;

template.phtml
===============
*<html>
<img src="asdasd">
<?= $tpl ?>
<br />
</html>
*
As you see, I separated programmers' and designers' lands without Smarty.
What actually Smarty provides is an new language to be used in Views. This
has security benefits when you want to share your views outside of your
company.

Read this:
http://gigaom.com/2007/11/26/wordpress-themes-security-problems/


On Sat, Jul 19, 2008 at 4:29 AM, Karol Grecki <[EMAIL PROTECTED]> wrote:

>
> I'm not sure what is so hard to understand here. Smarty was created with
> specific goals in mind, mainly making cooperation between developers and
> designers easier. It creates extra presentation layer so designers don't
> have to deal with files containing PHP code. But this is exactly what CSS
> is
> for, designers can use external stylesheets to completely change look and
> layout of a page. As a developer all you need is serve content with simple
> markup and you don't need a template engine to achieve that, PHP will do
> just fine. Smarty gained popularity before CSS was widely adopted and was
> definitely a useful tool back then, but things changed. Now we have MVC web
> frameworks, CSS layouts, unobtrusive JavaScript and so on... Smarty is a
> dinosaur.
>
> Of course this is only my opinion and you're free to disagree, but this
> conversation is offtopic and I'd rather stop it here.
>
> Karol
>
>
> Jani Hartikainen wrote:
> >
> > I think what behzad said about the blogs applies. I don't think something
> > can be claimed to be obsolete just because it has a different markup than
> > what
> > you're used to, or what you prefer. Also, some languages can't be
> embedded
> > into
> > HTML like you can do with PHP, so in those you have to use a template
> > engine.
> >
> > I don't really know what Smarty has to do with separating content and
> > presentation
> > either. Or PHP in general... I thought that was HTML and CSS.
> >
> >
> > On Sat, 19 Jul 2008 01:35:20 +0300, Karol Grecki <[EMAIL PROTECTED]>
> > wrote:
> >
> >>
> >> PHP MVC frameworks gained popularity fairly recently, it's irrelevant
> >> when
> >> this pattern was "invented". Also developers and designers got better in
> >> separating content from presentation. It didn't happen overnight, those
> >> technologies and tools matured gradually, so did people skills. Nowadays
> >> web
> >> applications are build quite differently than few years ago.
> >>
> >> Karol
> >>
> >>
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Smarty--tp18537490p18540063.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>
>


-- 
Kind regards,
-behzad

Reply via email to