Page 3 of 3
Re: SMARTY TEMPLATE. I'm coding Controller that support Smar
Posted: Thu Mar 31, 2011 11:33 pm
by Qphoria
I guess the question is .. why?
So you have
Smarty:
PHP:
Smarty:
Code: Select all
{foreach from=$addresses item=address)}
....
{/foreach}
PHP:
Code: Select all
<? foreach ($addresses as $address) { ?>
....
<? } ?>
To me it looks like just a different syntax with no real value.
Maybe there is more but it just looks more or less the same in all examples I've seen.
Re: SMARTY TEMPLATE. I'm coding Controller that support Smar
Posted: Sat Apr 02, 2011 3:40 pm
by SapporoGuy

Still sitting on the fence regarding this.
But it really does seem that having the "ability" would be a good move. That way those who do and those who don't will be happy.
Re: SMARTY TEMPLATE. I'm coding Controller that support Smar
Posted: Sat Apr 02, 2011 4:14 pm
by JNeuhoff
I guess the advantages of Smarty are:
1) being language agnostic
2) familiarity by many programmers
Of course, 1) is not so much relevant here, because OpenCart is only available in PHP. But 2) might be a good reason for some template designers to embrace OpenCart. So yes, it will help OpenCart to become even more widely adopted.
Re: SMARTY TEMPLATE. I'm coding Controller that support Smar
Posted: Sun Apr 03, 2011 12:30 am
by Xsecrets
JNeuhoff wrote:I guess the advantages of Smarty are:
1) being language agnostic
2) familiarity by many programmers
Of course, 1) is not so much relevant here, because OpenCart is only available in PHP. But 2) might be a good reason for some template designers to embrace OpenCart. So yes, it will help OpenCart to become even more widely adopted.
of course it could drive people away too, I know there are several developers here who chose opencart over presta mostly because presta used smarty.
Re: SMARTY TEMPLATE. I'm coding Controller that support Smar
Posted: Sun Apr 03, 2011 12:56 am
by Qphoria
JNs reasoning is the first good reason I've heard on this topic
But I agree with xsecrets and sapparo that it would only be good as an additional optional method. But then we will start having mixed templates but thats the compromise
PHP is not a very good templating language
Posted: Wed Apr 13, 2011 6:31 am
by webcomm
Have to say I like using specialized template languages more than using PHP in templates. I have never understood the argument that says "PHP is already a templating language". Even if we grant that PHP is a templating language, it's not a very good templating language because it is too verbose. The best template language I've used is Django's.
Re: PHP is not a very good templating language
Posted: Wed Apr 13, 2011 6:33 am
by Xsecrets
webcomm wrote:Have to say I like using specialized template languages more than using PHP in templates. I have never understood the argument that says "PHP is already a templating language". Even if we grant that PHP is a templating language, it's not a very good templating language because it is too verbose. The best template language I've used is Django's.
I've never understood the argument that php is too verbose. have you actually looked at smarty the one everyone wants to use? To me it's much more verbose and confusing than php itself.
Re: SMARTY TEMPLATE. I'm coding Controller that support Smar
Posted: Wed Apr 13, 2011 8:11 am
by Qphoria
Consoles vs PC, xbox vs ps, iOS vs Android, smarty vs php... If you want it, create the integration for it and use it. If we want it it, we'll add it. At the moment, we don't want it.
Re: SMARTY TEMPLATE. I'm coding Controller that support Smar
Posted: Wed Apr 13, 2011 9:49 pm
by webcomm
ave you actually looked at smarty the one everyone wants to use?
I've never used smarty specifically. Just saying the idea of a (non-PHP) templating language is not a bad one, in my experience.
Re: SMARTY TEMPLATE. I'm coding Controller that support Smar
Posted: Thu Apr 14, 2011 1:19 am
by marc_cole
webcomm wrote:The best template language I've used is Django's.
webcomm wrote:I've never used smarty specifically. Just saying the idea of a (non-PHP) templating language is not a bad one, in my experience.
Unfortunately, you don't say why.
From what I've read so far, I seriously hope we don't adopt Smarty. I'm already learning PHP, so why should I learn another language simply because "everyone else is doing it"? Unless Smarty was to give us a real good reason to switch to it, my vote is 'no'.
Earlier in this thread I mention PHPTAL. It looks like only one other person agrees with me — sort of. PHPTAL is the only one I've run across that would actually benefit OC developers; allowing them to develop visually in Dreamweaver. Apart from that, I personally don't see any reason to change what we have.
Re: SMARTY TEMPLATE. I'm coding Controller that support Smar
Posted: Fri Apr 15, 2011 12:29 am
by webcomm
Unfortunately, you don't say why.
I've spent many 100s of hours working with systems that use PHP as the templating language and many 100s of hours working with systems that use a different templating language. I feel like I'm a bit more productive with the latter, since a specialized templating language tends to make templates more readable, in my experience.
It's just a matter of personal preference. It's not the kind of thing that would strongly influence whether I use a particular framework or not. It's not among the most important considerations.